From 7427ad9ef22d65bc0b2143b228ed860982166954 Mon Sep 17 00:00:00 2001 From: wmlih Date: Fri, 14 Apr 2023 14:39:27 +0800 Subject: [PATCH] test:Revision review comments about ace_ets_layout_test Signed-off-by: wmlih --- .../Column/spaceChanged/Column_Space.ets | 14 ++-- .../Flex_NoWrap_FlexMarPad_TextMarPad.ets | 4 +- .../NoWrap/Flex_NoWrap_FlexMar_TextMarPad.ets | 2 +- .../NoWrap/Flex_NoWrap_FlexPad_TextMarPad.ets | 4 +- .../Wrap/Wrap/Flex_Wrap_DisplayPriority.ets | 5 +- .../Wrap/Flex_Wrap_FlexMarPad_TextMarPad.ets | 4 +- .../Wrap/Flex_Wrap_FlexMar_TextMarPad.ets | 4 +- .../Wrap/Flex_Wrap_FlexPad_TextMarPad.ets | 4 +- .../Flex/Wrap/Wrap/Flex_Wrap_FlexSize.ets | 4 +- .../Flex/Wrap/Wrap/Flex_Wrap_LayoutWeight.ets | 4 +- .../Flex/Wrap/Wrap/Flex_Wrap_Padding.ets | 4 +- .../Flex/Wrap/Wrap/Flex_Wrap_Position.ets | 4 +- .../Flex/Wrap/Wrap/Flex_Wrap_TextSize.ets | 4 +- .../Flex/Wrap/Wrap/Flex_Wrap_Visibility.ets | 4 +- .../Flex_AlignContent_SpaceAround_FlexMar.ets | 22 ++--- ...ex_AlignContent_SpaceAround_FlexMarPad.ets | 20 ++--- .../Flex_AlignContent_SpaceAround_FlexPad.ets | 24 +++--- ...Flex_AlignContent_SpaceAround_FlexSize.ets | 26 +++--- .../Flex_AlignContent_SpaceAround_TextMar.ets | 20 ++--- ...ex_AlignContent_SpaceAround_TextOffset.ets | 24 +++--- ...Flex_AlignContent_SpaceAround_TextSize.ets | 24 +++--- ...lignContent_SpaceAround_TextVisibility.ets | 24 +++--- ...Flex_AlignContent_SpaceBetween_FlexMar.ets | 20 ++--- ...x_AlignContent_SpaceBetween_FlexMarPad.ets | 18 ++-- ...Flex_AlignContent_SpaceBetween_FlexPad.ets | 22 ++--- ...lex_AlignContent_SpaceBetween_FlexSize.ets | 20 ++--- ...Flex_AlignContent_SpaceBetween_TextMar.ets | 24 +++--- ...x_AlignContent_SpaceBetween_TextOffset.ets | 20 ++--- ...lex_AlignContent_SpaceBetween_TextSize.ets | 24 +++--- ...ignContent_SpaceBetween_TextVisibility.ets | 24 +++--- .../ItemAlign_Auto/FlexAlignSelf.ets | 12 +-- .../alignItems/ItemAlign_Auto/FlexBase.ets | 22 ++--- .../alignItems/ItemAlign_Auto/FlexExceed.ets | 14 ++-- .../ItemAlign_Auto/FlexHeightModify.ets | 18 ++-- .../alignItems/ItemAlign_Auto/FlexMargin.ets | 10 +-- .../alignItems/ItemAlign_Auto/FlexOffset.ets | 10 +-- .../alignItems/ItemAlign_Auto/FlexPadding.ets | 20 ++--- .../ItemAlign_Auto/FlexTextMargin.ets | 18 ++-- .../ItemAlign_Auto/FlexVisibility.ets | 18 ++-- .../Center/AlignCenter_AddAlign.ets | 20 ++--- .../Center/AlignCenter_AddAllSpace.ets | 18 ++-- .../Center/AlignCenter_AddLayoutWeight.ets | 16 ++-- .../Center/AlignCenter_AddMargin.ets | 16 ++-- .../Center/AlignCenter_AddOffset.ets | 18 ++-- .../Center/AlignCenter_AddOneMargin.ets | 16 ++-- .../Center/AlignCenter_AddOneWidth.ets | 20 ++--- .../Center/AlignCenter_AddPadding.ets | 20 ++--- .../Center/AlignCenter_AddVisibility.ets | 18 ++-- .../Center/AlignCenter_NoSpace.ets | 20 ++--- .../justifyContent/End/AlignEnd_AddAlign.ets | 20 ++--- .../End/AlignEnd_AddAllSpace.ets | 18 ++-- .../End/AlignEnd_AddLayoutWeight.ets | 18 ++-- .../justifyContent/End/AlignEnd_AddMargin.ets | 18 ++-- .../justifyContent/End/AlignEnd_AddOffset.ets | 20 ++--- .../End/AlignEnd_AddOneMargin.ets | 18 ++-- .../End/AlignEnd_AddOneWidth.ets | 20 ++--- .../End/AlignEnd_AddPadding.ets | 20 ++--- .../End/AlignEnd_AddVisibility.ets | 18 ++-- .../justifyContent/End/AlignEnd_NoSpace.ets | 20 ++--- .../SpaceEvenly/AlignSpaceEvenly_AddAlign.ets | 18 ++-- .../AlignSpaceEvenly_AddAllSpace.ets | 16 ++-- .../AlignSpaceEvenly_AddLayoutWeight.ets | 16 ++-- .../AlignSpaceEvenly_AddMargin.ets | 16 ++-- .../AlignSpaceEvenly_AddOffset.ets | 20 ++--- .../AlignSpaceEvenly_AddOneMargin.ets | 16 ++-- .../AlignSpaceEvenly_AddOneWidth.ets | 18 ++-- .../AlignSpaceEvenly_AddPadding.ets | 18 ++-- .../AlignSpaceEvenly_AddVisibility.ets | 16 ++-- .../SpaceEvenly/AlignSpaceEvenly_NoSpace.ets | 18 ++-- .../Start/AlignStart_AddAlign.ets | 20 ++--- .../Start/AlignStart_AddAllSpace.ets | 18 ++-- .../Start/AlignStart_AddLayoutWeight.ets | 16 ++-- .../Start/AlignStart_AddMargin.ets | 18 ++-- .../Start/AlignStart_AddOffset.ets | 20 ++--- .../Start/AlignStart_AddOneMargin.ets | 18 ++-- .../Start/AlignStart_AddOneWidth.ets | 20 ++--- .../Start/AlignStart_AddPadding.ets | 18 ++-- .../Start/AlignStart_AddVisibility.ets | 18 ++-- .../Start/AlignStart_NoSpace.ets | 20 ++--- .../GridChange/Grid_RowCol_Gap.ets | 16 ++-- .../GridChange/Grid_RowCol_GridSize.ets | 16 ++-- .../Grid_RowCol_LayoutDirection.ets | 16 ++-- .../GridChange/Grid_RowCol_PadMar.ets | 20 ++--- .../GridChange/Grid_RowCol_cellLength.ets | 16 ++-- .../GridChange/Grid_RowCol_maxCount.ets | 16 ++-- .../Grid_RowCol_TemplateChange.ets | 20 ++--- .../List_SpaceChange/List_SpaceChange.ets | 6 +- .../pages/Row/spaceChanged/Row_Space.ets | 14 ++-- .../Tabs/Tabs_ParmsChange/Tabs_WidHei.ets | 2 +- .../pages/Tabs/tabs_index/Tabs_index.ets | 2 +- .../Column/spaceChanged/Column_Space.test.ets | 34 ++++---- ..._AlignContent_SpaceAround_FlexMar.test.ets | 24 +++--- ...ignContent_SpaceAround_FlexMarPad.test.ets | 36 ++++---- ..._AlignContent_SpaceAround_FlexPad.test.ets | 37 +++++---- ...AlignContent_SpaceAround_FlexSize.test.ets | 32 +++---- ..._AlignContent_SpaceAround_TextMar.test.ets | 38 ++++----- ...ignContent_SpaceAround_TextOffset.test.ets | 19 ++--- ...AlignContent_SpaceAround_TextSize.test.ets | 32 +++---- ...ontent_SpaceAround_TextVisibility.test.ets | 5 +- ...AlignContent_SpaceBetween_FlexMar.test.ets | 18 ++-- ...gnContent_SpaceBetween_FlexMarPad.test.ets | 36 ++++---- ...AlignContent_SpaceBetween_FlexPad.test.ets | 32 +++---- ...lignContent_SpaceBetween_FlexSize.test.ets | 32 +++---- ...AlignContent_SpaceBetween_TextMar.test.ets | 35 ++++---- ...gnContent_SpaceBetween_TextOffset.test.ets | 19 ++--- ...lignContent_SpaceBetween_TextSize.test.ets | 32 +++---- ...ntent_SpaceBetween_TextVisibility.test.ets | 46 +++++----- .../FlexAlignSelfJsunit.test.ets | 38 ++++----- .../ItemAlign_Auto/FlexBaseJsunit.test.ets | 79 +++++++++--------- .../ItemAlign_Auto/FlexExceedJsunit.test.ets | 75 +++++++++-------- .../FlexHeightModifyJsunit.test.ets | 71 ++++++++-------- .../ItemAlign_Auto/FlexMarginJsunit.test.ets | 40 ++++----- .../ItemAlign_Auto/FlexOffsetJsunit.test.ets | 36 ++++---- .../ItemAlign_Auto/FlexPaddingJsunit.test.ets | 83 +++++++++---------- .../FlexTextMarginJsunit.test.ets | 77 +++++++++-------- .../FlexVisibilityJsunit.test.ets | 23 +++-- .../Center/AlignCenter_AddAlign.test.ets | 17 ++-- .../Center/AlignCenter_AddAllSpace.test.ets | 32 +++---- .../AlignCenter_AddLayoutWeight.test.ets | 19 ++--- .../Center/AlignCenter_AddMargin.test.ets | 12 ++- .../Center/AlignCenter_AddOffset.test.ets | 11 ++- .../Center/AlignCenter_AddOneMargin.test.ets | 17 ++-- .../Center/AlignCenter_AddOneWidth.test.ets | 11 ++- .../Center/AlignCenter_AddPadding.test.ets | 17 ++-- .../Center/AlignCenter_AddVisibility.test.ets | 31 ++++--- .../Center/AlignCenter_NoSpace.test.ets | 21 ++--- .../End/AlignEnd_AddAlign.test.ets | 9 +- .../End/AlignEnd_AddAllSpace.test.ets | 23 +++-- .../End/AlignEnd_AddLayoutWeight.test.ets | 17 ++-- .../End/AlignEnd_AddMargin.test.ets | 9 +- .../End/AlignEnd_AddOffset.test.ets | 9 +- .../End/AlignEnd_AddOneMargin.test.ets | 17 ++-- .../End/AlignEnd_AddOneWidth.test.ets | 11 ++- .../End/AlignEnd_AddPadding.test.ets | 17 ++-- .../End/AlignEnd_AddVisibility.test.ets | 31 ++++--- .../End/AlignEnd_NoSpace.test.ets | 17 ++-- .../AlignSpaceEvenly_AddAlign.test.ets | 9 +- .../AlignSpaceEvenly_AddAllSpace.test.ets | 32 +++---- .../AlignSpaceEvenly_AddLayoutWeight.test.ets | 17 ++-- .../AlignSpaceEvenly_AddMargin.test.ets | 9 +- .../AlignSpaceEvenly_AddOffset.test.ets | 9 +- .../AlignSpaceEvenly_AddOneMargin.test.ets | 17 ++-- .../AlignSpaceEvenly_AddOneWidth.test.ets | 9 +- .../AlignSpaceEvenly_AddPadding.test.ets | 17 ++-- .../AlignSpaceEvenly_AddVisibility.test.ets | 31 ++++--- .../AlignSpaceEvenly_NoSpace.test.ets | 15 ++-- .../Start/AlignStart_AddAlign.test.ets | 9 +- .../Start/AlignStart_AddAllSpace.test.ets | 23 +++-- .../Start/AlignStart_AddLayoutWeight.test.ets | 17 ++-- .../Start/AlignStart_AddMargin.test.ets | 9 +- .../Start/AlignStart_AddOffset.test.ets | 9 +- .../Start/AlignStart_AddOneMargin.test.ets | 18 ++-- .../Start/AlignStart_AddOneWidth.test.ets | 11 ++- .../Start/AlignStart_AddPadding.test.ets | 18 ++-- .../Start/AlignStart_AddVisibility.test.ets | 31 ++++--- .../Start/AlignStart_NoSpace.test.ets | 17 ++-- .../GridChange/Grid_RowCol_Gap.test.ets | 28 +++---- .../GridChange/Grid_RowCol_GridSize.test.ets | 18 ++-- .../Grid_RowCol_LayoutDirection.test.ets | 12 +-- .../GridChange/Grid_RowCol_PadMar.test.ets | 28 +++---- .../Grid_RowCol_cellLength.test.ets | 12 +-- .../GridChange/Grid_RowCol_maxCount.test.ets | 12 +-- .../Grid_RowCol_TemplateChange.test.ets | 20 ++--- .../List_ListInitialIndex1.test.ets | 1 - .../test/Row/spaceChanged/Row_Space.test.ets | 37 +++++---- .../stack_offset_change.test.ets | 1 - .../stack_position_change.test.ets | 1 - .../StackItem_change/stack_zIndex.test.ets | 1 - .../stack_alignContent.test.ets | 1 - .../entry/src/main/module.json | 4 + 170 files changed, 1637 insertions(+), 1680 deletions(-) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Column/spaceChanged/Column_Space.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Column/spaceChanged/Column_Space.ets index ac670deec..504dd126e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Column/spaceChanged/Column_Space.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Column/spaceChanged/Column_Space.ets @@ -13,19 +13,19 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../common/MessageManager'; @Entry @Component struct Column_Space { - @State addSpace: number = 10 - messageManager:MessageManager = new MessageManager() + @State addSpace: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { console.info('Column_Space onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'addSpace') { this.addSpace = message.value; } @@ -34,9 +34,9 @@ struct Column_Space { } build() { Column({space:this.addSpace}) { - Column(){Text('1')}.width(300).height(50).backgroundColor(0xF5DEB3).key('Column_Space_011') - Column(){Text('2')}.width(300).height(100).backgroundColor(0xD2B48C).key('Column_Space_012') - Column(){Text('3')}.width(300).height(150).backgroundColor(0xF5DEB3).key('Column_Space_013') + Column(){Text('1')}.width(300).height(50).backgroundColor(0xF5DEB3).key('Column_Space_011'); + Column(){Text('2')}.width(300).height(100).backgroundColor(0xD2B48C).key('Column_Space_012'); + Column(){Text('3')}.width(300).height(150).backgroundColor(0xF5DEB3).key('Column_Space_013'); }.key('Column_Space_01').width(350).height(400).backgroundColor(0xAFEEEE) } } diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/NoWrap/Flex_NoWrap_FlexMarPad_TextMarPad.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/NoWrap/Flex_NoWrap_FlexMarPad_TextMarPad.ets index cc6dcfb5b..01afc2a8e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/NoWrap/Flex_NoWrap_FlexMarPad_TextMarPad.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/NoWrap/Flex_NoWrap_FlexMarPad_TextMarPad.ets @@ -61,8 +61,8 @@ struct Flex_NoWrap_FlexMarPad_TextMarPad{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.NoWrap}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.NoWrap }){ Text('1').width(150).height(100).backgroundColor(0xF5DEB3).margin(this.firstTextMargin) .padding(this.firstTextPadding).key('NoWrap_FlexMarPad_TextPad1'); Text('2').width(150).height(150).backgroundColor(0xD2B48C).margin(this.secondTextMargin) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/NoWrap/Flex_NoWrap_FlexMar_TextMarPad.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/NoWrap/Flex_NoWrap_FlexMar_TextMarPad.ets index 9f2e8e0ad..ad3620173 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/NoWrap/Flex_NoWrap_FlexMar_TextMarPad.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/NoWrap/Flex_NoWrap_FlexMar_TextMarPad.ets @@ -26,7 +26,7 @@ struct Flex_NoWrap_FlexMar_TextMarPad{ messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('FlexAlignContent_SpaceAround_01 onPageShow'); + console.info('Flex_NoWrap_FlexMar_TextMarPad onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/NoWrap/Flex_NoWrap_FlexPad_TextMarPad.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/NoWrap/Flex_NoWrap_FlexPad_TextMarPad.ets index 56f5348f7..bc7272e4f 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/NoWrap/Flex_NoWrap_FlexPad_TextMarPad.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/NoWrap/Flex_NoWrap_FlexPad_TextMarPad.ets @@ -57,8 +57,8 @@ struct Flex_NoWrap_FlexPad_TextMarPad{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.NoWrap}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.NoWrap }){ Text('1').width(150).height(100).backgroundColor(0xF5DEB3).margin(this.firstTextMargin) .padding(this.firstTextPadding).key('NoWrap_FlexPad_TextMarPad1'); Text('2').width(150).height(150).backgroundColor(0xD2B48C).margin(this.secondTextMargin) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_DisplayPriority.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_DisplayPriority.ets index 5f4856a37..40d6c2841 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_DisplayPriority.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_DisplayPriority.ets @@ -41,9 +41,8 @@ struct Flex_Wrap_DisplayPriority{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - // 子组件设置DisplayPriority - Flex({wrap:FlexWrap.Wrap}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap }){ Text('1').width(150).height(100).backgroundColor(0xF5DEB3) .displayPriority(this.firstTextPriority).key('Wrap_DisplayPriority01'); Text('2').width(150).height(150).backgroundColor(0xD2B48C) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexMarPad_TextMarPad.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexMarPad_TextMarPad.ets index b046dfad3..a66da9c6e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexMarPad_TextMarPad.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexMarPad_TextMarPad.ets @@ -61,8 +61,8 @@ struct Flex_Wrap_FlexMarPad_TextMarPad{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap }){ Text('1').width(150).height(50).backgroundColor(0xF5DEB3).margin(this.firstTextMargin) .padding(this.firstTextPadding).key('Wrap_FlexMarPad_TextPad1'); Text('2').width(150).height(100).backgroundColor(0xD2B48C).margin(this.secondTextMargin) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexMar_TextMarPad.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexMar_TextMarPad.ets index f1c1e132d..4d18f3adf 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexMar_TextMarPad.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexMar_TextMarPad.ets @@ -57,8 +57,8 @@ struct Flex_Wrap_FlexMar_TextMarPad{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap }){ Text('1').width(150).height(50).backgroundColor(0xF5DEB3).margin(this.firstTextMargin) .padding(this.firstTextPadding).key('Wrap_FlexMar_TextPad1'); Text('2').width(150).height(100).backgroundColor(0xD2B48C).margin(this.secondTextMargin) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexPad_TextMarPad.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexPad_TextMarPad.ets index d29fa55d1..ee027db86 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexPad_TextMarPad.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexPad_TextMarPad.ets @@ -57,8 +57,8 @@ struct Flex_Wrap_FlexPad_TextMarPad{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap }){ Text('1').width(150).height(50).backgroundColor(0xF5DEB3).margin(this.firstTextMargin) .padding(this.firstTextPadding).key('Wrap_FlexPad_TextMarPad1'); Text('2').width(150).height(100).backgroundColor(0xD2B48C).margin(this.secondTextMargin) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexSize.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexSize.ets index cc624947b..2c6ca6f60 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexSize.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_FlexSize.ets @@ -37,8 +37,8 @@ struct Flex_Wrap_FlexSize{ this.messageManager.registerCallback(callback); } build(){ - Column({space:10}){ - Flex({wrap:FlexWrap.Wrap, direction: FlexDirection.Row}){ + Column({ space:10 }){ + Flex({ wrap:FlexWrap.Wrap, direction: FlexDirection.Row }){ Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('Wrap_flexSize_Text1'); Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('Wrap_flexSize_Text2'); Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('Wrap_flexSize_Text3'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_LayoutWeight.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_LayoutWeight.ets index 3494d0a40..4b5a27c5e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_LayoutWeight.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_LayoutWeight.ets @@ -41,8 +41,8 @@ struct Flex_Wrap_layoutWeight{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap }){ Text('1').width(150).height(100).backgroundColor(0xF5DEB3) .layoutWeight(this.firstTextLayoutWeight).key('Wrap_LayoutWeight01'); Text('2').width(150).height(150).backgroundColor(0xD2B48C) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_Padding.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_Padding.ets index 9c6b58ff8..f730b317e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_Padding.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_Padding.ets @@ -37,8 +37,8 @@ struct Flex_Wrap_FlexPad_TextMarPad{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, direction: FlexDirection.Row}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap, direction: FlexDirection.Row }){ Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('Wrap_flex_pad1'); Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('Wrap_flex_pad2'); Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('Wrap_flex_pad3'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_Position.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_Position.ets index 766580e79..4d2cad89a 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_Position.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_Position.ets @@ -33,8 +33,8 @@ struct Flex_Wrap_Position{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap }){ Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('Wrap_Position01').position(this.testPosition); Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('Wrap_Position02'); Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('Wrap_Position03'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_TextSize.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_TextSize.ets index c20031658..3ad1aa5bb 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_TextSize.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_TextSize.ets @@ -33,8 +33,8 @@ struct Flex_Wrap_TextSize{ this.messageManager.registerCallback(callback); } build(){ - Column({space:10}){ - Flex({wrap:FlexWrap.Wrap, direction: FlexDirection.Row}){ + Column({ space:10 }){ + Flex({ wrap:FlexWrap.Wrap, direction: FlexDirection.Row }){ Text('1').width(this.testWidth).height(50).backgroundColor(0xF5DEB3).key('Wrap_flex_TextSize1'); Text('2').width(this.testWidth).height(100).backgroundColor(0xD2B48C).key('Wrap_flex_TextSize2'); Text('3').width(this.testWidth).height(150).backgroundColor(0xF5DEB3).key('Wrap_flex_TextSize3'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_Visibility.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_Visibility.ets index 714ef8293..b66fd1ef3 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_Visibility.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/Wrap/Wrap/Flex_Wrap_Visibility.ets @@ -47,8 +47,8 @@ struct Flex_Wrap_Visibility{ } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap }){ Text('1').width(this.firstTextWidth).height(100).backgroundColor(0xF5DEB3) .visibility(this.testVisibility).key('Wrap_Text_Visibility1'); Text('2').width(this.secondTextWidth).height(150).backgroundColor(0xD2B48C).key('Wrap_Text_Visibility2'); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMar.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMar.ets index 431404b28..27c86a597 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMar.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMar.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceAround_04{ - @State testMargin: number = 0 +struct FlexAlign_SpaceAround_FlexMar{ + @State testMargin: number = 0; messageManager:MessageManager = new MessageManager() onPageShow() { - console.info('FlexAlignContent_SpaceAround_01 onPageShow'); + console.info('FlexAlign_SpaceAround_FlexMar onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'margin') { this.testMargin = message.value; } @@ -33,12 +33,12 @@ struct FlexAlignContent_SpaceAround_04{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ - Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMar01') - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMar02') - Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMar03') - Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMar04') + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){ + Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMar01'); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMar02'); + Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMar03'); + Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMar04'); } .width(200) .height(400) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMarPad.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMarPad.ets index 934d56e76..8034e90b2 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMarPad.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMarPad.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceAround_03{ +struct FlexAlign_SpaceAround_FlexMarPad{ @State testPadding: number = 0; @State testMargin: number = 0; messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('FlexAlignContent_SpaceAround_01 onPageShow'); + console.info('FlexAlign_SpaceAround_FlexMarPad onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'padding') { this.testPadding = message.value; } @@ -36,12 +36,12 @@ struct FlexAlignContent_SpaceAround_03{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ - Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMarPad01') - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMarPad02') - Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMarPad03') - Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMarPad04') + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){ + Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMarPad01'); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMarPad02'); + Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexMarPad03'); + Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexMarPad04'); } .width(200) .height(540) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexPad.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexPad.ets index d60f6c5f8..818d6dc47 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexPad.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexPad.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceAround_02{ - @State testPadding: number = 0 - messageManager:MessageManager = new MessageManager() +struct FlexAlign_SpaceAround_FlexPad{ + @State testPadding: number = 0; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('FlexAlignContent_SpaceAround_02 onPageShow'); + console.info('FlexAlign_SpaceAround_FlexPad onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'padding') { this.testPadding = message.value; } @@ -33,12 +33,12 @@ struct FlexAlignContent_SpaceAround_02{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ - Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexPad01') - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexPad02') - Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexPad03') - Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexPad04') + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){ + Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexPad01'); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexPad02'); + Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexPad03'); + Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexPad04'); } .width(200) .height(540) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexSize.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexSize.ets index c4f5cf05f..885675723 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexSize.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexSize.ets @@ -12,21 +12,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceAround_01{ - @State testWidth: number = 400 - @State testHeight: number = 100 - messageManager:MessageManager = new MessageManager() +struct FlexAlign_SpaceAround_FlexSize{ + @State testWidth: number = 400; + @State testHeight: number = 100; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('FlexAlignContent_SpaceAround_01 onPageShow'); + console.info('FlexAlign_SpaceAround_FlexSize onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'width') { this.testWidth = message.value; } @@ -37,12 +37,12 @@ struct FlexAlignContent_SpaceAround_01{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ - Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexSize01') - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexSize02') - Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexSize03') - Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexSize04') + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){ + Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexSize01'); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexSize02'); + Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_FlexSize03'); + Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_FlexSize04'); } .width(this.testWidth) .height(this.testHeight) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextMar.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextMar.ets index 0f41429ce..27d16424b 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextMar.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextMar.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceAround_04{ +struct FlexAlign_SpaceAround_TextMar{ @State testMargin: number = 0 messageManager:MessageManager = new MessageManager() onPageShow() { - console.info('FlexAlignContent_SpaceAround_01 onPageShow'); + console.info('FlexAlign_SpaceAround_TextMar onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'margin') { this.testMargin = message.value; } @@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceAround_04{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){ Text('1') .width(150) .height(50) .backgroundColor(0xD2B48C) .margin(this.testMargin) - .key('AlignContent_SpaceAround_TextMar01') - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextMar02') - Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextMar03') - Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextMar04') + .key('AlignContent_SpaceAround_TextMar01'); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextMar02'); + Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextMar03'); + Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextMar04'); } .width(200) .height(400) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextOffset.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextOffset.ets index ec7a97d4f..4b0a3ed24 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextOffset.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextOffset.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceAround_05{ - @State testOffset: object = {x:0, y:0} - messageManager:MessageManager = new MessageManager() +struct FlexAlign_SpaceAround_TextOffset{ + @State testOffset: object = { x:0, y:0 }; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('FlexAlignContent_SpaceAround_01 onPageShow'); + console.info('FlexAlign_SpaceAround_TextOffset onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'offset') { this.testOffset = message.value; } @@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceAround_05{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){ Text('1') .width(150) .height(50) .backgroundColor(0xD2B48C) .offset(this.testOffset) - .key('AlignContent_SpaceAround_TextOffset01') - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextOffset02') - Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextOffset03') - Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextOffset04') + .key('AlignContent_SpaceAround_TextOffset01'); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextOffset02'); + Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextOffset03'); + Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextOffset04'); } .width(200) .height(400) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextSize.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextSize.ets index b7e4c0a0b..bdd977fa7 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextSize.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextSize.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceAround_06{ - @State testHeight: number = 50 - messageManager:MessageManager = new MessageManager() +struct FlexAlign_SpaceAround_TextSize{ + @State testHeight: number = 50; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('FlexAlignContent_SpaceAround_01 onPageShow'); + console.info('FlexAlign_SpaceAround_TextSize onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'height') { this.testHeight = message.value; } @@ -33,16 +33,16 @@ struct FlexAlignContent_SpaceAround_06{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){ Text('1') .width(150) .height(this.testHeight) .backgroundColor(0xD2B48C) - .key('AlignContent_SpaceAround_TextSize01') - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextSize02') - Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextSize03') - Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextSize04') + .key('AlignContent_SpaceAround_TextSize01'); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextSize02'); + Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextSize03'); + Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextSize04'); } .width(200) .height(400) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextVisibility.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextVisibility.ets index 610286827..bf1913cd4 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextVisibility.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextVisibility.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceAround_07{ - @State testVisibility: number = Visibility.Visible - messageManager:MessageManager = new MessageManager() +struct AlignContent_SpaceAround_TextVisibility{ + @State testVisibility: number = Visibility.Visible; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('FlexAlignContent_SpaceAround_01 onPageShow'); + console.info('AlignContent_SpaceAround_TextVisibility onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'visibility') { this.testVisibility = message.value; } @@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceAround_07{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap, alignContent:FlexAlign.SpaceAround }){ Text('1') .width(150) .height(50) .backgroundColor(0xD2B48C) .key('AlignContent_SpaceAround_TextVisibility01') - .visibility(this.testVisibility) - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextVisibility02') - Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextVisibility03') - Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextVisibility04') + .visibility(this.testVisibility); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextVisibility02'); + Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceAround_TextVisibility03'); + Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceAround_TextVisibility04'); } .width(200) .height(400) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexMar.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexMar.ets index 245fe3fa0..d279ffe16 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexMar.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexMar.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceBetween_04{ - @State testMargin: number = 0 - messageManager:MessageManager = new MessageManager() +struct FlexAlign_SpaceBetween_FlexMar{ + @State testMargin: number = 0; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); + console.info('FlexAlign_SpaceBetween_FlexMar onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'margin') { this.testMargin = message.value; } @@ -35,10 +35,10 @@ struct FlexAlignContent_SpaceBetween_04{ build(){ Column({space:30}){ Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ - Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMar01') - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMar02') - Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMar03') - Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMar04') + Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMar01'); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMar02'); + Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMar03'); + Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMar04'); } .width(200) .height(540) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexMarPad.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexMarPad.ets index 6e79643fb..0ee821fbb 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexMarPad.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexMarPad.ets @@ -15,17 +15,17 @@ import {MessageManager,Callback} from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceBetween_03{ +struct FlexAlign_SpaceBetween_FlexMarPad{ @State testPadding: number = 0; @State testMargin: number = 0; messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); + console.info('FlexAlign_SpaceBetween_FlexMarPad onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'padding') { this.testPadding = message.value; } @@ -36,12 +36,12 @@ struct FlexAlignContent_SpaceBetween_03{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ - Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMarPad01') - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMarPad02') - Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMarPad03') - Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMarPad04') + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween }){ + Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMarPad01'); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMarPad02'); + Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexMarPad03'); + Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexMarPad04'); } .width(200) .height(540) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexPad.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexPad.ets index 3df1572ff..d9cf5a071 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexPad.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexPad.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceBetween_02{ - @State testPadding: number = 0 - messageManager:MessageManager = new MessageManager() +struct FlexAlign_SpaceBetween_FlexPad{ + @State testPadding: number = 0; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); + console.info('FlexAlign_SpaceBetween_FlexPad onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'padding') { this.testPadding = message.value; } @@ -34,11 +34,11 @@ struct FlexAlignContent_SpaceBetween_02{ } build(){ Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ - Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexPad01') - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexPad02') - Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexPad03') - Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexPad04') + Flex({ wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween }){ + Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexPad01'); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexPad02'); + Text('3').width(150).height(150).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexPad03'); + Text('4').width(150).height(200).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexPad04'); } .width(200) .height(540) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexSize.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexSize.ets index 37bdc308f..e0478f7f0 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexSize.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexSize.ets @@ -12,21 +12,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceBetween_01{ +struct FlexAlign_SpaceBetween_FlexSize{ @State testWidth: number = 400 @State testHeight: number = 100 messageManager:MessageManager = new MessageManager() onPageShow() { - console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); + console.info('FlexAlign_SpaceBetween_FlexSize onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'width') { this.testWidth = message.value; } @@ -37,12 +37,12 @@ struct FlexAlignContent_SpaceBetween_01{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ - Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexSize01') - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexSize02') - Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexSize03') - Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexSize04') + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween }){ + Text('1').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexSize01'); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexSize02'); + Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_FlexSize03'); + Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_FlexSize04'); } .width(this.testWidth) .height(this.testHeight) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextMar.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextMar.ets index df3321f4b..e9dec7de1 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextMar.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextMar.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceBetween_04{ - @State testMargin: number = 0 - messageManager:MessageManager = new MessageManager() +struct FlexAlign_SpaceBetween_TextMar{ + @State testMargin: number = 0; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); + console.info('FlexAlign_SpaceBetween_TextMar onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'margin') { this.testMargin = message.value; } @@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceBetween_04{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween }){ Text('1') .width(150) .height(50) .backgroundColor(0xD2B48C) .margin(this.testMargin) - .key('AlignContent_SpaceBetween_TextMar01') - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextMar02') - Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextMar03') - Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextMar04') + .key('AlignContent_SpaceBetween_TextMar01'); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextMar02'); + Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextMar03'); + Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextMar04'); } .width(200) .height(400) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextOffset.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextOffset.ets index 808bbb94b..74dd0cb26 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextOffset.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextOffset.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceBetween_05{ +struct FlexAlign_SpaceBetween_TextOffset{ @State testOffset: object = {x:0, y:0} messageManager:MessageManager = new MessageManager() onPageShow() { - console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); + console.info('FlexAlign_SpaceBetween_TextOffset onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'offset') { this.testOffset = message.value; } @@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceBetween_05{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween }){ Text('1') .width(150) .height(50) .backgroundColor(0xD2B48C) .offset(this.testOffset) - .key('AlignContent_SpaceBetween_TextOffset01') - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextOffset02') - Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextOffset03') - Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextOffset04') + .key('AlignContent_SpaceBetween_TextOffset01'); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextOffset02'); + Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextOffset03'); + Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextOffset04'); } .width(200) .height(400) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextSize.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextSize.ets index 15d8bca29..9044c665c 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextSize.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextSize.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceBetween_06{ - @State testHeight: number = 50 - messageManager:MessageManager = new MessageManager() +struct FlexAlign_SpaceBetween_TextSize{ + @State testHeight: number = 50; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); + console.info('FlexAlign_SpaceBetween_TextSize onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'height') { this.testHeight = message.value; } @@ -33,16 +33,16 @@ struct FlexAlignContent_SpaceBetween_06{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween }){ Text('1') .width(150) .height(this.testHeight) .backgroundColor(0xD2B48C) - .key('AlignContent_SpaceBetween_TextSize01') - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextSize02') - Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextSize03') - Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextSize04') + .key('AlignContent_SpaceBetween_TextSize01'); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextSize02'); + Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextSize03'); + Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextSize04'); } .width(200) .height(400) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextVisibility.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextVisibility.ets index b5a9f7859..49eae7464 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextVisibility.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextVisibility.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component -struct FlexAlignContent_SpaceBetween_07{ - @State testVisibility: number = Visibility.Visible - messageManager:MessageManager = new MessageManager() +struct FlexAlign_SpaceBetween_TextVisibility{ + @State testVisibility: number = Visibility.Visible; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('FlexAlignContent_SpaceBetween_01 onPageShow'); + console.info('FlexAlign_SpaceBetween_TextVisibility onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'visibility') { this.testVisibility = message.value; } @@ -33,17 +33,17 @@ struct FlexAlignContent_SpaceBetween_07{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - Flex({wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween}){ + Column({ space:30 }){ + Flex({ wrap:FlexWrap.Wrap, alignContent: FlexAlign.SpaceBetween }){ Text('1') .width(150) .height(50) .backgroundColor(0xD2B48C) .key('AlignContent_SpaceBetween_TextVisibility01') - .visibility(this.testVisibility) - Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextVisibility02') - Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextVisibility03') - Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextVisibility04') + .visibility(this.testVisibility); + Text('2').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextVisibility02'); + Text('3').width(150).height(50).backgroundColor(0xD2B48C).key('AlignContent_SpaceBetween_TextVisibility03'); + Text('4').width(150).height(100).backgroundColor(0xF5DEB3).key('AlignContent_SpaceBetween_TextVisibility04'); } .width(200) .height(400) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexAlignSelf.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexAlignSelf.ets index fbf98eee4..a1abf8b59 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexAlignSelf.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexAlignSelf.ets @@ -16,9 +16,9 @@ @Entry @Component struct FlexAlignSelf_Auto { - private content: string = "FlexAlignSelf_Auto Page" + private content: string = "FlexAlignSelf_Auto Page"; onPageShow() { - console.info('FlexAlignSelf_Center page show called'); + console.info('FlexAlignSelf_Auto page show called'); } onBuildDone() { @@ -28,15 +28,15 @@ struct FlexAlignSelf_Auto { build() { Column() { Column() { - Text('FlexTest12').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('FlexTest12').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Auto, wrap: FlexWrap.NoWrap, }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).alignSelf(ItemAlign.End).key('textAlignSelf01') - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textAlignSelf02') - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textAlignSelf03') + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).alignSelf(ItemAlign.End).key('textAlignSelf01'); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textAlignSelf02'); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textAlignSelf03'); } .key('flexAlignSelf') .height(150) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexBase.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexBase.ets index 5ed490d90..f1e336579 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexBase.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexBase.ets @@ -12,21 +12,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component struct FlexBase_Auto { - @State testHeight: number = 150 - @State testWidth: number = 450 - messageManager:MessageManager = new MessageManager() - private content: string = "FlexBase_Auto Page" + @State testHeight: number = 150; + @State testWidth: number = 450; + messageManager:MessageManager = new MessageManager(); + private content: string = "FlexBase_Auto Page"; onPageShow() { - console.info('FlexBase_Center onPageShow'); + console.info('FlexBase_Auto onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'height') { this.testHeight = message.value; } @@ -45,15 +45,15 @@ struct FlexBase_Auto { build() { Column() { Column() { - Text('FlexBase_1').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('FlexBase_1').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Auto, wrap: FlexWrap.NoWrap, }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textFlex01') - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textFlex02') - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textFlex03') + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textFlex01'); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textFlex02'); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textFlex03'); } .key('flex01') .height(this.testHeight) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexExceed.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexExceed.ets index 470ccf011..c2bfe037c 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexExceed.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexExceed.ets @@ -12,7 +12,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component struct FlexExceed_Auto { @@ -21,12 +21,12 @@ struct FlexExceed_Auto { messageManager:MessageManager = new MessageManager() private content: string = "FlexExceed_Auto Page" onPageShow() { - console.info('FlexBase_Center onPageShow'); + console.info('FlexExceed_Auto onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'padding') { this.testPadding = message.value; } @@ -44,15 +44,15 @@ struct FlexExceed_Auto { build() { Column() { Column() { - Text('FlexExceed_1').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('FlexExceed_1').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Auto, wrap: FlexWrap.NoWrap, }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textExceed01') - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textExceed02') - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textExceed03') + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textExceed01'); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textExceed02'); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textExceed03'); } .key('flexExceed01') .height(200) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexHeightModify.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexHeightModify.ets index b1b6e88b0..9a8a658a0 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexHeightModify.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexHeightModify.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component struct FlexHeightModify_Auto { - @State testHeight: number = 50 - messageManager:MessageManager = new MessageManager() - private content: string = "FlexHeightModify_Auto Page" + @State testHeight: number = 50; + messageManager:MessageManager = new MessageManager(); + private content: string = "FlexHeightModify_Auto Page"; onPageShow() { console.info('FlexHeightModify_Auto onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'height') { this.testHeight = message.value; } @@ -40,15 +40,15 @@ struct FlexHeightModify_Auto { build() { Column() { Column() { - Text('FlexHeightModify').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('FlexHeightModify').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Auto, wrap: FlexWrap.NoWrap, }) { - Text('1').width(150).height(this.testHeight).backgroundColor(0xF5DEB3).key('textHeightModify01') - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textHeightModify02') - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textHeightModify03') + Text('1').width(150).height(this.testHeight).backgroundColor(0xF5DEB3).key('textHeightModify01'); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textHeightModify02'); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textHeightModify03'); } .key('flexHeightModify') .height(150) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexMargin.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexMargin.ets index 069713299..637f6a692 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexMargin.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexMargin.ets @@ -17,7 +17,7 @@ @Component struct FlexMargin_Auto { - private content: string = "FlexMargin_Auto Page" + private content: string = "FlexMargin_Auto Page"; onPageShow() { console.info('FlexMargin_Center page show called'); } @@ -29,15 +29,15 @@ struct FlexMargin_Auto { build() { Column() { Column() { - Text('FlexTest05').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('FlexTest05').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Auto, wrap: FlexWrap.NoWrap, }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textFlexMargin01') - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textFlexMargin02') - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textFlexMargin03') + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textFlexMargin01'); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textFlexMargin02'); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textFlexMargin03'); } .key('flexMargin') .height(200) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexOffset.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexOffset.ets index 0318f59e2..8ac440c33 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexOffset.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexOffset.ets @@ -16,7 +16,7 @@ @Entry @Component struct FlexOffset_Auto { - private content: string = "FlexOffset_Auto Page" + private content: string = "FlexOffset_Auto Page"; onPageShow() { console.info('FlexOffset_Auto page show called'); @@ -29,15 +29,15 @@ struct FlexOffset_Auto { build() { Column() { Column() { - Text('FlexTest09').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('FlexTest09').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Auto, wrap: FlexWrap.NoWrap, }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).offset({ x: 15, y: 30 }).key('textOffset01') - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textOffset02') - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textOffset03') + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).offset({ x: 15, y: 30 }).key('textOffset01'); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textOffset02'); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textOffset03'); } .key('flexOffset') .height(150) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexPadding.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexPadding.ets index 8756ec85a..546afe9ff 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexPadding.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexPadding.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component struct FlexPadding_Auto { - @State testPadding: number = 0 - messageManager:MessageManager = new MessageManager() - private content: string = "FlexPadding_Auto Page" + @State testPadding: number = 0; + messageManager:MessageManager = new MessageManager(); + private content: string = "FlexPadding_Auto Page"; onPageShow() { - console.info('FlexBase_Center onPageShow'); + console.info('FlexPadding_Auto onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'padding') { this.testPadding = message.value; } @@ -40,15 +40,15 @@ struct FlexPadding_Auto { build() { Column() { Column() { - Text('FlexPadding_1').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('FlexPadding_1').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Auto, wrap: FlexWrap.NoWrap, }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textFlexPadding01') - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textFlexPadding02') - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textFlexPadding03') + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key('textFlexPadding01'); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textFlexPadding02'); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textFlexPadding03'); } .key('flexPadding01') .height(200) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexTextMargin.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexTextMargin.ets index 5f0e8556d..1d888daf0 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexTextMargin.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexTextMargin.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component struct FlexTextMargin_Auto { - @State testMargin: number = 0 - messageManager:MessageManager = new MessageManager() - private content: string = "FlexTextMargin_Auto Page" + @State testMargin: number = 0; + messageManager:MessageManager = new MessageManager(); + private content: string = "FlexTextMargin_Auto Page"; onPageShow() { console.info('FlexBase_Center onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'margin') { this.testMargin = message.value; } @@ -40,15 +40,15 @@ struct FlexTextMargin_Auto { build() { Column() { Column() { - Text('FlexTextMargin_1').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('FlexTextMargin_1').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Auto, wrap: FlexWrap.NoWrap, }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).margin(this.testMargin).key('textMargin01') - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textMargin02') - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textMargin03') + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).margin(this.testMargin).key('textMargin01'); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textMargin02'); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textMargin03'); } .key('flexTextMargin01') .height(150) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexVisibility.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexVisibility.ets index 36ae4a093..0436d8a57 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexVisibility.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/alignItems/ItemAlign_Auto/FlexVisibility.ets @@ -12,20 +12,20 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component struct FlexVisibility_Auto { - @State testVisibility: number = Visibility.Visible - messageManager:MessageManager = new MessageManager() - private content: string = "FlexVisibility_Auto Page" + @State testVisibility: number = Visibility.Visible; + messageManager:MessageManager = new MessageManager(); + private content: string = "FlexVisibility_Auto Page"; onPageShow() { console.info('FlexVisibility_Auto onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'visibility') { this.testVisibility = message.value; } @@ -39,15 +39,15 @@ struct FlexVisibility_Auto { build() { Column() { Column() { - Text('FlexTest10').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('FlexTest10').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Auto, wrap: FlexWrap.NoWrap, }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).visibility(this.testVisibility).key('textVisible01') - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textVisible02') - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textVisible03') + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).visibility(this.testVisibility).key('textVisible01'); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key('textVisible02'); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key('textVisible03'); } .key('flexVisible') .height(150) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddAlign.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddAlign.ets index dabfde1aa..d5e312c31 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddAlign.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddAlign.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager' +import { MessageManager, Callback } from './../../../../common/MessageManager' @Entry @Component struct AlignCenter_AddAlign { - @State DadAddAlign: number = Alignment.TopStart - messageManager:MessageManager = new MessageManager() + @State DadAddAlign: number = Alignment.TopStart; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_NoSpace onPageShow') + console.info('AlignCenter_AddAlign onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadAddAlign') { this.DadAddAlign = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.Center + @State justifyContent: FlexAlign = FlexAlign.Center; build() { Column() { - Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddAlign_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddAlign_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddAlign_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddAlign_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddAlign_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddAlign_013"); } .key("Center_AddAlign_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddAllSpace.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddAllSpace.ets index 12a02c6f1..b97b0e347 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddAllSpace.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddAllSpace.ets @@ -13,32 +13,32 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignCenter_AddAllSpace { - @State DadAllSpace: number = 10 - messageManager:MessageManager = new MessageManager() + @State DadAllSpace: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddAllSpace onPageShow'); + console.info('AlignCenter_AddAllSpace onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadAllSpace') { this.DadAllSpace = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.Center + @State justifyContent: FlexAlign = FlexAlign.Center; build() { Column() { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddAllSpace_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddAllSpace_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddAllSpace_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddAllSpace_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddAllSpace_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddAllSpace_013"); } .key("Center_AddAllSpace_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddLayoutWeight.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddLayoutWeight.ets index 320105751..e8ce4548a 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddLayoutWeight.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddLayoutWeight.ets @@ -13,21 +13,21 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignCenter_AddLayoutWeight { @State OneLayoutWeight1: number = 1; @State OneLayoutWeight2: number = 1; @State OneLayoutWeight3: number = 1; - messageManager:MessageManager = new MessageManager() + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddLayoutWeight onPageShow'); + console.info('AlignCenter_AddLayoutWeight onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneLayoutWeight1') { this.OneLayoutWeight1 = message.value; } @@ -43,18 +43,18 @@ struct AlignCenter_AddLayoutWeight { @State justifyContent: FlexAlign = FlexAlign.Center build() { Column() { - Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Text('1') .width(150) .height(50) .backgroundColor(0xF5DEB3) .key("Center_AddLayoutWeight_011") - .layoutWeight(this.OneLayoutWeight1) + .layoutWeight(this.OneLayoutWeight1); Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddLayoutWeight_012") - .layoutWeight(this.OneLayoutWeight2) + .layoutWeight(this.OneLayoutWeight2); Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddLayoutWeight_013") - .layoutWeight(this.OneLayoutWeight3) + .layoutWeight(this.OneLayoutWeight3); } .key("Center_AddLayoutWeight_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddMargin.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddMargin.ets index 6dd726014..67a9208f5 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddMargin.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddMargin.ets @@ -13,19 +13,19 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignCenter_AddMargin { - @State DadMargin: number = 10 - messageManager:MessageManager = new MessageManager() + @State DadMargin: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddMargin onPageShow'); + console.info('AlignCenter_AddMargin onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadMargin') { this.DadMargin = message.value; } @@ -36,9 +36,9 @@ struct AlignCenter_AddMargin { build() { Column() { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddMargin_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddMargin_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddMargin_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddMargin_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddMargin_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddMargin_013"); } .key("Center_AddMargin_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddOffset.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddOffset.ets index dabccc723..c7ec85923 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddOffset.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddOffset.ets @@ -13,19 +13,19 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignCenter_AddOffset { - @State OneOffset: object = { x: 0, y: 0 } - messageManager:MessageManager = new MessageManager() + @State OneOffset: object = { x: 0, y: 0 }; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddOffset onPageShow'); + console.info('AlignCenter_AddOffset onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneOffset') { this.OneOffset = message.value; } @@ -35,12 +35,12 @@ struct AlignCenter_AddOffset { @State justifyContent: FlexAlign = FlexAlign.Center build() { Column() { - Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddOffset_011") - .offset(this.OneOffset) - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddOffset_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddOffset_013") + .offset(this.OneOffset); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddOffset_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddOffset_013"); } .key("Center_AddOffset_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddOneMargin.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddOneMargin.ets index e16f4d64b..cc37fbe80 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddOneMargin.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddOneMargin.ets @@ -13,19 +13,19 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignCenter_AddOneMargin { - @State OneMargin: number = 10 - messageManager:MessageManager = new MessageManager() + @State OneMargin: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddOneMargin onPageShow'); + console.info('AlignCenter_AddOneMargin onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneMargin') { this.OneMargin = message.value; } @@ -41,9 +41,9 @@ struct AlignCenter_AddOneMargin { .height(50) .backgroundColor(0xF5DEB3) .key("Center_AddOneMargin_011") - .margin(this.OneMargin) - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddOneMargin_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddOneMargin_013") + .margin(this.OneMargin); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddOneMargin_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddOneMargin_013"); } .key("Center_AddOneMargin_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddOneWidth.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddOneWidth.ets index 33283eb04..f46231f7c 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddOneWidth.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddOneWidth.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignCenter_AddOneWidth { - @State OneWidth: number = 100 - messageManager:MessageManager = new MessageManager() + @State OneWidth: number = 100; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddOneWidth onPageShow'); + console.info('AlignCenter_AddOneWidth onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneWidth') { this.OneWidth = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.Center + @State justifyContent: FlexAlign = FlexAlign.Center; build() { Column() { - Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(this.OneWidth).height(50).backgroundColor(0xF5DEB3).key("Center_AddOneWidth_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddOneWidth_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddOneWidth_013") + Text('1').width(this.OneWidth).height(50).backgroundColor(0xF5DEB3).key("Center_AddOneWidth_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddOneWidth_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddOneWidth_013"); } .key("Center_AddOneWidth_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddPadding.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddPadding.ets index 43b26dcad..2b33f678f 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddPadding.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddPadding.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignCenter_AddPadding { - @State DadPadding: number = 10 - messageManager:MessageManager = new MessageManager() + @State DadPadding: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddPadding onPageShow'); + console.info('AlignCenter_AddPadding onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadPadding') { this.DadPadding = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.Center + @State justifyContent: FlexAlign = FlexAlign.Center; build() { Column() { - Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction:FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddPadding_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddPadding_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddPadding_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_AddPadding_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddPadding_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddPadding_013"); }.key("Center_AddPadding_01") .width(500) .height(200) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddVisibility.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddVisibility.ets index 846b932f9..0316a2799 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddVisibility.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_AddVisibility.ets @@ -13,38 +13,38 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignCenter_AddVisibility { @State OneVisibility: number = Visibility.Visible; - messageManager:MessageManager = new MessageManager() + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddVisibility onPageShow'); + console.info('AlignCenter_AddVisibility onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneVisibility') { this.OneVisibility = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.Center + @State justifyContent: FlexAlign = FlexAlign.Center; build() { Column() { - Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Text('1') .width(150) .height(50) .backgroundColor(0xF5DEB3) .key("Center_AddVisibility_011") - .visibility(this.OneVisibility) - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddVisibility_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddVisibility_013") + .visibility(this.OneVisibility); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_AddVisibility_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_AddVisibility_013"); } .key("Center_AddVisibility_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_NoSpace.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_NoSpace.ets index f8b1414d1..402f0d73e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_NoSpace.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Center/AlignCenter_NoSpace.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignCenter_NoSpace { - @State DadWidth: number = 200 - messageManager:MessageManager = new MessageManager() + @State DadWidth: number = 200; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_NoSpace onPageShow'); + console.info('AlignCenter_NoSpace onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadWidth') { this.DadWidth = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.Center + @State justifyContent: FlexAlign = FlexAlign.Center; build() { Column() { - Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.Center').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_NoSpace_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_NoSpace_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_NoSpace_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Center_NoSpace_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Center_NoSpace_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Center_NoSpace_013"); } .key("Center_NoSpace_01") .width(this.DadWidth) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddAlign.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddAlign.ets index 48373095f..061182a22 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddAlign.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddAlign.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignEnd_AddAlign { - @State DadAddAlign: number = Alignment.TopStart - messageManager:MessageManager = new MessageManager() + @State DadAddAlign: number = Alignment.TopStart; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddAlign onPageShow'); + console.info('AlignEnd_AddAlign onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadAddAlign') { this.DadAddAlign = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.End + @State justifyContent: FlexAlign = FlexAlign.End; build() { Column() { - Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddAlign_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddAlign_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddAlign_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddAlign_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddAlign_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddAlign_013"); } .key("End_AddAlign_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddAllSpace.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddAllSpace.ets index 4deb2c926..ea1a4e430 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddAllSpace.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddAllSpace.ets @@ -13,32 +13,32 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignEnd_AddAllSpace { - @State DadAllSpace: number = 10 - messageManager:MessageManager = new MessageManager() + @State DadAllSpace: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddAllSpace onPageShow'); + console.info('AlignEnd_AddAllSpace onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadAllSpace') { this.DadAllSpace = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.End + @State justifyContent: FlexAlign = FlexAlign.End; build() { Column() { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddAllSpace_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddAllSpace_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddAllSpace_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddAllSpace_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddAllSpace_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddAllSpace_013"); } .key("End_AddAllSpace_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddLayoutWeight.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddLayoutWeight.ets index 276fd5ac9..be3c4f9d6 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddLayoutWeight.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddLayoutWeight.ets @@ -13,21 +13,21 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignEnd_AddLayoutWeight { @State OneLayoutWeight1: number = 1; @State OneLayoutWeight2: number = 1; @State OneLayoutWeight3: number = 1; - messageManager:MessageManager = new MessageManager() + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddLayoutWeight onPageShow'); + console.info('AlignEnd_AddLayoutWeight onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneLayoutWeight1') { this.OneLayoutWeight1 = message.value; } @@ -41,21 +41,21 @@ struct AlignEnd_AddLayoutWeight { } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.End + @State justifyContent: FlexAlign = FlexAlign.End; build() { Column() { - Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Text('1') .width(150) .height(50) .backgroundColor(0xF5DEB3) .key("End_AddLayoutWeight_011") - .layoutWeight( this.OneLayoutWeight1) + .layoutWeight( this.OneLayoutWeight1); Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddLayoutWeight_012") - .layoutWeight( this.OneLayoutWeight2) + .layoutWeight( this.OneLayoutWeight2); Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddLayoutWeight_013") - .layoutWeight( this.OneLayoutWeight3) + .layoutWeight( this.OneLayoutWeight3); } .key("End_AddLayoutWeight_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddMargin.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddMargin.ets index bb23c428a..6aa7602d4 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddMargin.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddMargin.ets @@ -13,32 +13,32 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignEnd_AddMargin { - @State DadMargin: number = 10 - messageManager:MessageManager = new MessageManager() + @State DadMargin: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddMargin onPageShow'); + console.info('AlignEnd_AddMargin onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadMargin') { this.DadMargin = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.End + @State justifyContent: FlexAlign = FlexAlign.End; build() { Column() { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddMargin_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddMargin_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddMargin_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddMargin_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddMargin_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddMargin_013"); } .key("End_AddMargin_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddOffset.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddOffset.ets index d3a500653..7d793ef0a 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddOffset.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddOffset.ets @@ -13,34 +13,34 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignEnd_AddOffset { - @State OneOffset: object = { x: 0, y: 0 } - messageManager:MessageManager = new MessageManager() + @State OneOffset: object = { x: 0, y: 0 }; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddOffset onPageShow'); + console.info('AlignEnd_AddOffset onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneOffset') { this.OneOffset = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.End + @State justifyContent: FlexAlign = FlexAlign.End; build() { Column() { - Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddOffset_011") - .offset(this.OneOffset) - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddOffset_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddOffset_013") + .offset(this.OneOffset); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddOffset_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddOffset_013"); } .key("End_AddOffset_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddOneMargin.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddOneMargin.ets index 4cacd5b80..81302c3a8 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddOneMargin.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddOneMargin.ets @@ -13,26 +13,26 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignEnd_AddOneMargin { - @State OneMargin: number = 10 - messageManager:MessageManager = new MessageManager() + @State OneMargin: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddOneMargin onPageShow'); + console.info('AlignEnd_AddOneMargin onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneMargin') { this.OneMargin = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.End + @State justifyContent: FlexAlign = FlexAlign.End; build() { Column() { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { @@ -41,9 +41,9 @@ struct AlignEnd_AddOneMargin { .height(50) .backgroundColor(0xF5DEB3) .key("End_AddOneMargin_011") - .margin(this.OneMargin) - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddOneMargin_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddOneMargin_013") + .margin(this.OneMargin); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddOneMargin_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddOneMargin_013"); } .key("End_AddOneMargin_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddOneWidth.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddOneWidth.ets index 6cb4deb84..bebbcc0d2 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddOneWidth.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddOneWidth.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignEnd_AddOneWidth { - @State OneWidth: number = 100 - messageManager:MessageManager = new MessageManager() + @State OneWidth: number = 100; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddOneWidth onPageShow'); + console.info('AlignEnd_AddOneWidth onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneWidth') { this.OneWidth = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.End + @State justifyContent: FlexAlign = FlexAlign.End; build() { Column() { - Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(this.OneWidth).height(50).backgroundColor(0xF5DEB3).key("End_AddOneWidth_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddOneWidth_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddOneWidth_013") + Text('1').width(this.OneWidth).height(50).backgroundColor(0xF5DEB3).key("End_AddOneWidth_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddOneWidth_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddOneWidth_013"); } .key("End_AddOneWidth_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddPadding.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddPadding.ets index 03c762a17..99638ddaf 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddPadding.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddPadding.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignEnd_AddPadding { - @State DadPadding: number = 10 - messageManager:MessageManager = new MessageManager() + @State DadPadding: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddPadding onPageShow'); + console.info('AlignEnd_AddPadding onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadPadding') { this.DadPadding = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.End + @State justifyContent: FlexAlign = FlexAlign.End; build() { Column() { - Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction:FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddPadding_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddPadding_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddPadding_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_AddPadding_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddPadding_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddPadding_013"); }.key("End_AddPadding_01") .width(500) .height(200) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddVisibility.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddVisibility.ets index 7ad1fcfd7..185d07ae9 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddVisibility.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_AddVisibility.ets @@ -13,38 +13,38 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignEnd_AddVisibility { @State OneVisibility: number = Visibility.Visible; - messageManager:MessageManager = new MessageManager() + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddVisibility onPageShow'); + console.info('AlignEnd_AddVisibility onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneVisibility') { this.OneVisibility = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.End + @State justifyContent: FlexAlign = FlexAlign.End; build() { Column() { - Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Text('1') .width(150) .height(50) .backgroundColor(0xF5DEB3) .key("End_AddVisibility_011") - .visibility(this.OneVisibility) - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddVisibility_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddVisibility_013") + .visibility(this.OneVisibility); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_AddVisibility_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_AddVisibility_013"); } .key("End_AddVisibility_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_NoSpace.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_NoSpace.ets index 9a7d356c7..070dd4bba 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_NoSpace.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/End/AlignEnd_NoSpace.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignEnd_NoSpace { - @State DadWidth: number = 200 - messageManager:MessageManager = new MessageManager() + @State DadWidth: number = 200; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_NoSpace onPageShow'); + console.info('AlignEnd_NoSpace onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadWidth') { this.DadWidth = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.End + @State justifyContent: FlexAlign = FlexAlign.End; build() { Column() { - Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.End').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_NoSpace_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_NoSpace_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_NoSpace_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("End_NoSpace_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("End_NoSpace_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("End_NoSpace_013"); } .key("End_NoSpace_01") .width(this.DadWidth) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAlign.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAlign.ets index 90f2b8f1e..dee86a986 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAlign.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAlign.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignSpaceEvenly_AddAlign { @State DadAddAlign: number = Alignment.TopStart; - messageManager:MessageManager = new MessageManager() + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_NoSpace onPageShow'); + console.info('AlignSpaceEvenly_AddAlign onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadAddAlign') { this.DadAddAlign = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly + @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly; build() { Column() { - Text('justifyContent:FlexAlign.SpaceEvenly').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.SpaceEvenly').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddAlign_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddAlign_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddAlign_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddAlign_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddAlign_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddAlign_013"); } .key("SpaceEvenly_AddAlign_01") .width(500) 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 d4f404003..dc6433262 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 @@ -13,32 +13,32 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignSpaceEvenly_AddAllSpace { - @State DadAllSpace: number = 10 - messageManager:MessageManager = new MessageManager() + @State DadAllSpace: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { console.info('AlignSpaceEvenly_AddAllSpace onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadAllSpace') { this.DadAllSpace = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly + @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly; build() { Column() { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddAllSpace_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddAllSpace_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddAllSpace_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddAllSpace_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddAllSpace_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddAllSpace_013"); } .key("SpaceEvenly_AddAllSpace_01") .width(500) 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 d656f4a0d..dec7e0660 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 @@ -13,21 +13,21 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignSpaceEvenly_AddLayoutWeight { @State OneLayoutWeight1: number = 1; @State OneLayoutWeight2: number = 1; @State OneLayoutWeight3: number = 1; - messageManager:MessageManager = new MessageManager() + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_NoSpace onPageShow'); + console.info('AlignSpaceEvenly_AddLayoutWeight onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneLayoutWeight1') { this.OneLayoutWeight1 = message.value; } @@ -40,7 +40,7 @@ struct AlignSpaceEvenly_AddLayoutWeight { } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly + @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly; build() { Column() { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { @@ -49,19 +49,19 @@ struct AlignSpaceEvenly_AddLayoutWeight { .height(50) .backgroundColor(0xF5DEB3) .key("SpaceEvenly_AddLayoutWeight_011") - .layoutWeight(this.OneLayoutWeight1) + .layoutWeight(this.OneLayoutWeight1); Text('2') .width(150) .height(100) .backgroundColor(0xD2B48C) .key("SpaceEvenly_AddLayoutWeight_012") - .layoutWeight(this.OneLayoutWeight2) + .layoutWeight(this.OneLayoutWeight2); Text('3') .width(150) .height(150) .backgroundColor(0xF5DEB3) .key("SpaceEvenly_AddLayoutWeight_013") - .layoutWeight(this.OneLayoutWeight3) + .layoutWeight(this.OneLayoutWeight3); } .key("SpaceEvenly_AddLayoutWeight_01") .width(500) 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 1395a0578..6ca88a154 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 @@ -13,32 +13,32 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignSpaceEvenly_AddMargin { - @State DadMargin: number = 10 - messageManager:MessageManager = new MessageManager() + @State DadMargin: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { console.info('AlignSpaceEvenly_AddMargin onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadMargin') { this.DadMargin = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly + @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly; build() { Column() { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddMargin_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddMargin_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddMargin_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddMargin_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddMargin_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddMargin_013"); } .key("SpaceEvenly_AddMargin_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOffset.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOffset.ets index cb3211a4c..5a1b5a723 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOffset.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOffset.ets @@ -13,34 +13,34 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignSpaceEvenly_AddOffset { - @State OneOffset: object = { x: 0, y: 0 } - messageManager:MessageManager = new MessageManager() + @State OneOffset: object = { x: 0, y: 0 }; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_NoSpace onPageShow'); + console.info('AlignSpaceEvenly_AddOffset onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneOffset') { this.OneOffset = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly + @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly; build() { Column() { - Text('justifyContent:FlexAlign.SpaceEvenly').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.SpaceEvenly').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddOffset_011") - .offset(this.OneOffset) - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddOffset_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddOffset_013") + .offset(this.OneOffset); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddOffset_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddOffset_013"); } .key("SpaceEvenly_AddOffset_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneMargin.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneMargin.ets index 339d039af..8ab9ace54 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneMargin.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneMargin.ets @@ -13,26 +13,26 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignSpaceEvenly_AddOneMargin { - @State OneMargin: number = 10 - messageManager:MessageManager = new MessageManager() + @State OneMargin: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { console.info('AlignSpaceEvenly_AddOneMargin onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneMargin') { this.OneMargin = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly + @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly; build() { Column() { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { @@ -41,9 +41,9 @@ struct AlignSpaceEvenly_AddOneMargin { .height(50) .backgroundColor(0xF5DEB3) .key("SpaceEvenly_AddOneMargin_011") - .margin(this.OneMargin) - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddOneMargin_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddOneMargin_013") + .margin(this.OneMargin); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddOneMargin_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddOneMargin_013"); } .key("SpaceEvenly_AddOneMargin_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneWidth.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneWidth.ets index d83615c02..50c586811 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneWidth.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneWidth.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import { MessageManager,Callback } from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignSpaceEvenly_AddOneWidth { - @State OneWidth: number = 100 - messageManager:MessageManager = new MessageManager() + @State OneWidth: number = 100; + messageManager:MessageManager = new MessageManager(); onPageShow() { console.info('AlignSpaceEvenly_NoSpace onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneWidth') { this.OneWidth = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly + @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly; build() { Column() { - Text('justifyContent:FlexAlign.SpaceEvenly').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.SpaceEvenly').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(this.OneWidth).height(50).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddOneWidth_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddOneWidth_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddOneWidth_013") + Text('1').width(this.OneWidth).height(50).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddOneWidth_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddOneWidth_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddOneWidth_013"); } .key("SpaceEvenly_AddOneWidth_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddPadding.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddPadding.ets index a0db8d614..a6c33893e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddPadding.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddPadding.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignSpaceEvenly_AddPadding { - @State DadPadding: number = 10 - messageManager:MessageManager = new MessageManager() + @State DadPadding: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { console.info('AlignSpaceEvenly_AddPadding onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadPadding') { this.DadPadding = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly + @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly; build() { Column() { - Text('justifyContent:FlexAlign.SpaceEvenly').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.SpaceEvenly').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction:FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddPadding_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddPadding_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddPadding_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddPadding_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddPadding_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddPadding_013"); } .key("SpaceEvenly_AddPadding_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddVisibility.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddVisibility.ets index 7b0ec4469..664951f0e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddVisibility.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddVisibility.ets @@ -13,38 +13,38 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignSpaceEvenly_AddVisibility { @State OneVisibility: number = Visibility.Visible; - messageManager:MessageManager = new MessageManager() + messageManager:MessageManager = new MessageManager(); onPageShow() { console.info('AlignSpaceEvenly_AddVisibility onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneVisibility') { this.OneVisibility = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly + @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly; build() { Column() { - Text('justifyContent:FlexAlign.SpaceEvenly').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.SpaceEvenly').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Text('1') .width(150) .height(50) .backgroundColor(0xF5DEB3) .key("SpaceEvenly_AddVisibility_011") - .visibility(this.OneVisibility) - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddVisibility_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddVisibility_013") + .visibility(this.OneVisibility); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_AddVisibility_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_AddVisibility_013"); } .key("SpaceEvenly_AddVisibility_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_NoSpace.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_NoSpace.ets index b363c3467..7aecb9d57 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_NoSpace.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_NoSpace.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignSpaceEvenly_NoSpace { - @State DadWidth: number = 200 - messageManager:MessageManager = new MessageManager() + @State DadWidth: number = 200; + messageManager:MessageManager = new MessageManager(); onPageShow() { console.info('AlignSpaceEvenly_NoSpace onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadWidth') { this.DadWidth = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly + @State justifyContent: FlexAlign = FlexAlign.SpaceEvenly; build() { Column() { - Text('justifyContent:FlexAlign.SpaceEvenly').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.SpaceEvenly').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("SpaceEvenly_NoSpace_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_NoSpace_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_NoSpace_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("SpaceEvenly_NoSpace_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("SpaceEvenly_NoSpace_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("SpaceEvenly_NoSpace_013"); } .key("SpaceEvenly_NoSpace_01") .width(this.DadWidth) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddAlign.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddAlign.ets index aec8dc9bd..d4eb04e67 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddAlign.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddAlign.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignStart_AddAlign { - @State DadAddAlign: number = Alignment.TopStart - messageManager:MessageManager = new MessageManager() + @State DadAddAlign: number = Alignment.TopStart; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_NoSpace onPageShow'); + console.info('AlignStart_AddAlign onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadAddAlign') { this.DadAddAlign = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.Start + @State justifyContent: FlexAlign = FlexAlign.Start; build() { Column() { - Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Start_AddAlign_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddAlign_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddAlign_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Start_AddAlign_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddAlign_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddAlign_013"); } .key("Start_AddAlign_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddAllSpace.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddAllSpace.ets index a9d5ec9e5..281142c87 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddAllSpace.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddAllSpace.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignStart_AddAllSpace { - @State DadAllSpace: number = 10 - messageManager: MessageManager = new MessageManager() + @State DadAllSpace: number = 10; + messageManager: MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddAllSpace onPageShow'); + console.info('AlignStart_AddAllSpace onPageShow'); globalThis.value = { name: 'messageManager', message: this.messageManager } let callback: Callback = (message: any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadAllSpace') { this.DadAllSpace = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.Start + @State justifyContent: FlexAlign = FlexAlign.Start; build() { Column() { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Start_AddAllSpace_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddAllSpace_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddAllSpace_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Start_AddAllSpace_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddAllSpace_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddAllSpace_013"); } .key("Start_AddAllSpace_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddLayoutWeight.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddLayoutWeight.ets index ab2ac2a92..f5355afd9 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddLayoutWeight.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddLayoutWeight.ets @@ -13,21 +13,21 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignStart_AddLayoutWeight { @State OneLayoutWeight1: number = 1; @State OneLayoutWeight2: number = 1; @State OneLayoutWeight3: number = 1; - messageManager:MessageManager = new MessageManager() + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_NoSpace onPageShow'); + console.info('AlignStart_AddLayoutWeight onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneLayoutWeight1') { this.OneLayoutWeight1 = message.value; } @@ -43,18 +43,18 @@ struct AlignStart_AddLayoutWeight { @State justifyContent: FlexAlign = FlexAlign.Start build() { Column() { - Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Text('1') .width(150) .height(50) .backgroundColor(0xF5DEB3) .key("Start_AddLayoutWeight_011") - .layoutWeight(this.OneLayoutWeight1) + .layoutWeight(this.OneLayoutWeight1); Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddLayoutWeight_012") - .layoutWeight(this.OneLayoutWeight2) + .layoutWeight(this.OneLayoutWeight2); Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddLayoutWeight_013") - .layoutWeight(this.OneLayoutWeight3) + .layoutWeight(this.OneLayoutWeight3); } .key("Start_AddLayoutWeight_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddMargin.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddMargin.ets index 85886567b..2e7e08a74 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddMargin.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddMargin.ets @@ -13,32 +13,32 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignStart_AddMargin { - @State DadMargin: number = 10 - messageManager:MessageManager = new MessageManager() + @State DadMargin: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddMargin onPageShow'); + console.info('AlignStart_AddMargin onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadMargin') { this.DadMargin = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.Start + @State justifyContent: FlexAlign = FlexAlign.Start; build() { Column() { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Start_AddMargin_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddMargin_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddMargin_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Start_AddMargin_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddMargin_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddMargin_013"); } .key("Start_AddMargin_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddOffset.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddOffset.ets index 0519b516b..3d982ca6b 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddOffset.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddOffset.ets @@ -13,34 +13,34 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignStart_AddOffset { - @State OneOffset: object = { x: 0, y: 0 } - messageManager:MessageManager = new MessageManager() + @State OneOffset: object = { x: 0, y: 0 }; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddOffset onPageShow'); + console.info('AlignStart_AddOffset onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneOffset') { this.OneOffset = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.Start + @State justifyContent: FlexAlign = FlexAlign.Start; build() { Column() { - Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Start_AddOffset_011") - .offset(this.OneOffset) - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddOffset_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddOffset_013") + .offset(this.OneOffset); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddOffset_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddOffset_013"); } .key("Start_AddOffset_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddOneMargin.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddOneMargin.ets index 0b453c0cd..e0862c630 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddOneMargin.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddOneMargin.ets @@ -13,26 +13,26 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignStart_AddOneMargin { - @State OneMargin: number = 10 - messageManager:MessageManager = new MessageManager() + @State OneMargin: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddOneMargin onPageShow'); + console.info('AlignStart_AddOneMargin onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneMargin') { this.OneMargin = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.Start + @State justifyContent: FlexAlign = FlexAlign.Start; build() { Column() { Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { @@ -41,9 +41,9 @@ struct AlignStart_AddOneMargin { .height(50) .backgroundColor(0xF5DEB3) .key("Start_AddOneMargin_011") - .margin(this.OneMargin) - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddOneMargin_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddOneMargin_013") + .margin(this.OneMargin); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddOneMargin_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddOneMargin_013"); } .key("Start_AddOneMargin_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddOneWidth.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddOneWidth.ets index cc3d7bd14..e1f457214 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddOneWidth.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddOneWidth.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignStart_AddOneWidth { - @State OneWidth: number = 100 - messageManager:MessageManager = new MessageManager() + @State OneWidth: number = 100; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_NoSpace onPageShow'); + console.info('AlignStart_AddOneWidth onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneWidth') { this.OneWidth = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.Start + @State justifyContent: FlexAlign = FlexAlign.Start; build() { Column() { - Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(this.OneWidth).height(50).backgroundColor(0xF5DEB3).key("Start_AddOneWidth_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddOneWidth_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddOneWidth_013") + Text('1').width(this.OneWidth).height(50).backgroundColor(0xF5DEB3).key("Start_AddOneWidth_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddOneWidth_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddOneWidth_013"); } .key("Start_AddOneWidth_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddPadding.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddPadding.ets index c6169df3f..984c2e5c9 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddPadding.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddPadding.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignStart_AddPadding { - @State DadPadding: number = 10 - messageManager:MessageManager = new MessageManager() + @State DadPadding: number = 10; + messageManager:MessageManager = new MessageManager(); onPageShow() { console.info('AlignSpaceEvenly_AddPadding onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadPadding') { this.DadPadding = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.Start + @State justifyContent: FlexAlign = FlexAlign.Start; build() { Column() { - Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction:FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Start_AddPadding_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddPadding_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddPadding_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Start_AddPadding_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddPadding_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddPadding_013"); }.key("Start_AddPadding_01") .width(500) .height(200) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddVisibility.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddVisibility.ets index 7eecee7b7..0ce21ee5b 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddVisibility.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_AddVisibility.ets @@ -13,19 +13,19 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignStart_AddVisibility { @State OneVisibility: number = Visibility.Visible; - messageManager: MessageManager = new MessageManager() + messageManager: MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_AddVisibility onPageShow'); + console.info('AlignStart_AddVisibility onPageShow'); globalThis.value = { name: 'messageManager', message: this.messageManager } let callback: Callback = (message: any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'OneVisibility') { this.OneVisibility = message.value; } @@ -33,20 +33,20 @@ struct AlignStart_AddVisibility { this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.Start + @State justifyContent: FlexAlign = FlexAlign.Start; build() { Column() { - Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { Text('1') .width(150) .height(50) .backgroundColor(0xF5DEB3) .key("Start_AddVisibility_011") - .visibility(this.OneVisibility) - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddVisibility_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddVisibility_013") + .visibility(this.OneVisibility); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_AddVisibility_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_AddVisibility_013"); } .key("Start_AddVisibility_01") .width(500) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_NoSpace.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_NoSpace.ets index afc74523f..bc9d20cbf 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_NoSpace.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Flex/justifyContent/Start/AlignStart_NoSpace.ets @@ -13,33 +13,33 @@ * limitations under the License. */ -import {MessageManager,Callback} from './../../../../common/MessageManager'; +import { MessageManager, Callback } from './../../../../common/MessageManager'; @Entry @Component struct AlignStart_NoSpace { - @State DadWidth: number = 200 - messageManager:MessageManager = new MessageManager() + @State DadWidth: number = 200; + messageManager:MessageManager = new MessageManager(); onPageShow() { - console.info('AlignSpaceEvenly_NoSpace onPageShow'); + console.info('AlignStart_NoSpace onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'DadWidth') { this.DadWidth = message.value; } } this.messageManager.registerCallback(callback); } - @State justifyContent: FlexAlign = FlexAlign.Start + @State justifyContent: FlexAlign = FlexAlign.Start; build() { Column() { - Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%') + Text('justifyContent:FlexAlign.Start').fontSize(9).fontColor(0xCCCCCC).width('90%'); Flex({ justifyContent: this.justifyContent, direction: FlexDirection.Row }) { - Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Start_NoSpace_011") - Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_NoSpace_012") - Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_NoSpace_013") + Text('1').width(150).height(50).backgroundColor(0xF5DEB3).key("Start_NoSpace_011"); + Text('2').width(150).height(100).backgroundColor(0xD2B48C).key("Start_NoSpace_012"); + Text('3').width(150).height(150).backgroundColor(0xF5DEB3).key("Start_NoSpace_013"); } .key("Start_NoSpace_01") .width(this.DadWidth) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_Gap.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_Gap.ets index afab24f75..a55a37c0e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_Gap.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_Gap.ets @@ -12,22 +12,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component struct Grid_RowCol_Gap{ @State addColumnGap: number = 5; @State addRowGap: number = 0; - messageManager:MessageManager = new MessageManager() - private content: string = "Grid_RowCol_Gap Page" + messageManager:MessageManager = new MessageManager(); + private content: string = "Grid_RowCol_Gap Page"; onPageShow() { console.info('Grid_RowCol_Gap page show called'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'addColumnGap') { this.addColumnGap = message.value; } @@ -46,16 +46,16 @@ struct Grid_RowCol_Gap{ Column() { Grid() { GridItem() { - Text('1').fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%') + Text('1').fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%'); }.key('Grid_RowCol_Gap_011') GridItem() { - Text('2').fontSize(16).backgroundColor(0xF5DEB3).width('100%').height('100%') + Text('2').fontSize(16).backgroundColor(0xF5DEB3).width('100%').height('100%'); }.key('Grid_RowCol_Gap_012') GridItem() { - Text('3').fontSize(16).backgroundColor(0xD2B48C).width('100%').height('100%') + Text('3').fontSize(16).backgroundColor(0xD2B48C).width('100%').height('100%'); }.key('Grid_RowCol_Gap_013') GridItem() { - Text('4').fontSize(16).backgroundColor(0xffa500).width('100%').height('100%') + Text('4').fontSize(16).backgroundColor(0xffa500).width('100%').height('100%'); }.key('Grid_RowCol_Gap_014') } .columnsTemplate("1fr 1fr") diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_GridSize.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_GridSize.ets index f7844a25f..e962cc7e0 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_GridSize.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_GridSize.ets @@ -12,21 +12,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component struct Grid_RowCol_GridSize { @State changeHeight: number = 200; - messageManager:MessageManager = new MessageManager() - private content: string = "Grid_RowCol_GridSize Page" + messageManager:MessageManager = new MessageManager(); + private content: string = "Grid_RowCol_GridSize Page"; onPageShow() { console.info('Grid_RowCol_GridSize page show called'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'changeHeight') { this.changeHeight = message.value; } @@ -42,16 +42,16 @@ struct Grid_RowCol_GridSize { Column() { Grid() { GridItem() { - Text('1').fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%') + Text('1').fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%'); }.key('Grid_RowCol_GridSize_011') GridItem() { - Text('2').fontSize(16).backgroundColor(0xF5DEB3).width('100%').height('100%') + Text('2').fontSize(16).backgroundColor(0xF5DEB3).width('100%').height('100%'); }.key('Grid_RowCol_GridSize_012') GridItem() { - Text('3').fontSize(16).backgroundColor(0xD2B48C).width('100%').height('100%') + Text('3').fontSize(16).backgroundColor(0xD2B48C).width('100%').height('100%'); }.key('Grid_RowCol_GridSize_013') GridItem() { - Text('4').fontSize(16).backgroundColor(0xffa500).width('100%').height('100%') + Text('4').fontSize(16).backgroundColor(0xffa500).width('100%').height('100%'); }.key('Grid_RowCol_GridSize_014') } .columnsTemplate("1fr 1fr") diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_LayoutDirection.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_LayoutDirection.ets index 2cc07e714..08b35f2d8 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_LayoutDirection.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_LayoutDirection.ets @@ -12,21 +12,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component struct Grid_RowCol_LayoutDirection { @State addLayoutDirection: number = GridDirection.RowReverse; - messageManager:MessageManager = new MessageManager() - private content: string = "Grid_RowCol_LayoutDirection Page" + messageManager:MessageManager = new MessageManager(); + private content: string = "Grid_RowCol_LayoutDirection Page"; onPageShow() { console.info('Grid_RowCol_LayoutDirection page show called'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'addLayoutDirection') { this.addLayoutDirection = message.value; } @@ -42,16 +42,16 @@ struct Grid_RowCol_LayoutDirection { Column() { Grid() { GridItem() { - Text('1').fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%') + Text('1').fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%'); }.key('Grid_RowCol_LayoutDirection_011') GridItem() { - Text('2').fontSize(16).backgroundColor(0xF5DEB3).width('100%').height('100%') + Text('2').fontSize(16).backgroundColor(0xF5DEB3).width('100%').height('100%'); }.key('Grid_RowCol_LayoutDirection_012') GridItem() { - Text('3').fontSize(16).backgroundColor(0xD2B48C).width('100%').height('100%') + Text('3').fontSize(16).backgroundColor(0xD2B48C).width('100%').height('100%'); }.key('Grid_RowCol_LayoutDirection_013') GridItem() { - Text('4').fontSize(16).backgroundColor(0xffa500).width('100%').height('100%') + Text('4').fontSize(16).backgroundColor(0xffa500).width('100%').height('100%'); }.key('Grid_RowCol_LayoutDirection_014') } .columnsTemplate('1fr 1fr') diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_PadMar.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_PadMar.ets index 145dd9bab..06e8ce431 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_PadMar.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_PadMar.ets @@ -12,22 +12,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component struct Grid_RowCol_PadMar { - @State addPadding: number = 10 - @State addMargin: number = 0 - messageManager:MessageManager = new MessageManager() - private content: string = "Grid_RowCol_PadMar Page" + @State addPadding: number = 10; + @State addMargin: number = 0; + messageManager:MessageManager = new MessageManager(); + private content: string = "Grid_RowCol_PadMar Page"; onPageShow() { console.info('Grid_RowCol_PadMar page show called'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'addPadding') { this.addPadding = message.value; } @@ -46,16 +46,16 @@ struct Grid_RowCol_PadMar { Column() { Grid() { GridItem() { - Text('1').fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%') + Text('1').fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%'); }.key('Grid_RowCol_PadMar_011') GridItem() { - Text('2').fontSize(16).backgroundColor(0xF5DEB3).width('100%').height('100%') + Text('2').fontSize(16).backgroundColor(0xF5DEB3).width('100%').height('100%'); }.key('Grid_RowCol_PadMar_012') GridItem() { - Text('3').fontSize(16).backgroundColor(0xD2B48C).width('100%').height('100%') + Text('3').fontSize(16).backgroundColor(0xD2B48C).width('100%').height('100%'); }.key('Grid_RowCol_PadMar_013') GridItem() { - Text('4').fontSize(16).backgroundColor(0xffa500).width('100%').height('100%') + Text('4').fontSize(16).backgroundColor(0xffa500).width('100%').height('100%'); }.key('Grid_RowCol_PadMar_014') } .columnsTemplate("1fr 1fr") diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_cellLength.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_cellLength.ets index f5244b04e..c18335d2a 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_cellLength.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_cellLength.ets @@ -12,21 +12,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component struct Grid_RowCol_cellLength { @State addCellLength: number = 50; - messageManager:MessageManager = new MessageManager() - private content: string = "Grid_RowCol_cellLength Page" + messageManager:MessageManager = new MessageManager(); + private content: string = "Grid_RowCol_cellLength Page"; onPageShow() { console.info('Grid_RowCol_cellLength page show called'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'addCellLength') { this.addCellLength = message.value; } @@ -42,16 +42,16 @@ struct Grid_RowCol_cellLength { Column() { Grid() { GridItem() { - Text('1').fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%') + Text('1').fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%'); }.key('Grid_RowCol_cellLength_011') GridItem() { - Text('2').fontSize(16).backgroundColor(0xF5DEB3).width('100%').height('100%') + Text('2').fontSize(16).backgroundColor(0xF5DEB3).width('100%').height('100%'); }.key('Grid_RowCol_cellLength_012') GridItem() { - Text('3').fontSize(16).backgroundColor(0xD2B48C).width('100%').height('100%') + Text('3').fontSize(16).backgroundColor(0xD2B48C).width('100%').height('100%'); }.key('Grid_RowCol_cellLength_013') GridItem() { - Text('4').fontSize(16).backgroundColor(0xffa500).width('100%').height('100%') + Text('4').fontSize(16).backgroundColor(0xffa500).width('100%').height('100%'); }.key('Grid_RowCol_cellLength_014') } .columnsTemplate('1fr 1fr') diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_maxCount.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_maxCount.ets index 5e13a9566..02cf5eef9 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_maxCount.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_maxCount.ets @@ -12,21 +12,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component struct Grid_RowCol_maxCount { @State addMaxCount: number = 1; - messageManager:MessageManager = new MessageManager() - private content: string = "Grid_RowCol_maxCount Page" + messageManager:MessageManager = new MessageManager(); + private content: string = "Grid_RowCol_maxCount Page"; onPageShow() { console.info('Grid_RowCol_maxCount page show called'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'addMaxCount') { this.addMaxCount = message.value; } @@ -42,16 +42,16 @@ struct Grid_RowCol_maxCount { Column() { Grid() { GridItem() { - Text('1').fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%') + Text('1').fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%'); }.key('Grid_RowCol_maxCount_011') GridItem() { - Text('2').fontSize(16).backgroundColor(0xF5DEB3).width('100%').height('100%') + Text('2').fontSize(16).backgroundColor(0xF5DEB3).width('100%').height('100%'); }.key('Grid_RowCol_maxCount_012') GridItem() { - Text('3').fontSize(16).backgroundColor(0xD2B48C).width('100%').height('100%') + Text('3').fontSize(16).backgroundColor(0xD2B48C).width('100%').height('100%'); }.key('Grid_RowCol_maxCount_013') GridItem() { - Text('4').fontSize(16).backgroundColor(0xffa500).width('100%').height('100%') + Text('4').fontSize(16).backgroundColor(0xffa500).width('100%').height('100%'); }.key('Grid_RowCol_maxCount_014') } .columnsTemplate('1fr 1fr') diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridTemplateChange/Grid_RowCol_TemplateChange.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridTemplateChange/Grid_RowCol_TemplateChange.ets index 283e317ba..512297aa4 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridTemplateChange/Grid_RowCol_TemplateChange.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Grid/GridTemplatesAllSet/GridTemplateChange/Grid_RowCol_TemplateChange.ets @@ -12,22 +12,22 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../../common/MessageManager'; @Entry @Component struct Grid_RowCol_TemplateChange { - @State testColumnsTemplate: string = '1fr 1fr' - @State testRowsTemplate: string = '1fr 1fr' - messageManager:MessageManager = new MessageManager() - private content: string = "Grid_RowCol_TemplateChange Page" + @State testColumnsTemplate: string = '1fr 1fr'; + @State testRowsTemplate: string = '1fr 1fr'; + messageManager:MessageManager = new MessageManager(); + private content: string = "Grid_RowCol_TemplateChange Page"; onPageShow() { console.info('Grid_RowCol_TemplateChange page show called'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'testColumnsTemplate') { this.testColumnsTemplate = message.value; } @@ -46,16 +46,16 @@ struct Grid_RowCol_TemplateChange { Column() { Grid() { GridItem() { - Text('1').fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%') + Text('1').fontSize(16).backgroundColor(0xF9CF93).width('100%').height('100%'); }.key('GridTemplateChange_Grid_011') GridItem() { - Text('2').fontSize(16).backgroundColor(0xF5DEB3).width('100%').height('100%') + Text('2').fontSize(16).backgroundColor(0xF5DEB3).width('100%').height('100%'); }.key('GridTemplateChange_Grid_012') GridItem() { - Text('3').fontSize(16).backgroundColor(0xD2B48C).width('100%').height('100%') + Text('3').fontSize(16).backgroundColor(0xD2B48C).width('100%').height('100%'); }.key('GridTemplateChange_Grid_013') GridItem() { - Text('4').fontSize(16).backgroundColor(0xffa500).width('100%').height('100%') + Text('4').fontSize(16).backgroundColor(0xffa500).width('100%').height('100%'); }.key('GridTemplateChange_Grid_014') } .columnsTemplate(this.testColumnsTemplate) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/List/List_SpaceChange/List_SpaceChange.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/List/List_SpaceChange/List_SpaceChange.ets index 22b0d697b..bc04eb732 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/List/List_SpaceChange/List_SpaceChange.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/List/List_SpaceChange/List_SpaceChange.ets @@ -25,7 +25,7 @@ struct List_SpaceChange{ name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'Space') { this.testSpace = message.value; } @@ -33,8 +33,8 @@ struct List_SpaceChange{ this.messageManager.registerCallback(callback); } build(){ - Column({space:30}){ - List({space:this.testSpace}){ + Column({ space:30 }){ + List({ space:this.testSpace }){ ListItem() { Text('1').width('100%').height('100%').backgroundColor(0xF5DEB3); } diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Row/spaceChanged/Row_Space.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Row/spaceChanged/Row_Space.ets index 820cfca08..da54b5e44 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Row/spaceChanged/Row_Space.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Row/spaceChanged/Row_Space.ets @@ -12,19 +12,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import {MessageManager,Callback} from '../../../common/MessageManager'; +import { MessageManager, Callback } from '../../../common/MessageManager'; @Entry @Component struct Row_Space{ - @State addSpace: number = 5 - messageManager:MessageManager = new MessageManager() + @State addSpace: number = 5; + messageManager:MessageManager = new MessageManager(); onPageShow() { console.info('Row_Space onPageShow'); globalThis.value = { name:'messageManager',message:this.messageManager } let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'addSpace') { this.addSpace = message.value; } @@ -33,9 +33,9 @@ struct Row_Space{ } build(){ Row({space:this.addSpace}){ - Text('1').width(100).height(50).backgroundColor(0xF5DEB3).key('Row_Space_011') - Text('2').width(100).height(100).backgroundColor(0xD2B48C).key('Row_Space_012') - Text('3').width(100).height(150).backgroundColor(0xF5DEB3).key('Row_Space_013') + Text('1').width(100).height(50).backgroundColor(0xF5DEB3).key('Row_Space_011'); + Text('2').width(100).height(100).backgroundColor(0xD2B48C).key('Row_Space_012'); + Text('3').width(100).height(150).backgroundColor(0xF5DEB3).key('Row_Space_013'); } .width(350) .height(200) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Tabs/Tabs_ParmsChange/Tabs_WidHei.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Tabs/Tabs_ParmsChange/Tabs_WidHei.ets index 6c0e4d961..0c5026e09 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Tabs/Tabs_ParmsChange/Tabs_WidHei.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Tabs/Tabs_ParmsChange/Tabs_WidHei.ets @@ -29,7 +29,7 @@ struct Tabs_WidHei { name:'messageManager',message:this.messageManager }; let callback:Callback = (message:any) => { - console.error('message = ' + message.name + "--" + message.value); + console.log('message = ' + message.name + "--" + message.value); if (message.name == 'width') { this.testWidth = message.value; } diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Tabs/tabs_index/Tabs_index.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Tabs/tabs_index/Tabs_index.ets index 39e1bda6d..2d53237ea 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Tabs/tabs_index/Tabs_index.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/MainAbility/pages/Tabs/tabs_index/Tabs_index.ets @@ -48,7 +48,7 @@ struct Tabs_Index { build() { Column() { - Tabs({index: this.currentIndex, controller: this.controller}) { + Tabs({ index: this.currentIndex, controller: this.controller }) { TabContent() { Column().width('100%').height('100%').backgroundColor('#00CB87').key("Tabs_Index_001"); }.tabBar(this.TabBuilder(0, 'Green')).key("Tabs_Index_011") diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/spaceChanged/Column_Space.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/spaceChanged/Column_Space.test.ets index 18ebf93d5..e101a7637 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/spaceChanged/Column_Space.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Column/spaceChanged/Column_Space.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../MainAbility/common/MessageManager'; export default function Column_Space() { describe('column_SpaceTest', function () { beforeEach(async function (done) { - console.info("Column_Space beforeEach start"); + console.info("column_SpaceTest beforeEach start"); let options = { url: "MainAbility/pages/Column/spaceChanged/Column_Space", } @@ -38,6 +37,7 @@ export default function Column_Space() { console.error("push Column_Space page error " + JSON.stringify(err)); expect().assertFail(); } + console.info("column_SpaceTest beforeEach end"); done(); }); afterEach(async function () { @@ -46,11 +46,11 @@ export default function Column_Space() { }); /** * @tc.number SUB_ACE_COLUMN_SPACE_TEST_0100 - * @tc.name Column_Space - * @tc.desc The value of space changes, and the layout size of the parent and child components is fixed + * @tc.name testColumnSpaceToThirty + * @tc.desc The value of space set to 30, and the layout size of the parent and child components is fixed */ - it('SUB_ACE_COLUMN_SPACE_TEST_0100', 0, async function (done) { - console.info('[SUB_ACE_COLUMN_SPACE_TEST_0100] START'); + it('testColumnSpaceToThirty', 0, async function (done) { + console.info('[testColumnSpaceToThirty] START'); globalThis.value.message.notify({name:'addSpace', value:30}); await CommonFunc.sleep(3000); let Column_Space_011 = CommonFunc.getComponentRect('Column_Space_011'); @@ -74,16 +74,16 @@ export default function Column_Space() { expect(Math.round(Column_Space_011.right - Column_Space_011.left)).assertEqual(vp2px(300)); expect(Math.round(Column_Space_012.right - Column_Space_012.left)).assertEqual(vp2px(300)); expect(Math.round(Column_Space_013.right - Column_Space_013.left)).assertEqual(vp2px(300)); - console.info('[SUB_ACE_COLUMN_SPACE_TEST_0100] END'); + console.info('[testColumnSpaceToThirty] END'); done(); }); /** * @tc.number SUB_ACE_COLUMN_SPACE_TEST_0200 - * @tc.name Column_Space - * @tc.desc The value of space changes, and the layout size of the parent and child components is fixed + * @tc.name testColumnSpaceToFifty + * @tc.desc The value of space set to 50, and the layout size of the parent and child components is fixed */ - it('SUB_ACE_COLUMN_SPACE_TEST_0200', 0, async function (done) { - console.info('[SUB_ACE_COLUMN_SPACE_TEST_0200] START'); + it('testColumnSpaceToFifty', 0, async function (done) { + console.info('[testColumnSpaceToFifty] START'); globalThis.value.message.notify({name:'addSpace', value:50}); await CommonFunc.sleep(3000); let Column_Space_011 = CommonFunc.getComponentRect('Column_Space_011'); @@ -107,16 +107,16 @@ export default function Column_Space() { expect(Math.round(Column_Space_011.right - Column_Space_011.left)).assertEqual(vp2px(300)); expect(Math.round(Column_Space_012.right - Column_Space_012.left)).assertEqual(vp2px(300)); expect(Math.round(Column_Space_013.right - Column_Space_013.left)).assertEqual(vp2px(300)); - console.info('[SUB_ACE_COLUMN_SPACE_TEST_0200] END'); + console.info('[testColumnSpaceToFifty] END'); done(); }); /** * @tc.number SUB_ACE_COLUMN_SPACE_TEST_0300 - * @tc.name Column_Space - * @tc.desc The value of space changes, and the layout size of the parent and child components is fixed + * @tc.name testColumnSpaceToSeventy + * @tc.desc The value of space set to 70, and the layout size of the parent and child components is fixed */ - it('SUB_ACE_COLUMN_SPACE_TEST_0300', 0, async function (done) { - console.info('[SUB_ACE_COLUMN_SPACE_TEST_0300] START'); + it('testColumnSpaceToSeventy', 0, async function (done) { + console.info('[testColumnSpaceToSeventy] START'); globalThis.value.message.notify({name:'addSpace', value:70}); await CommonFunc.sleep(3000); let Column_Space_011 = CommonFunc.getComponentRect('Column_Space_011'); @@ -140,7 +140,7 @@ export default function Column_Space() { expect(Math.round(Column_Space_011.right - Column_Space_011.left)).assertEqual(vp2px(300)); expect(Math.round(Column_Space_012.right - Column_Space_012.left)).assertEqual(vp2px(300)); expect(Math.round(Column_Space_013.right - Column_Space_013.left)).assertEqual(vp2px(300)); - console.info('[SUB_ACE_COLUMN_SPACE_TEST_0300] END'); + console.info('[testColumnSpaceToSeventy] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMar.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMar.test.ets index 07e3ba1a3..034dc65c5 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMar.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMar.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flex_AlignContent_SpaceAround_FlexMarTest() { describe('Flex_AlignContent_SpaceAround_FlexMarTest', function () { beforeEach(async function (done) { - console.info("Flex_AlignContent_SpaceAround_FlexMar beforeEach start"); + console.info("Flex_AlignContent_SpaceAround_FlexMarTest beforeEach start"); let options = { url: 'MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMar', } @@ -37,6 +36,7 @@ export default function flex_AlignContent_SpaceAround_FlexMarTest() { } catch (err) { console.error("push Flex_AlignContent_SpaceAround_FlexMar page error:" + err); } + console.info("Flex_AlignContent_SpaceAround_FlexMarTest beforeEach end"); done(); }); afterEach(async function () { @@ -45,12 +45,12 @@ export default function flex_AlignContent_SpaceAround_FlexMarTest() { }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0100 - * @tc.name alignContent_SpaceAround_FlexMargin + * @tc.name testFlexAlignContentSpaceAroundFlexMargin * @tc.desc The size of the parent component in the cross direction meets the layout - * of the child components when the height and width of parent component changed + * of the child components when the margin of parent component set to 10 */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0100', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0100] START'); + it('testFlexAlignContentSpaceAroundFlexMargin', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundFlexMargin] START'); globalThis.value.message.notify({name:'margin', value:10}) await CommonFunc.sleep(3000); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceAround_FlexMar01'); @@ -68,7 +68,7 @@ export default function flex_AlignContent_SpaceAround_FlexMarTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(Math.round(flexContainer.top - columnContainer.top)).assertEqual(vp2px(10)); //margin =10 expect(firstText.left).assertEqual(secondText.left); @@ -77,11 +77,13 @@ export default function flex_AlignContent_SpaceAround_FlexMarTest() { expect(fourthText.left).assertEqual(flexContainer.left); expect(Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)); - expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //行间距相等 + expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); - expect(Math.round(firstText.top - flexContainer.top)).assertEqual(Math.round(flexContainer.bottom - fourthText.bottom)); - expect(Math.round(firstText.top - flexContainer.top)).assertEqual(Math.round((secondText.top - firstText.bottom) / 2)); //上下间距是组件间距的一半 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0100] END'); + expect(Math.round(firstText.top - flexContainer.top)) + .assertEqual(Math.round(flexContainer.bottom - fourthText.bottom)); + expect(Math.round(firstText.top - flexContainer.top)) + .assertEqual(Math.round((secondText.top - firstText.bottom) / 2)); + console.info('[testFlexAlignContentSpaceAroundFlexMargin] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMarPad.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMarPad.test.ets index 8af71e6ae..a93602a32 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMarPad.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMarPad.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flex_AlignContent_SpaceAround_FlexMarPadTest() { describe('Flex_AlignContent_SpaceAround_FlexMarPadTest', function () { beforeEach(async function (done) { - console.info("Flex_AlignContent_SpaceAround_FlexMarPad beforeEach start"); + console.info("Flex_AlignContent_SpaceAround_FlexMarPadTest beforeEach start"); let options = { url: 'MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexMarPad', } @@ -37,6 +36,7 @@ export default function flex_AlignContent_SpaceAround_FlexMarPadTest() { } catch (err) { console.error("push Flex_AlignContent_SpaceAround_FlexMarPad page error:" + err); } + console.info("Flex_AlignContent_SpaceAround_FlexMarPadTest beforeEach end"); done(); }); afterEach(async function () { @@ -45,12 +45,13 @@ export default function flex_AlignContent_SpaceAround_FlexMarPadTest() { }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0200 - * @tc.name alignContent_SpaceAround_FlexMarPad + * @tc.name testFlexAlignContentSpaceAroundFlexMarPadOverflow * @tc.desc The size of the parent component in the cross direction is not enough for the layout - * of the child components when the padding and margin of parent component was changed + * of the child components when the padding of parent component set to 50 and the margin + * of parent component set to 20 */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0200', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0200] START'); + it('testFlexAlignContentSpaceAroundFlexMarPadOverflow', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundFlexMarPadOverflow] START'); globalThis.value.message.notify({name:'padding', value:50}); globalThis.value.message.notify({name:'margin', value:20}); @@ -69,7 +70,7 @@ export default function flex_AlignContent_SpaceAround_FlexMarPadTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(150)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); expect(Math.round(flexContainer.top - columnContainer.top)).assertEqual(vp2px(20)); //margin =20 expect(Math.round(firstText.top - flexContainer.top)).assertEqual(vp2px(50)); expect(Math.round(firstText.left - flexContainer.left)).assertEqual(vp2px(50)); //padding =50 @@ -79,19 +80,20 @@ export default function flex_AlignContent_SpaceAround_FlexMarPadTest() { expect(firstText.bottom).assertEqual(secondText.top); expect(secondText.bottom).assertEqual(thirdText.top); - expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距 - expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(10)); //行首贴边行尾溢出 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0200] END'); + expect(thirdText.bottom).assertEqual(fourthText.top); + expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(10)); + console.info('[testFlexAlignContentSpaceAroundFlexMarPadOverflow] END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0300 - * @tc.name alignContent_SpaceAround_FlexMarPad + * @tc.name testFlexAlignContentSpaceAroundFlexMarPadMeet * @tc.desc The size of the parent component in the cross direction meets the layout - * of the child components when the padding and margin of parent component was changed + * of the child components when the padding of parent component set to 10 and the margin + * of parent component set to 30 */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0300', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0300] START'); + it('testFlexAlignContentSpaceAroundFlexMarPadMeet', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundFlexMarPadMeet] START'); globalThis.value.message.notify({name:'margin', value:30}) globalThis.value.message.notify({name:'padding', value:10}) await CommonFunc.sleep(3000); @@ -110,7 +112,7 @@ export default function flex_AlignContent_SpaceAround_FlexMarPadTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(150)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); expect(Math.round(firstText.left - flexContainer.left)).assertEqual(vp2px(10)); //padding =10 expect(Math.round(flexContainer.top - columnContainer.top)).assertEqual(vp2px(30)); //margin =30 @@ -118,12 +120,12 @@ export default function flex_AlignContent_SpaceAround_FlexMarPadTest() { expect(secondText.left).assertEqual(thirdText.left); expect(thirdText.left).assertEqual(fourthText.left); expect(Math.round(flexContainer.bottom - fourthText.bottom)) - .assertEqual(Math.round(firstText.top - flexContainer.top)); //行首行尾间距相等 + .assertEqual(Math.round(firstText.top - flexContainer.top)); expect(Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)); expect(Math.round((thirdText.top - secondText.bottom) / 2)) .assertEqual(Math.round(firstText.top - flexContainer.top - vp2px(10))) - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0300] END'); + console.info('[testFlexAlignContentSpaceAroundFlexMarPadMeet] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexPad.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexPad.test.ets index e06e5301b..5ddc7d42e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexPad.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexPad.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flex_AlignContent_SpaceAround_FlexPadTest() { describe('Flex_AlignContent_SpaceAround_FlexPadTest', function () { beforeEach(async function (done) { - console.info("Flex_AlignContent_SpaceAround_FlexPad beforeEach start"); + console.info("Flex_AlignContent_SpaceAround_FlexPadTest beforeEach start"); let options = { url: 'MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexPad', } @@ -37,6 +36,7 @@ export default function flex_AlignContent_SpaceAround_FlexPadTest() { } catch (err) { console.error("push Flex_AlignContent_SpaceAround_FlexPad page error:" + err); } + console.info("Flex_AlignContent_SpaceAround_FlexPadTest beforeEach end"); done(); }); afterEach(async function () { @@ -45,12 +45,12 @@ export default function flex_AlignContent_SpaceAround_FlexPadTest() { }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0400 - * @tc.name alignContent_SpaceAround_FlexPad + * @tc.name testFlexAlignContentSpaceAroundFlexPadOverflow * @tc.desc The size of the parent component in the cross direction is not enough for the layout - * of the child components when the padding and margin of parent component was changed + * of the child components when the padding of parent component set to 50 */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0400', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0400] START'); + it('testFlexAlignContentSpaceAroundFlexPadOverflow', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundFlexPadOverflow] START'); globalThis.value.message.notify({name:'padding', value:50}) await CommonFunc.sleep(3000); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceAround_FlexPad01'); @@ -66,7 +66,7 @@ export default function flex_AlignContent_SpaceAround_FlexPadTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(150)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); expect(Math.round(firstText.left - flexContainer.left)).assertEqual(vp2px(50)); //padding =50 expect(firstText.left).assertEqual(secondText.left); @@ -75,19 +75,19 @@ export default function flex_AlignContent_SpaceAround_FlexPadTest() { expect(firstText.bottom).assertEqual(secondText.top); expect(secondText.bottom).assertEqual(thirdText.top); - expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距 - expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(10)); //行首贴边行尾溢出 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0400] END'); + expect(thirdText.bottom).assertEqual(fourthText.top); + expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(10)); + console.info('[testFlexAlignContentSpaceAroundFlexPadOverflow] END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0500 - * @tc.name alignContent_SpaceAround_FlexPad + * @tc.name testFlexAlignContentSpaceAroundFlexPadMeet * @tc.desc The size of the parent component in the cross direction meets the layout - * of the child components when the padding of parent component was changed + * of the child components when the padding of parent component set to 10 */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0500', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0500] START'); + it('testFlexAlignContentSpaceAroundFlexPadMeet', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundFlexPadMeet] START'); globalThis.value.message.notify({name:'padding', value:10}) await CommonFunc.sleep(3000); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceAround_FlexPad01'); @@ -104,19 +104,20 @@ export default function flex_AlignContent_SpaceAround_FlexPadTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(150)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); expect(Math.round(firstText.left - flexContainer.left)).assertEqual(vp2px(10)); //padding =10 expect(firstText.left).assertEqual(secondText.left); expect(secondText.left).assertEqual(thirdText.left); expect(thirdText.left).assertEqual(fourthText.left); - expect(Math.round(flexContainer.bottom - fourthText.bottom)).assertEqual(Math.round(firstText.top - flexContainer.top)); //行首行尾间距相等 + expect(Math.round(flexContainer.bottom - fourthText.bottom)) + .assertEqual(Math.round(firstText.top - flexContainer.top)); expect(Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)); - expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //行间距相等 + expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); expect(Math.round((thirdText.top - secondText.bottom) / 2)) .assertEqual(Math.round(firstText.top - flexContainer.top - vp2px(10))); - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0500] END'); + console.info('[testFlexAlignContentSpaceAroundFlexPadMeet] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexSize.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexSize.test.ets index 7e2a81362..37cb2b876 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexSize.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexSize.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flex_AlignContent_SpaceAround_FlexSizeTest() { describe('Flex_AlignContent_SpaceAround_FlexSizeTest', function () { beforeEach(async function (done) { - console.info("Flex_AlignContent_SpaceAround_FlexSize beforeEach start"); + console.info("Flex_AlignContent_SpaceAround_FlexSizeTest beforeEach start"); let options = { url: 'MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_FlexSize', } @@ -37,6 +36,7 @@ export default function flex_AlignContent_SpaceAround_FlexSizeTest() { } catch (err) { console.error("push Flex_AlignContent_SpaceAround_FlexSize page error:" + err); } + console.info("Flex_AlignContent_SpaceAround_FlexSizeTest beforeEach end"); done(); }); afterEach(async function () { @@ -45,12 +45,12 @@ export default function flex_AlignContent_SpaceAround_FlexSizeTest() { }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0600 - * @tc.name alignContent_SpaceAround_FlexSize + * @tc.name testFlexAlignContentSpaceAroundFlexSizeMeet * @tc.desc The size of the parent component in the cross direction meets the layout * of the child components when the height and width of parent component changed */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0600', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0600] START'); + it('testFlexAlignContentSpaceAroundFlexSizeMeet', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundFlexSizeMeet] START'); globalThis.value.message.notify({name:'width', value:200}) globalThis.value.message.notify({name:'height', value:400}) await CommonFunc.sleep(3000); @@ -68,7 +68,7 @@ export default function flex_AlignContent_SpaceAround_FlexSizeTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(firstText.left).assertEqual(secondText.left); expect(secondText.left).assertEqual(thirdText.left); @@ -76,22 +76,22 @@ export default function flex_AlignContent_SpaceAround_FlexSizeTest() { expect(fourthText.left).assertEqual(flexContainer.left); expect(Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)); - expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //行间距相等 + expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); expect(Math.round(firstText.top - flexContainer.top)) .assertEqual(Math.round(flexContainer.bottom - fourthText.bottom)); expect(Math.round(firstText.top - flexContainer.top)) - .assertEqual(Math.round((secondText.top - firstText.bottom) / 2)); //上下间距是组件间距的一半 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0600] END'); + .assertEqual(Math.round((secondText.top - firstText.bottom) / 2)); + console.info('[testFlexAlignContentSpaceAroundFlexSizeMeet] END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0700 - * @tc.name alignContent_SpaceAround_FlexSize + * @tc.name testFlexAlignContentSpaceAroundFlexSizeOverflow * @tc.desc The size of the parent component in the cross direction is not enough for the layout * of the child components when the height and width of parent component changed */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0700', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0700] START'); + it('testFlexAlignContentSpaceAroundFlexSizeOverflow', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundFlexSizeOverflow] START'); globalThis.value.message.notify({name:'width', value:200}) globalThis.value.message.notify({name:'height', value:250}) await CommonFunc.sleep(3000); @@ -109,19 +109,19 @@ export default function flex_AlignContent_SpaceAround_FlexSizeTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(firstText.bottom).assertEqual(secondText.top); expect(secondText.bottom).assertEqual(thirdText.top); - expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距 + expect(thirdText.bottom).assertEqual(fourthText.top); expect(firstText.left).assertEqual(secondText.left); expect(secondText.left).assertEqual(thirdText.left); expect(thirdText.left).assertEqual(fourthText.left); expect(fourthText.left).assertEqual(flexContainer.left); expect(firstText.top).assertEqual(flexContainer.top); - expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(50)); //行首贴边行尾溢出 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0700] END'); + expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(50)); + console.info('[testFlexAlignContentSpaceAroundFlexSizeOverflow] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextMar.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextMar.test.ets index 1d4c415e6..eb0a8ca56 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextMar.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextMar.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flex_AlignContent_SpaceAround_TextMarTest() { describe('Flex_AlignContent_SpaceAround_TextMarTest', function () { beforeEach(async function (done) { - console.info("Flex_AlignContent_SpaceAround_TextMar beforeEach start"); + console.info("Flex_AlignContent_SpaceAround_TextMarTest beforeEach start"); let options = { url: 'MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextMar', } @@ -37,6 +36,7 @@ export default function flex_AlignContent_SpaceAround_TextMarTest() { } catch (err) { console.error("push Flex_AlignContent_SpaceAround_TextMar page error:" + err); } + console.info("Flex_AlignContent_SpaceAround_TextMarTest beforeEach end"); done(); }); afterEach(async function () { @@ -45,12 +45,12 @@ export default function flex_AlignContent_SpaceAround_TextMarTest() { }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0800 - * @tc.name alignContent_SpaceAround_TextMargin + * @tc.name testFlexAlignContentSpaceAroundTextMarginOverflow * @tc.desc The size of the parent component in the cross direction is not enough for the layout - * of the child components when the padding and margin of parent component was changed + * of the child components when the margin of parent component set to 65 */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0800', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0800] START'); + it('testFlexAlignContentSpaceAroundTextMarginOverflow', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundTextMarginOverflow] START'); globalThis.value.message.notify({name:'margin', value:65}) await CommonFunc.sleep(3000); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceAround_TextMar01'); @@ -66,7 +66,7 @@ export default function flex_AlignContent_SpaceAround_TextMarTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(Math.round((firstText.left - flexContainer.left)*10)/10).assertEqual(Math.round(vp2px(65)*10)/10); //margin =65 expect(flexContainer.left).assertEqual(secondText.left); @@ -75,19 +75,19 @@ export default function flex_AlignContent_SpaceAround_TextMarTest() { expect(Math.round((secondText.top - firstText.bottom)*10)/10).assertEqual(Math.round(vp2px(65)*10)/10); expect(secondText.bottom).assertEqual(thirdText.top); - expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距 - expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(30)); //行首贴边行尾溢出 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0800] END'); + expect(thirdText.bottom).assertEqual(fourthText.top); + expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(30)); + console.info('[testFlexAlignContentSpaceAroundTextMarginOverflow] END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0900 - * @tc.name alignContent_SpaceAround_TextMargin + * @tc.name testFlexAlignContentSpaceAroundTextMarginMeet * @tc.desc The size of the parent component in the cross direction meets the layout - * of the child components when the padding of parent component was changed + * of the child components when the margin of parent component set 10 */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0900', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0900] START'); + it('testFlexAlignContentSpaceAroundTextMarginMeet', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundTextMarginMeet] START'); globalThis.value.message.notify({name:'margin', value:10}) await CommonFunc.sleep(3000); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceAround_TextMar01'); @@ -104,9 +104,9 @@ export default function flex_AlignContent_SpaceAround_TextMarTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); - expect(Math.round(firstText.left - flexContainer.left)).assertEqual(vp2px(10)); //margin =10 + expect(Math.round(firstText.left - flexContainer.left)).assertEqual(vp2px(10)); expect(secondText.left).assertEqual(thirdText.left); expect(thirdText.left).assertEqual(fourthText.left); expect(Math.round(firstText.top - flexContainer.top - vp2px(10))) @@ -114,10 +114,10 @@ export default function flex_AlignContent_SpaceAround_TextMarTest() { expect(Math.round(secondText.top - firstText.bottom - vp2px(10))) .assertEqual(Math.round(thirdText.top - secondText.bottom)); - expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //行间距相等 + expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); expect(Math.round(flexContainer.bottom - fourthText.bottom)) - .assertEqual(Math.round((fourthText.top - thirdText.bottom) / 2)); //行首行尾距离是组件间距的一半 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_0900] END'); + .assertEqual(Math.round((fourthText.top - thirdText.bottom) / 2)); + console.info('[testFlexAlignContentSpaceAroundTextMarginMeet] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextOffset.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextOffset.test.ets index 25dccd785..dae5d811b 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextOffset.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextOffset.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flex_AlignContent_SpaceAround_TextOffsetTest() { describe('Flex_AlignContent_SpaceAround_TextOffsetTest', function () { beforeEach(async function (done) { - console.info("Flex_AlignContent_SpaceAround_TextOffset beforeEach start"); + console.info("Flex_AlignContent_SpaceAround_TextOffsetTest beforeEach start"); let options = { url: 'MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextOffset', } @@ -37,6 +36,7 @@ export default function flex_AlignContent_SpaceAround_TextOffsetTest() { } catch (err) { console.error("push Flex_AlignContent_SpaceAround_TextOffset page error:" + err); } + console.info("Flex_AlignContent_SpaceAround_TextOffsetTest beforeEach end"); done(); }); afterEach(async function () { @@ -45,12 +45,11 @@ export default function flex_AlignContent_SpaceAround_TextOffsetTest() { }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1000 - * @tc.name alignContent_SpaceAround_TextOffset - * @tc.desc The size of the parent component in the cross direction is not enough for the layout - * of the child components when position of first child component was changed + * @tc.name testFlexAlignContentSpaceAroundTextOffset + * @tc.desc The offset of first subcomponent set to {x:10, y:10} */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1000', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1000] START'); + it('testFlexAlignContentSpaceAroundTextOffset', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundTextOffset] START'); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceAround_TextOffset01'); let secondText = CommonFunc.getComponentRect('AlignContent_SpaceAround_TextOffset02'); let distanceBefore = secondText.top - firstText.bottom; @@ -73,7 +72,7 @@ export default function flex_AlignContent_SpaceAround_TextOffsetTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(Math.round(firstText.top - firstTextTop)).assertEqual(vp2px(10)); expect(Math.round(firstText.left - firstTextLeft)).assertEqual(vp2px(10)); //offset =10 @@ -85,8 +84,8 @@ export default function flex_AlignContent_SpaceAround_TextOffsetTest() { expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(distanceBefore)); - expect(Math.round(flexContainer.bottom - fourthText.bottom)).assertEqual(Math.round(distanceBefore / 2)); //其余组件行间距相等,未改变 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1000] END'); + expect(Math.round(flexContainer.bottom - fourthText.bottom)).assertEqual(Math.round(distanceBefore / 2)); + console.info('[testFlexAlignContentSpaceAroundTextOffset] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextSize.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextSize.test.ets index e8c5cca93..705af7ae0 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextSize.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextSize.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flex_AlignContent_SpaceAround_TextSizeTest() { describe('Flex_AlignContent_SpaceAround_TextSizeTest', function () { beforeEach(async function (done) { - console.info("Flex_AlignContent_SpaceAround_TextSize beforeEach start"); + console.info("Flex_AlignContent_SpaceAround_TextSizeTest beforeEach start"); let options = { url: 'MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextSize', } @@ -37,6 +36,7 @@ export default function flex_AlignContent_SpaceAround_TextSizeTest() { } catch (err) { console.error("push Flex_AlignContent_SpaceAround_TextSize page error:" + err); } + console.info("Flex_AlignContent_SpaceAround_TextSizeTest beforeEach end"); done(); }); afterEach(async function () { @@ -45,12 +45,12 @@ export default function flex_AlignContent_SpaceAround_TextSizeTest() { }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1100 - * @tc.name alignContent_SpaceAround_TextSize + * @tc.name testFlexAlignContentSpaceAroundTextSizeMeet * @tc.desc The size of the parent component in the cross direction meets the layout * of the child components when the height and width of parent component changed */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1100', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1100] START'); + it('testFlexAlignContentSpaceAroundTextSizeMeet', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundTextSizeMeet] START'); globalThis.value.message.notify({name:'height', value:70}) await CommonFunc.sleep(3000); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceAround_TextSize01'); @@ -67,7 +67,7 @@ export default function flex_AlignContent_SpaceAround_TextSizeTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(70)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //四个子组件的高度分别为70、100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(firstText.left).assertEqual(secondText.left); expect(secondText.left).assertEqual(thirdText.left); @@ -75,23 +75,23 @@ export default function flex_AlignContent_SpaceAround_TextSizeTest() { expect(fourthText.left).assertEqual(flexContainer.left); expect(Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)); - expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //行间距相等 + expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); expect(Math.round(firstText.top - flexContainer.top)) .assertEqual(Math.round(flexContainer.bottom - fourthText.bottom)); expect(Math.round(firstText.top - flexContainer.top)) .assertEqual(Math.round((secondText.top - firstText.bottom) / 2)); - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1100] END'); + console.info('[testFlexAlignContentSpaceAroundTextSizeMeet] END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1200 - * @tc.name alignContent_SpaceAround_TextSize + * @tc.name testFlexAlignContentSpaceAroundTextSizeOverflow * @tc.desc The size of the parent component in the cross direction is not enough for the layout * of the child components when the height and width of parent component changed */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1200', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1200] START'); + it('testFlexAlignContentSpaceAroundTextSizeOverflow', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundTextSizeOverflow] START'); globalThis.value.message.notify({name:'height', value:200}) await CommonFunc.sleep(3000); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceAround_TextSize01'); @@ -108,20 +108,20 @@ export default function flex_AlignContent_SpaceAround_TextSizeTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(200)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //四个子组件的高度分别为200、100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(firstText.bottom).assertEqual(secondText.top); expect(secondText.bottom).assertEqual(thirdText.top); - expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距 + expect(thirdText.bottom).assertEqual(fourthText.top); expect(firstText.left).assertEqual(secondText.left); expect(secondText.left).assertEqual(thirdText.left); expect(thirdText.left).assertEqual(fourthText.left); - expect(fourthText.left).assertEqual(flexContainer.left); //子组件靠左 + expect(fourthText.left).assertEqual(flexContainer.left); expect(firstText.top).assertEqual(flexContainer.top); - expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(50)); //行首贴边行尾溢出 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEAROUND_1200] END'); + expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(50)); + console.info('[testFlexAlignContentSpaceAroundTextSizeOverflow] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextVisibility.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextVisibility.test.ets index b3b45cf05..2b8664d31 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextVisibility.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextVisibility.test.ets @@ -19,7 +19,7 @@ import CommonFunc from '../../../../MainAbility/common/Common'; export default function flex_AlignContent_SpaceAround_TextVisibilityTest() { describe('Flex_AlignContent_SpaceAround_TextVisibilityTest', function () { beforeEach(async function (done) { - console.info("Flex_AlignContent_SpaceAround_TextVisibility beforeEach start"); + console.info("Flex_AlignContent_SpaceAround_TextVisibilityTest beforeEach start"); let options = { url: 'MainAbility/pages/Flex/alignContent/SpaceAround/Flex_AlignContent_SpaceAround_TextVisibility', } @@ -36,6 +36,7 @@ export default function flex_AlignContent_SpaceAround_TextVisibilityTest() { } catch (err) { console.error("push Flex_AlignContent_SpaceAround_TextVisibility page error:" + err); } + console.info("Flex_AlignContent_SpaceAround_TextVisibilityTest beforeEach end"); done(); }); afterEach(async function () { @@ -129,7 +130,7 @@ export default function flex_AlignContent_SpaceAround_TextVisibilityTest() { expect(fourthText.left).assertEqual(flexContainer.left); expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); - expect(Math.round(thirdText.top - secondText.bottom)).assertLarger(distanceBefore); //行距大于设置前 + expect(Math.round(thirdText.top - secondText.bottom)).assertLarger(distanceBefore); expect(Math.round(secondText.top - flexContainer.top)) .assertEqual(Math.round(flexContainer.bottom - fourthText.bottom)); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexMar.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexMar.test.ets index 287eeeef1..1c6ec550c 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexMar.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexMar.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flex_AlignContent_SpaceBetween_FlexMarTest() { describe('Flex_AlignContent_SpaceBetween_FlexMarTest', function () { beforeEach(async function (done) { @@ -45,12 +44,11 @@ export default function flex_AlignContent_SpaceBetween_FlexMarTest() { }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0100 - * @tc.name alignContent_SpaceAround_FlexMargin - * @tc.desc The size of the parent component in the cross direction meets the layout - * of the child components when the height and width of parent component changed + * @tc.name testFlexAlignContentSpaceAroundFlexMargin + * @tc.desc the margin of parent component set to 10 */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0100', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0100] START'); + it('testFlexAlignContentSpaceAroundFlexMargin', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundFlexMargin] START'); globalThis.value.message.notify({name:'margin', value:10}) await CommonFunc.sleep(3000); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_FlexMar01'); @@ -68,7 +66,7 @@ export default function flex_AlignContent_SpaceBetween_FlexMarTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(150)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); expect(Math.round(flexContainer.top - columnContainer.top)).assertEqual(vp2px(10)); //margin =10 expect(firstText.left).assertEqual(flexContainer.left); @@ -77,11 +75,11 @@ export default function flex_AlignContent_SpaceBetween_FlexMarTest() { expect(thirdText.left).assertEqual(fourthText.left); expect(fourthText.left).assertEqual(flexContainer.left); expect(firstText.top).assertEqual(flexContainer.top); - expect(fourthText.bottom).assertEqual(flexContainer.bottom); //行首行尾贴边 + expect(fourthText.bottom).assertEqual(flexContainer.bottom); expect(Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)); - expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //行间距相等 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0100] END'); + expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); + console.info('[testFlexAlignContentSpaceAroundFlexMargin] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexMarPad.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexMarPad.test.ets index 4d8e2cdb1..c64a9c7e6 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexMarPad.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexMarPad.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flex_AlignContent_SpaceBetween_FlexMarPadTest() { describe('Flex_AlignContent_SpaceBetween_FlexMarPadTest', function () { beforeEach(async function (done) { - console.info("Flex_AlignContent_SpaceBetween_FlexMarPad beforeEach start"); + console.info("flex_AlignContent_SpaceBetween_FlexMarPadTest beforeEach start"); let options = { url: 'MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexMarPad', } @@ -37,6 +36,7 @@ export default function flex_AlignContent_SpaceBetween_FlexMarPadTest() { } catch (err) { console.error("push Flex_AlignContent_SpaceBetween_FlexMarPad page error:" + err); } + console.info("flex_AlignContent_SpaceBetween_FlexMarPadTest beforeEach end"); done(); }); afterEach(async function () { @@ -45,12 +45,12 @@ export default function flex_AlignContent_SpaceBetween_FlexMarPadTest() { }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0200 - * @tc.name alignContent_SpaceAround_FlexMarPad + * @tc.name testFlexAlignContentSpaceAroundFlexMarPadMeet * @tc.desc The size of the parent component in the cross direction is not enough for the layout * of the child components when the padding and margin of parent component was changed */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0200', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0200] START'); + it('testFlexAlignContentSpaceAroundFlexMarPadMeet', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundFlexMarPadMeet] START'); globalThis.value.message.notify({name:'padding', value:50}); globalThis.value.message.notify({name:'margin', value:20}); @@ -70,30 +70,30 @@ export default function flex_AlignContent_SpaceBetween_FlexMarPadTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(150)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); - expect(Math.round(flexContainer.top - columnContainer.left)).assertEqual(vp2px(20)); //margin =20 + expect(Math.round(flexContainer.top - columnContainer.top)).assertEqual(vp2px(20)); //margin =20 expect(Math.round(firstText.top - flexContainer.top)).assertEqual(vp2px(50)); - expect(Math.round(firstText.left - flexContainer.left)).assertEqual(vp2px(50)); //padding =50 + expect(Math.round(firstText.left - flexContainer.left)).assertEqual(vp2px(50)); expect(firstText.left).assertEqual(secondText.left); expect(secondText.left).assertEqual(thirdText.left); expect(thirdText.left).assertEqual(fourthText.left); expect(firstText.bottom).assertEqual(secondText.top); expect(secondText.bottom).assertEqual(thirdText.top); - expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距 - expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(10)); //行首贴边行尾溢出 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0200] END'); + expect(thirdText.bottom).assertEqual(fourthText.top); + expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(10)); + console.info('[testFlexAlignContentSpaceAroundFlexMarPadMeet] END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0300 - * @tc.name alignContent_SpaceAround_FlexMarPad + * @tc.name testFlexAlignContentSpaceAroundFlexMarPadOverflow * @tc.desc The size of the parent component in the cross direction meets the layout * of the child components when the padding and margin of parent component was changed */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0300', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0300] START'); + it('testFlexAlignContentSpaceAroundFlexMarPadOverflow', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundFlexMarPadOverflow] START'); globalThis.value.message.notify({name:'margin', value:30}) globalThis.value.message.notify({name:'padding', value:10}) await CommonFunc.sleep(3000); @@ -112,19 +112,19 @@ export default function flex_AlignContent_SpaceBetween_FlexMarPadTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(150)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); expect(Math.round(firstText.top - flexContainer.top)).assertEqual(vp2px(10)); expect(Math.round(firstText.left - flexContainer.left)).assertEqual(vp2px(10)); //padding =10 - expect(Math.round(flexContainer.top - columnContainer.left)).assertEqual(vp2px(30)); //margin =30 + expect(Math.round(flexContainer.top - columnContainer.top)).assertEqual(vp2px(30)); //margin =30 expect(firstText.left).assertEqual(secondText.left); expect(secondText.left).assertEqual(thirdText.left); expect(thirdText.left).assertEqual(fourthText.left); expect(Math.round(flexContainer.bottom - fourthText.bottom)).assertEqual(vp2px(10)); expect(Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)); - expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //行间距相等 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0300] END'); + expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); + console.info('[testFlexAlignContentSpaceAroundFlexMarPadOverflow] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexPad.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexPad.test.ets index fa386c5c3..7412626f9 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexPad.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexPad.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flex_AlignContent_SpaceBetween_FlexPadTest() { describe('Flex_AlignContent_SpaceBetween_FlexPadTest', function () { beforeEach(async function (done) { - console.info("Flex_AlignContent_SpaceBetween_FlexPad beforeEach start"); + console.info("Flex_AlignContent_SpaceBetween_FlexPadTest beforeEach start"); let options = { url: 'MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexPad', } @@ -37,6 +36,7 @@ export default function flex_AlignContent_SpaceBetween_FlexPadTest() { } catch (err) { console.error("push Flex_AlignContent_SpaceBetween_FlexPad page error:" + err); } + console.info("Flex_AlignContent_SpaceBetween_FlexPadTest beforeEach end"); done(); }); afterEach(async function () { @@ -45,12 +45,12 @@ export default function flex_AlignContent_SpaceBetween_FlexPadTest() { }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0400 - * @tc.name alignContent_SpaceAround_FlexPadding + * @tc.name testAlignContentSpaceAroundFlexPadOverflow * @tc.desc The size of the parent component in the cross direction is not enough for the layout * of the child components when the padding and margin of parent component was changed */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0400', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0400] START'); + it('testAlignContentSpaceAroundFlexPadOverflow', 0, async function (done) { + console.info('[testAlignContentSpaceAroundFlexPadOverflow] START'); globalThis.value.message.notify({name:'padding', value:50}) await CommonFunc.sleep(3000); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_FlexPad01'); @@ -67,7 +67,7 @@ export default function flex_AlignContent_SpaceBetween_FlexPadTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(150)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(200)); expect(Math.round(firstText.top - flexContainer.top)).assertEqual(vp2px(50)); //padding =50 expect(Math.round(firstText.left - flexContainer.left)).assertEqual(vp2px(50)); //padding =50 @@ -77,19 +77,19 @@ export default function flex_AlignContent_SpaceBetween_FlexPadTest() { expect(firstText.bottom).assertEqual(secondText.top); expect(secondText.bottom).assertEqual(thirdText.top); - expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距 - expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(10)); //行首贴边行尾溢出 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0400] END'); + expect(thirdText.bottom).assertEqual(fourthText.top); + expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(10)); + console.info('[testAlignContentSpaceAroundFlexPadOverflow] END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0500 - * @tc.name alignContent_SpaceAround_FlexPadding + * @tc.name testAlignContentSpaceAroundFlexPadMeet * @tc.desc The size of the parent component in the cross direction meets the layout * of the child components when the padding of parent component was changed */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0500', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0500] START'); + it('testAlignContentSpaceAroundFlexPadMeet', 0, async function (done) { + console.info('[testAlignContentSpaceAroundFlexPadMeet] START'); globalThis.value.message.notify({name:'padding', value:10}) await CommonFunc.sleep(3000); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_FlexPad01'); @@ -105,18 +105,18 @@ export default function flex_AlignContent_SpaceBetween_FlexPadTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(150)); - expect(fourthText.bottom - fourthText.top).assertEqual(vp2px(200)); //四个子组件的高度分别为50、100、150、200 + expect(fourthText.bottom - fourthText.top).assertEqual(vp2px(200)); expect(Math.round(firstText.left - flexContainer.left)).assertEqual(vp2px(10)); //padding =10 expect(firstText.left).assertEqual(secondText.left); expect(secondText.left).assertEqual(thirdText.left); expect(thirdText.left).assertEqual(fourthText.left); expect(Math.round(firstText.top - flexContainer.top)).assertEqual(vp2px(10)); - expect(Math.round(flexContainer.bottom - fourthText.bottom)).assertEqual(vp2px(10)); //行首偏移行尾未溢出 + expect(Math.round(flexContainer.bottom - fourthText.bottom)).assertEqual(vp2px(10)); expect(Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)); - expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //行间距相等 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0500] END'); + expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); + console.info('[testAlignContentSpaceAroundFlexPadMeet] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexSize.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexSize.test.ets index 2f594487a..45651676e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexSize.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_FlexSize.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flex_AlignContent_SpaceBetween_FlexSizeTest() { describe('Flex_AlignContent_SpaceBetween_FlexSizeTest', function () { beforeEach(async function (done) { - console.info("Flex_AlignContent_SpaceBetween_FlexSize beforeEach start"); + console.info("Flex_AlignContent_SpaceBetween_FlexSizeTest beforeEach start"); let options = { url: 'MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_FlexSize', } @@ -37,6 +36,7 @@ export default function flex_AlignContent_SpaceBetween_FlexSizeTest() { } catch (err) { console.error("push Flex_AlignContent_SpaceBetween_FlexSize page error:" + err); } + console.info("Flex_AlignContent_SpaceBetween_FlexSizeTest beforeEach end"); done(); }); afterEach(async function () { @@ -45,12 +45,12 @@ export default function flex_AlignContent_SpaceBetween_FlexSizeTest() { }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0600 - * @tc.name alignContent_SpaceAround_FlexSize + * @tc.name testFlexAlignContentSpaceAroundFlexSizeMeet * @tc.desc The size of the parent component in the cross direction meets the layout * of the child components when the height and width of parent component changed */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0600', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0600] START'); + it('testFlexAlignContentSpaceAroundFlexSizeMeet', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundFlexSizeMeet] START'); globalThis.value.message.notify({name:'width', value:200}) globalThis.value.message.notify({name:'height', value:400}) await CommonFunc.sleep(3000); @@ -68,28 +68,28 @@ export default function flex_AlignContent_SpaceBetween_FlexSizeTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(firstText.left).assertEqual(secondText.left); expect(secondText.left).assertEqual(thirdText.left); expect(thirdText.left).assertEqual(fourthText.left); expect(fourthText.left).assertEqual(flexContainer.left); expect(firstText.top).assertEqual(flexContainer.top); - expect(fourthText.bottom).assertEqual(flexContainer.bottom); //行首行尾贴边 + expect(fourthText.bottom).assertEqual(flexContainer.bottom); expect(Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)); - expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //行间距相等 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0600] END'); + expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); + console.info('[testFlexAlignContentSpaceAroundFlexSizeMeet] END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0700 - * @tc.name alignContent_SpaceAround_FlexSize + * @tc.name testFlexAlignContentSpaceAroundFlexSizeOverflow * @tc.desc The size of the parent component in the cross direction is not enough for the layout * of the child components when the height and width of parent component changed */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0700', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0700] START'); + it('testFlexAlignContentSpaceAroundFlexSizeOverflow', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundFlexSizeOverflow] START'); globalThis.value.message.notify({name:'width', value:200}) globalThis.value.message.notify({name:'height', value:250}) await CommonFunc.sleep(3000); @@ -107,20 +107,20 @@ export default function flex_AlignContent_SpaceBetween_FlexSizeTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(firstText.top).assertEqual(flexContainer.top); expect(firstText.bottom).assertEqual(secondText.top); expect(secondText.bottom).assertEqual(thirdText.top); - expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距 + expect(thirdText.bottom).assertEqual(fourthText.top); expect(firstText.left).assertEqual(secondText.left); expect(secondText.left).assertEqual(thirdText.left); expect(thirdText.left).assertEqual(fourthText.left); expect(fourthText.left).assertEqual(flexContainer.left); - expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(50)); //行首贴边行尾溢出 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0700] END'); + expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(50)); + console.info('[testFlexAlignContentSpaceAroundFlexSizeOverflow] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextMar.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextMar.test.ets index a7c18cde6..64bbe42dd 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextMar.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextMar.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flex_AlignContent_SpaceBetween_TextMarTest() { describe('Flex_AlignContent_SpaceBetween_TextMarTest', function () { beforeEach(async function (done) { - console.info("Flex_AlignContent_SpaceBetween_TextMar beforeEach start"); + console.info("Flex_AlignContent_SpaceBetween_TextMarTest beforeEach start"); let options = { url: 'MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextMar', } @@ -37,6 +36,7 @@ export default function flex_AlignContent_SpaceBetween_TextMarTest() { } catch (err) { console.error("push Flex_AlignContent_SpaceBetween_TextMar page error:" + err); } + console.info("Flex_AlignContent_SpaceBetween_TextMarTest beforeEach end"); done(); }); afterEach(async function () { @@ -45,12 +45,12 @@ export default function flex_AlignContent_SpaceBetween_TextMarTest() { }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0800 - * @tc.name alignContent_SpaceAround_TextMargin + * @tc.name testFlexAlignContentSpaceAroundTextMarginOverflow * @tc.desc The size of the parent component in the cross direction is not enough for the layout * of the child components when the padding and margin of parent component was changed */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0800', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0800] START'); + it('testFlexAlignContentSpaceAroundTextMarginOverflow', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundTextMarginOverflow] START'); globalThis.value.message.notify({name:'margin', value:65}) await CommonFunc.sleep(3000); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_TextMar01'); @@ -67,7 +67,7 @@ export default function flex_AlignContent_SpaceBetween_TextMarTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(Math.round((firstText.top - flexContainer.top)*10)/10).assertEqual(Math.round(vp2px(65)*10)/10); //margin =65 expect(Math.round((firstText.left - flexContainer.left)*10)/10).assertEqual(Math.round(vp2px(65)*10)/10); //margin =65 @@ -77,19 +77,19 @@ export default function flex_AlignContent_SpaceBetween_TextMarTest() { expect(Math.round((secondText.top - firstText.bottom)*10)/10).assertEqual(Math.round(vp2px(65)*10)/10); expect(secondText.bottom).assertEqual(thirdText.top); - expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距 - expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(30)); //行首贴边行尾溢出 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0800] END'); + expect(thirdText.bottom).assertEqual(fourthText.top); + expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(30)); + console.info('[testFlexAlignContentSpaceAroundTextMarginOverflow] END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0900 - * @tc.name alignContent_SpaceAround_TextMargin + * @tc.name testFlexAlignContentSpaceAroundTextMarginOverMeet * @tc.desc The size of the parent component in the cross direction meets the layout * of the child components when the padding of parent component was changed */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0900', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0900] START'); + it('testFlexAlignContentSpaceAroundTextMarginOverMeet', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundTextMarginOverMeet] START'); globalThis.value.message.notify({name:'margin', value:10}) await CommonFunc.sleep(3000); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_TextMar01'); @@ -106,18 +106,19 @@ export default function flex_AlignContent_SpaceBetween_TextMarTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(Math.round(firstText.left - flexContainer.left)).assertEqual(vp2px(10)); //margin =10 expect(secondText.left).assertEqual(thirdText.left); expect(thirdText.left).assertEqual(fourthText.left); expect(fourthText.left).assertEqual(flexContainer.left); expect(Math.round(firstText.top - flexContainer.top)).assertEqual(vp2px(10)); - expect(flexContainer.bottom).assertEqual(fourthText.bottom); //行首偏移行尾未溢出 + expect(flexContainer.bottom).assertEqual(fourthText.bottom); - expect(Math.round(secondText.top - firstText.bottom - vp2px(10))).assertEqual(Math.round(thirdText.top - secondText.bottom)); - expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //行间距相等 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_0900] END'); + expect(Math.round(secondText.top - firstText.bottom - vp2px(10))) + .assertEqual(Math.round(thirdText.top - secondText.bottom)); + expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); + console.info('[testFlexAlignContentSpaceAroundTextMarginOverMeet] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextOffset.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextOffset.test.ets index a95411bdd..d6767ca88 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextOffset.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextOffset.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flex_AlignContent_SpaceBetween_TextOffsetTest() { describe('Flex_AlignContent_SpaceBetween_TextOffsetTest', function () { beforeEach(async function (done) { - console.info("Flex_AlignContent_SpaceBetween_TextOffset beforeEach start"); + console.info("Flex_AlignContent_SpaceBetween_TextOffsetTest beforeEach start"); let options = { url: 'MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextOffset', } @@ -35,6 +34,7 @@ export default function flex_AlignContent_SpaceBetween_TextOffsetTest() { console.info("push Flex_AlignContent_SpaceBetween_TextOffset page result:" + JSON.stringify(result)); } } catch (err) { + console.info("Flex_AlignContent_SpaceBetween_TextOffsetTest beforeEach end"); console.error("push Flex_AlignContent_SpaceBetween_TextOffset page error:" + err); } done(); @@ -45,12 +45,11 @@ export default function flex_AlignContent_SpaceBetween_TextOffsetTest() { }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1000 - * @tc.name alignContent_SpaceAround_TextOffset - * @tc.desc The size of the parent component in the cross direction is not enough for the layout - * of the child components when the padding and margin of parent component was changed + * @tc.name testFlexAlignContentSpaceAroundTextOffset + * @tc.desc the offset of first subcomponent set to {x:10, y:10} */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1000', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1000] START'); + it('testFlexAlignContentSpaceAroundTextOffset', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundTextOffset] START'); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_TextOffset01'); let secondText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_TextOffset02'); let distanceBefore = secondText.top - firstText.bottom; @@ -71,18 +70,18 @@ export default function flex_AlignContent_SpaceBetween_TextOffsetTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(50)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //四个子组件的高度分别为50、100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(Math.round(firstText.top - flexContainer.top)).assertEqual(vp2px(10)); expect(Math.round(firstText.left - flexContainer.left)).assertEqual(vp2px(10)); //offset =10 expect(flexContainer.left).assertEqual(secondText.left); expect(secondText.left).assertEqual(thirdText.left); expect(thirdText.left).assertEqual(fourthText.left); - expect(fourthText.bottom).assertEqual(flexContainer.bottom); //行首贴边行尾溢出 + expect(fourthText.bottom).assertEqual(flexContainer.bottom); expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(distanceBefore)); - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1000] END');//其余组件行间距相等,未改变 + console.info('[testFlexAlignContentSpaceAroundTextOffset] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextSize.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextSize.test.ets index 35cff42e3..441a37515 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextSize.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextSize.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flex_AlignContent_SpaceBetween_TextSizeTest() { describe('Flex_AlignContent_SpaceBetween_TextSizeTest', function () { beforeEach(async function (done) { - console.info("Flex_AlignContent_SpaceBetween_TextSize beforeEach start"); + console.info("Flex_AlignContent_SpaceBetween_TextSizeTest beforeEach start"); let options = { url: 'MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextSize', } @@ -37,6 +36,7 @@ export default function flex_AlignContent_SpaceBetween_TextSizeTest() { } catch (err) { console.error("push Flex_AlignContent_SpaceBetween_TextSize page error:" + err); } + console.info("Flex_AlignContent_SpaceBetween_TextSizeTest beforeEach end"); done(); }); afterEach(async function () { @@ -45,12 +45,12 @@ export default function flex_AlignContent_SpaceBetween_TextSizeTest() { }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1100 - * @tc.name alignContent_SpaceAround_TextSize + * @tc.name testFlexAlignContentSpaceAroundTextSizeMeet * @tc.desc The size of the parent component in the cross direction meets the layout * of the child components when the height and width of parent component changed */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1100', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1100] START'); + it('testFlexAlignContentSpaceAroundTextSizeMeet', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundTextSizeMeet] START'); globalThis.value.message.notify({name:'height', value:70}) await CommonFunc.sleep(3000); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_TextSize01'); @@ -67,28 +67,28 @@ export default function flex_AlignContent_SpaceBetween_TextSizeTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(70)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //四个子组件的高度分别为70、100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(firstText.left).assertEqual(secondText.left); expect(secondText.left).assertEqual(thirdText.left); expect(thirdText.left).assertEqual(fourthText.left); expect(fourthText.left).assertEqual(flexContainer.left); expect(firstText.top).assertEqual(flexContainer.top); - expect(fourthText.bottom).assertEqual(flexContainer.bottom); //行首行尾贴边 + expect(fourthText.bottom).assertEqual(flexContainer.bottom); expect(Math.round(secondText.top - firstText.bottom)).assertEqual(Math.round(thirdText.top - secondText.bottom)); - expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //行间距相等 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1100] END'); + expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); + console.info('[testFlexAlignContentSpaceAroundTextSizeMeet] END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1200 - * @tc.name alignContent_SpaceAround_TextSize + * @tc.name testFlexAlignContentSpaceAroundTextSizeOverflow * @tc.desc The size of the parent component in the cross direction is not enough for the layout * of the child components when the height and width of parent component changed */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1200', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1200] START'); + it('testFlexAlignContentSpaceAroundTextSizeOverflow', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundTextSizeOverflow] START'); globalThis.value.message.notify({name:'height', value:200}) await CommonFunc.sleep(3000); let firstText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_TextSize01'); @@ -105,11 +105,11 @@ export default function flex_AlignContent_SpaceBetween_TextSizeTest() { expect(Math.round(firstText.bottom - firstText.top)).assertEqual(vp2px(200)); expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //四个子组件的高度分别为200、100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(firstText.bottom).assertEqual(secondText.top); expect(secondText.bottom).assertEqual(thirdText.top); - expect(thirdText.bottom).assertEqual(fourthText.top); //无行间距 + expect(thirdText.bottom).assertEqual(fourthText.top); expect(firstText.left).assertEqual(secondText.left); expect(secondText.left).assertEqual(thirdText.left); @@ -117,8 +117,8 @@ export default function flex_AlignContent_SpaceBetween_TextSizeTest() { expect(fourthText.left).assertEqual(flexContainer.left); expect(firstText.top).assertEqual(flexContainer.top); - expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(50)); //行首贴边行尾溢出 - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1200] END'); + expect(Math.round(fourthText.bottom - flexContainer.bottom)).assertEqual(vp2px(50)); + console.info('[testFlexAlignContentSpaceAroundTextSizeOverflow] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextVisibility.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextVisibility.test.ets index c3b185283..3d0d4bec3 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextVisibility.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignContent/SpaceBeTween/Flex_AlignContent_SpaceBetween_TextVisibility.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flex_AlignContent_SpaceBetween_TextVisibilityTest() { describe('Flex_AlignContent_SpaceBetween_TextVisibilityTest', function () { beforeEach(async function (done) { - console.info("Flex_AlignContent_SpaceBetween_TextVisibility beforeEach start"); + console.info("Flex_AlignContent_SpaceBetween_TextVisibilityTest beforeEach start"); let options = { url: 'MainAbility/pages/Flex/alignContent/SpaceBetween/Flex_AlignContent_SpaceBetween_TextVisibility', } @@ -37,6 +36,7 @@ export default function flex_AlignContent_SpaceBetween_TextVisibilityTest() { } catch (err) { console.error("push Flex_AlignContent_SpaceBetween_TextVisibility page error:" + err); } + console.info("Flex_AlignContent_SpaceBetween_TextVisibilityTest beforeEach end"); done(); }); afterEach(async function () { @@ -46,12 +46,12 @@ export default function flex_AlignContent_SpaceBetween_TextVisibilityTest() { }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1300 - * @tc.name alignContent_SpaceAround_TextVisibility + * @tc.name testFlexAlignContentSpaceAroundTextVisibilityHidden * @tc.desc The size of the parent component in the cross direction meets the layout - * of the child components when the visibility of parent component was changed + * of the child components when the visibility of first subcomponent set to "Hidden" */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1300', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1300] START'); + it('testFlexAlignContentSpaceAroundTextVisibilityHidden', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundTextVisibilityHidden] START'); try { let firstText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_TextVisibility01'); let secondText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_TextVisibility02'); @@ -74,31 +74,31 @@ export default function flex_AlignContent_SpaceBetween_TextVisibilityTest() { expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //三个子组件的高度分别为100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(secondText.left).assertEqual(thirdText.left); expect(thirdText.left).assertEqual(fourthText.left); expect(fourthText.left).assertEqual(flexContainer.left); - expect(Math.round(secondText.top - flexContainer.top)).assertEqual(Math.round(distanceBefore + vp2px(50))); //text1占位 - expect(fourthText.bottom).assertEqual(flexContainer.bottom); //行首行尾贴边 + expect(Math.round(secondText.top - flexContainer.top)).assertEqual(Math.round(distanceBefore + vp2px(50))); + expect(fourthText.bottom).assertEqual(flexContainer.bottom); - expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //剩余子组件行间距相等 + expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(distanceBefore)); } catch (err) { - console.error('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1400] failed'); + console.error('[testFlexAlignContentSpaceAroundTextVisibilityHidden] failed'); expect().assertFail(); } - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1300] END'); + console.info('[testFlexAlignContentSpaceAroundTextVisibilityHidden] END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1400 - * @tc.name alignContent_SpaceAround_TextVisibility + * @tc.name testFlexAlignContentSpaceAroundTextVisibilityNone * @tc.desc The size of the parent component in the cross direction meets the layout - * of the child components when the visibility of parent component was changed + * of the child components when the visibility of first subcomponent set to "None" */ - it('SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1400', 0, async function (done) { - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1400] START'); + it('testFlexAlignContentSpaceAroundTextVisibilityNone', 0, async function (done) { + console.info('[testFlexAlignContentSpaceAroundTextVisibilityNone] START'); try{ let firstText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_TextVisibility01'); let secondText = CommonFunc.getComponentRect('AlignContent_SpaceBetween_TextVisibility02'); @@ -121,21 +121,21 @@ export default function flex_AlignContent_SpaceBetween_TextVisibilityTest() { expect(Math.round(secondText.bottom - secondText.top)).assertEqual(vp2px(100)); expect(Math.round(thirdText.bottom - thirdText.top)).assertEqual(vp2px(50)); - expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); //三个子组件的高度分别为100、50、100 + expect(Math.round(fourthText.bottom - fourthText.top)).assertEqual(vp2px(100)); expect(secondText.left).assertEqual(thirdText.left); expect(thirdText.left).assertEqual(fourthText.left); expect(fourthText.left).assertEqual(flexContainer.left); - expect(secondText.top).assertEqual(flexContainer.top); //text1不参与占位 - expect(fourthText.bottom).assertEqual(flexContainer.bottom); //行首行尾贴边 - expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); //剩余子组件行间距相等 - expect(Math.round(thirdText.top - secondText.bottom)).assertLarger(Math.round(distanceBefore)); //行距大于设置前 + expect(secondText.top).assertEqual(flexContainer.top); + expect(fourthText.bottom).assertEqual(flexContainer.bottom); + expect(Math.round(thirdText.top - secondText.bottom)).assertEqual(Math.round(fourthText.top - thirdText.bottom)); + expect(Math.round(thirdText.top - secondText.bottom)).assertLarger(Math.round(distanceBefore)); } catch (err) { - console.error('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1400] failed'); + console.error('[testFlexAlignContentSpaceAroundTextVisibilityNone] failed'); expect().assertFail(); } - console.info('[SUB_ACE_FLEXALIGNCONTENT_SPACEBETWEEN_1400] END'); + console.info('[testFlexAlignContentSpaceAroundTextVisibilityNone] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexAlignSelfJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexAlignSelfJsunit.test.ets index a6e205f11..e4771f2ac 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexAlignSelfJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexAlignSelfJsunit.test.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "../../../../MainAbility/common/Common"; @@ -47,11 +47,11 @@ export default function flexAlignSelf_AutoJsunit() { /** * @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1300 - * @tc.name ItemAlign_Auto_FlexAlignSelf + * @tc.name testFlexItemAlignAutoAlignSelfEnd * @tc.desc The first subcomponent set ItemAlign.End attribute. */ - it('SUB_ACE_FLEXALIGNITEMS_AUTO_1300', 0, async function (done) { - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1300 START'); + it('testFlexItemAlignAutoAlignSelfEnd', 0, async function (done) { + console.info('new testFlexItemAlignAutoAlignSelfEnd START'); let strJson1 = getInspectorByKey('flexAlignSelf'); let obj1 = JSON.parse(strJson1); let strJson2 = getInspectorByKey('textAlignSelf01'); @@ -60,23 +60,23 @@ export default function flexAlignSelf_AutoJsunit() { let textAlignSelf02 = CommonFunc.getComponentRect('textAlignSelf02'); let textAlignSelf03 = CommonFunc.getComponentRect('textAlignSelf03'); let flexAlignSelf01 = CommonFunc.getComponentRect('flexAlignSelf'); - expect(textAlignSelf01.left).assertEqual(flexAlignSelf01.left) - expect(textAlignSelf01.right).assertEqual(textAlignSelf02.left) - expect(textAlignSelf01.top).assertEqual(textAlignSelf02.top) - expect(textAlignSelf02.top).assertEqual(textAlignSelf03.top) - expect(textAlignSelf01.bottom).assertEqual(flexAlignSelf01.bottom) + expect(textAlignSelf01.left).assertEqual(flexAlignSelf01.left); + expect(textAlignSelf01.right).assertEqual(textAlignSelf02.left); + expect(textAlignSelf01.top).assertEqual(textAlignSelf02.top); + expect(textAlignSelf02.top).assertEqual(textAlignSelf03.top); + expect(textAlignSelf01.bottom).assertEqual(flexAlignSelf01.bottom); - expect(Math.round(textAlignSelf01.bottom - textAlignSelf01.top)).assertEqual(vp2px(50)) - expect(Math.round(textAlignSelf01.right - textAlignSelf01.left)).assertEqual(vp2px(150)) - expect(Math.round(textAlignSelf02.bottom - textAlignSelf02.top)).assertEqual(vp2px(100)) - expect(Math.round(textAlignSelf02.right - textAlignSelf02.left)).assertEqual(vp2px(150)) - expect(Math.round(textAlignSelf03.bottom - textAlignSelf03.top)).assertEqual(vp2px(150)) - expect(Math.round(textAlignSelf03.right - textAlignSelf03.left)).assertEqual(vp2px(150)) + expect(Math.round(textAlignSelf01.bottom - textAlignSelf01.top)).assertEqual(vp2px(50)); + expect(Math.round(textAlignSelf01.right - textAlignSelf01.left)).assertEqual(vp2px(150)); + expect(Math.round(textAlignSelf02.bottom - textAlignSelf02.top)).assertEqual(vp2px(100)); + expect(Math.round(textAlignSelf02.right - textAlignSelf02.left)).assertEqual(vp2px(150)); + expect(Math.round(textAlignSelf03.bottom - textAlignSelf03.top)).assertEqual(vp2px(150)); + expect(Math.round(textAlignSelf03.right - textAlignSelf03.left)).assertEqual(vp2px(150)); - expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') - expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto') - expect(obj2.$attrs.alignSelf).assertEqual("ItemAlign.End") - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1300 END'); + expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); + expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto'); + expect(obj2.$attrs.alignSelf).assertEqual("ItemAlign.End"); + console.info('new testFlexItemAlignAutoAlignSelfEnd END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexBaseJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexBaseJsunit.test.ets index 6f6a8b506..90dd71c53 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexBaseJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexBaseJsunit.test.ets @@ -13,10 +13,9 @@ * limitations under the License. */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "../../../../MainAbility/common/Common"; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flexBase_AutoJsunit() { describe('flexItemAlignAutoTest', function () { beforeEach(async function (done) { @@ -46,11 +45,12 @@ export default function flexBase_AutoJsunit() { /** * @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0100 - * @tc.name ItemAlign_Auto_FlexBase - * @tc.desc The subcomponent is inside the parent component. + * @tc.name testFlexItemAlignAutoFlexWidHeiMeet + * @tc.desc The subcomponent is inside the parent component when the width of parent component set to 500, + * the height of parent component set to 200. */ - it('SUB_ACE_FLEXALIGNITEMS_AUTO_0100', 0, async function (done) { - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0100 START'); + it('testFlexItemAlignAutoFlexWidHeiMeet', 0, async function (done) { + console.info('new testFlexItemAlignAutoFlexWidHeiMeet START'); globalThis.value.message.notify({name:'height', value:200}); globalThis.value.message.notify({name:'width', value:500}); await CommonFunc.sleep(2000); @@ -60,33 +60,34 @@ export default function flexBase_AutoJsunit() { let textFlex02 = CommonFunc.getComponentRect('textFlex02'); let textFlex03 = CommonFunc.getComponentRect('textFlex03'); let flex01 = CommonFunc.getComponentRect('flex01'); - expect(flex01.top).assertEqual(textFlex01.top) - expect(textFlex01.top).assertEqual(textFlex02.top) - expect(textFlex02.top).assertEqual(textFlex03.top) + expect(flex01.top).assertEqual(textFlex01.top); + expect(textFlex01.top).assertEqual(textFlex02.top); + expect(textFlex02.top).assertEqual(textFlex03.top); - expect(textFlex01.right).assertEqual(textFlex02.left) - expect(textFlex02.right).assertEqual(textFlex03.left) - expect(Math.round(flex01.right - textFlex03.right)).assertEqual(vp2px(50)) + expect(textFlex01.right).assertEqual(textFlex02.left); + expect(textFlex02.right).assertEqual(textFlex03.left); + expect(Math.round(flex01.right - textFlex03.right)).assertEqual(vp2px(50)); - expect(Math.round(textFlex01.bottom - textFlex01.top)).assertEqual(vp2px(50)) - expect(Math.round(textFlex02.bottom - textFlex02.top)).assertEqual(vp2px(100)) - expect(Math.round(textFlex03.bottom - textFlex03.top)).assertEqual(vp2px(150)) - expect(Math.round(textFlex01.right - textFlex01.left)).assertEqual(vp2px(150)) - expect(Math.round(textFlex02.right - textFlex02.left)).assertEqual(vp2px(150)) - expect(Math.round(textFlex03.right - textFlex03.left)).assertEqual(vp2px(150)) - expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') - expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto') - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0100 END'); + expect(Math.round(textFlex01.bottom - textFlex01.top)).assertEqual(vp2px(50)); + expect(Math.round(textFlex02.bottom - textFlex02.top)).assertEqual(vp2px(100)); + expect(Math.round(textFlex03.bottom - textFlex03.top)).assertEqual(vp2px(150)); + expect(Math.round(textFlex01.right - textFlex01.left)).assertEqual(vp2px(150)); + expect(Math.round(textFlex02.right - textFlex02.left)).assertEqual(vp2px(150)); + expect(Math.round(textFlex03.right - textFlex03.left)).assertEqual(vp2px(150)); + expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); + expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto'); + console.info('new testFlexItemAlignAutoFlexWidHeiMeet END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0200 - * @tc.name ItemAlign_Auto_FlexBase - * @tc.desc The subcomponent exceeds the parent component. + * @tc.name testFlexItemAlignAutoFlexWidHeiOverflow + * @tc.desc The subcomponent exceeds the parent component when the width of parent component set to 420, + * the height of parent component set to 140. */ - it('SUB_ACE_FLEXALIGNITEMS_AUTO_0200', 0, async function (done) { - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0200 START'); + it('testFlexItemAlignAutoFlexWidHeiOverflow', 0, async function (done) { + console.info('new testFlexItemAlignAutoFlexWidHeiOverflow START'); globalThis.value.message.notify({name:'height', value:140}); globalThis.value.message.notify({name:'width', value:420}); await CommonFunc.sleep(2000); @@ -96,22 +97,22 @@ export default function flexBase_AutoJsunit() { let textFlex02 = CommonFunc.getComponentRect('textFlex02'); let textFlex03 = CommonFunc.getComponentRect('textFlex03'); let flex01 = CommonFunc.getComponentRect('flex01'); - expect(flex01.top).assertEqual(textFlex01.top) - expect(textFlex01.top).assertEqual(textFlex02.top) - expect(textFlex02.top).assertEqual(textFlex03.top) + expect(flex01.top).assertEqual(textFlex01.top); + expect(textFlex01.top).assertEqual(textFlex02.top); + expect(textFlex02.top).assertEqual(textFlex03.top); - expect(textFlex03.right).assertEqual(flex01.right) - expect(textFlex03.bottom).assertLarger(flex01.bottom) - expect(Math.round(textFlex01.bottom - textFlex01.top)).assertEqual(vp2px(50)) - expect(Math.round(textFlex02.bottom - textFlex02.top)).assertEqual(vp2px(100)) - expect(Math.round(textFlex03.bottom - textFlex03.top)).assertEqual(vp2px(150)) - expect(Math.round(textFlex01.right - textFlex01.left)).assertEqual(vp2px(140)) - expect(Math.round(textFlex02.right - textFlex02.left)).assertEqual(vp2px(140)) - expect(Math.round(textFlex03.right - textFlex03.left)).assertEqual(vp2px(140)) + expect(textFlex03.right).assertEqual(flex01.right); + expect(textFlex03.bottom).assertLarger(flex01.bottom); + expect(Math.round(textFlex01.bottom - textFlex01.top)).assertEqual(vp2px(50)); + expect(Math.round(textFlex02.bottom - textFlex02.top)).assertEqual(vp2px(100)); + expect(Math.round(textFlex03.bottom - textFlex03.top)).assertEqual(vp2px(150)); + expect(Math.round(textFlex01.right - textFlex01.left)).assertEqual(vp2px(140)); + expect(Math.round(textFlex02.right - textFlex02.left)).assertEqual(vp2px(140)); + expect(Math.round(textFlex03.right - textFlex03.left)).assertEqual(vp2px(140)); - expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') - expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto') - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0200 END'); + expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); + expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto'); + console.info('new testFlexItemAlignAutoFlexWidHeiOverflow END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexExceedJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexExceedJsunit.test.ets index 45199f0d1..bab192cfa 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexExceedJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexExceedJsunit.test.ets @@ -13,10 +13,9 @@ * limitations under the License. */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "../../../../MainAbility/common/Common"; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flexExceed_AutoJsunit() { describe('flexItemAlignAutoTest', function () { beforeEach(async function (done) { @@ -46,11 +45,11 @@ export default function flexExceed_AutoJsunit() { /** * @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0600 - * @tc.name ItemAlign_Auto_FlexExceed + * @tc.name testFlexItemAlignAutoFlexPadMarMeet * @tc.desc Subcomponent inside when parent component set margin and padding. */ - it('SUB_ACE_FLEXALIGNITEMS_AUTO_0600', 0, async function (done) { - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0600 START'); + it('testFlexItemAlignAutoFlexPadMarMeet', 0, async function (done) { + console.info('new testFlexItemAlignAutoFlexPadMarMeet START'); globalThis.value.message.notify({name:'padding', value:10}) globalThis.value.message.notify({name:'margin', value:10}) await CommonFunc.sleep(2000); @@ -60,33 +59,33 @@ export default function flexExceed_AutoJsunit() { let textExceed02 = CommonFunc.getComponentRect('textExceed02'); let textExceed03 = CommonFunc.getComponentRect('textExceed03'); let flexExceed01 = CommonFunc.getComponentRect('flexExceed01'); - expect(Math.round(textExceed01.left - flexExceed01.left)).assertEqual(vp2px(10)) - expect(textExceed01.right).assertEqual(textExceed02.left) - expect(textExceed02.right).assertEqual(textExceed03.left) + expect(Math.round(textExceed01.left - flexExceed01.left)).assertEqual(vp2px(10)); + expect(textExceed01.right).assertEqual(textExceed02.left); + expect(textExceed02.right).assertEqual(textExceed03.left); - expect(Math.round(textExceed01.top - flexExceed01.top)).assertEqual(vp2px(10)) - expect(textExceed01.top).assertEqual(textExceed02.top) - expect(textExceed02.top).assertEqual(textExceed03.top) + expect(Math.round(textExceed01.top - flexExceed01.top)).assertEqual(vp2px(10)); + expect(textExceed01.top).assertEqual(textExceed02.top); + expect(textExceed02.top).assertEqual(textExceed03.top); - expect(Math.round(textExceed01.bottom - textExceed01.top)).assertEqual(vp2px(50)) - expect(Math.round(textExceed02.bottom - textExceed02.top)).assertEqual(vp2px(100)) - expect(Math.round(textExceed03.bottom - textExceed03.top)).assertEqual(vp2px(150)) - expect(Math.round(textExceed01.right - textExceed01.left)).assertEqual(vp2px(150)) - expect(Math.round(textExceed02.right - textExceed02.left)).assertEqual(vp2px(150)) - expect(Math.round(textExceed03.right - textExceed03.left)).assertEqual(vp2px(150)) - expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') - expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto') - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0600 END'); + expect(Math.round(textExceed01.bottom - textExceed01.top)).assertEqual(vp2px(50)); + expect(Math.round(textExceed02.bottom - textExceed02.top)).assertEqual(vp2px(100)); + expect(Math.round(textExceed03.bottom - textExceed03.top)).assertEqual(vp2px(150)); + expect(Math.round(textExceed01.right - textExceed01.left)).assertEqual(vp2px(150)); + expect(Math.round(textExceed02.right - textExceed02.left)).assertEqual(vp2px(150)); + expect(Math.round(textExceed03.right - textExceed03.left)).assertEqual(vp2px(150)); + expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); + expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto'); + console.info('new testFlexItemAlignAutoFlexPadMarMeet END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0700 - * @tc.name ItemAlign_Auto_FlexExceed + * @tc.name testFlexItemAlignAutoFlexPadMarOverflow * @tc.desc Subcomponent outside when parent component set margin and padding. */ - it('SUB_ACE_FLEXALIGNITEMS_AUTO_0700', 0, async function (done) { - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0700 START'); + it('testFlexItemAlignAutoFlexPadMarOverflow', 0, async function (done) { + console.info('new testFlexItemAlignAutoFlexPadMarOverflow START'); globalThis.value.message.notify({name:'padding', value:30}); globalThis.value.message.notify({name:'margin', value:30}); await CommonFunc.sleep(2000); @@ -96,23 +95,23 @@ export default function flexExceed_AutoJsunit() { let textExceed02 = CommonFunc.getComponentRect('textExceed02'); let textExceed03 = CommonFunc.getComponentRect('textExceed03'); let flexExceed01 = CommonFunc.getComponentRect('flexExceed01'); - expect(Math.round(textExceed01.left - flexExceed01.left)).assertEqual(vp2px(30)) - expect(textExceed01.right).assertEqual(textExceed02.left) - expect(textExceed02.right).assertEqual(textExceed03.left) + expect(Math.round(textExceed01.left - flexExceed01.left)).assertEqual(vp2px(30)); + expect(textExceed01.right).assertEqual(textExceed02.left); + expect(textExceed02.right).assertEqual(textExceed03.left); - expect(Math.round(textExceed01.top - flexExceed01.top)).assertEqual(vp2px(30)) - expect(textExceed01.top).assertEqual(textExceed02.top) - expect(textExceed02.top).assertEqual(textExceed03.top) + expect(Math.round(textExceed01.top - flexExceed01.top)).assertEqual(vp2px(30)); + expect(textExceed01.top).assertEqual(textExceed02.top); + expect(textExceed02.top).assertEqual(textExceed03.top); - expect(Math.round(textExceed01.bottom - textExceed01.top)).assertEqual(vp2px(50)) - expect(Math.round(textExceed02.bottom - textExceed02.top)).assertEqual(vp2px(100)) - expect(Math.round(textExceed03.bottom - textExceed03.top)).assertEqual(vp2px(150)) - expect(Math.round(textExceed01.right - textExceed01.left)).assertEqual(Math.round(vp2px(440/3))) - expect(Math.round(textExceed02.right - textExceed02.left)).assertEqual(Math.round(vp2px(440/3))) - expect(Math.round(textExceed03.right - textExceed03.left)).assertEqual(Math.round(vp2px(440/3))) - expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') - expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto') - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0700 END'); + expect(Math.round(textExceed01.bottom - textExceed01.top)).assertEqual(vp2px(50)); + expect(Math.round(textExceed02.bottom - textExceed02.top)).assertEqual(vp2px(100)); + expect(Math.round(textExceed03.bottom - textExceed03.top)).assertEqual(vp2px(150)); + expect(Math.round(textExceed01.right - textExceed01.left)).assertEqual(Math.round(vp2px(440/3))); + expect(Math.round(textExceed02.right - textExceed02.left)).assertEqual(Math.round(vp2px(440/3))); + expect(Math.round(textExceed03.right - textExceed03.left)).assertEqual(Math.round(vp2px(440/3))); + expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); + expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto'); + console.info('new testFlexItemAlignAutoFlexPadMarOverflow END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexHeightModifyJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexHeightModifyJsunit.test.ets index a876dfa9c..d83505917 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexHeightModifyJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexHeightModifyJsunit.test.ets @@ -13,10 +13,9 @@ * limitations under the License. */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "../../../../MainAbility/common/Common"; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flexHeightModify_AutoJsunit() { describe('flexItemAlignAutoTest', function () { beforeEach(async function (done) { @@ -46,11 +45,11 @@ export default function flexHeightModify_AutoJsunit() { /** * @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0800 - * @tc.name ItemAlign_Auto_FlexHeightModify + * @tc.name testFlexItemAlignAutoTextHeiCheck * @tc.desc Check the the default height of the first subcomponent. */ - it('SUB_ACE_FLEXALIGNITEMS_AUTO_0800', 0, async function (done) { - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0800 START'); + it('testFlexItemAlignAutoTextHeiCheck', 0, async function (done) { + console.info('new testFlexItemAlignAutoTextHeiCheck START'); let strJson1 = getInspectorByKey('flexHeightModify'); let obj1 = JSON.parse(strJson1); let textHeightModify01 = CommonFunc.getComponentRect('textHeightModify01'); @@ -58,32 +57,32 @@ export default function flexHeightModify_AutoJsunit() { let textHeightModify03 = CommonFunc.getComponentRect('textHeightModify03'); let flexHeightModify = CommonFunc.getComponentRect('flexHeightModify'); - expect(textHeightModify01.top).assertEqual(textHeightModify02.top) - expect(textHeightModify02.top).assertEqual(textHeightModify03.top) - expect(textHeightModify01.top).assertEqual(flexHeightModify.top) + expect(textHeightModify01.top).assertEqual(textHeightModify02.top); + expect(textHeightModify02.top).assertEqual(textHeightModify03.top); + expect(textHeightModify01.top).assertEqual(flexHeightModify.top); - expect(textHeightModify01.left).assertEqual(flexHeightModify.left) - expect(textHeightModify02.left).assertEqual(textHeightModify01.right) + expect(textHeightModify01.left).assertEqual(flexHeightModify.left); + expect(textHeightModify02.left).assertEqual(textHeightModify01.right); - expect(Math.round(textHeightModify01.bottom - textHeightModify01.top)).assertEqual(vp2px(50)) - expect(Math.round(textHeightModify02.bottom - textHeightModify02.top)).assertEqual(vp2px(100)) - expect(Math.round(textHeightModify03.bottom - textHeightModify03.top)).assertEqual(vp2px(150)) - expect(Math.round(textHeightModify01.right - textHeightModify01.left)).assertEqual(vp2px(150)) - expect(Math.round(textHeightModify02.right - textHeightModify02.left)).assertEqual(vp2px(150)) - expect(Math.round(textHeightModify03.right - textHeightModify03.left)).assertEqual(vp2px(150)) - expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') - expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto') - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0800 END'); + expect(Math.round(textHeightModify01.bottom - textHeightModify01.top)).assertEqual(vp2px(50)); + expect(Math.round(textHeightModify02.bottom - textHeightModify02.top)).assertEqual(vp2px(100)); + expect(Math.round(textHeightModify03.bottom - textHeightModify03.top)).assertEqual(vp2px(150)); + expect(Math.round(textHeightModify01.right - textHeightModify01.left)).assertEqual(vp2px(150)); + expect(Math.round(textHeightModify02.right - textHeightModify02.left)).assertEqual(vp2px(150)); + expect(Math.round(textHeightModify03.right - textHeightModify03.left)).assertEqual(vp2px(150)); + expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); + expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto'); + console.info('new testFlexItemAlignAutoTextHeiCheck END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0900 - * @tc.name ItemAlign_Auto_FlexHeightModify + * @tc.name testFlexItemAlignAutoTextHei * @tc.desc Modify the first subcomponent's height. */ - it('SUB_ACE_FLEXALIGNITEMS_AUTO_0900', 0, async function (done) { - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0900 START'); + it('testFlexItemAlignAutoTextHei', 0, async function (done) { + console.info('new testFlexItemAlignAutoTextHei START'); globalThis.value.message.notify({name:'height', value:80}) await CommonFunc.sleep(2000); let strJson1 = getInspectorByKey('flexHeightModify'); @@ -93,22 +92,22 @@ export default function flexHeightModify_AutoJsunit() { let textHeightModify03 = CommonFunc.getComponentRect('textHeightModify03'); let flexHeightModify = CommonFunc.getComponentRect('flexHeightModify'); - expect(textHeightModify01.top).assertEqual(textHeightModify02.top) - expect(textHeightModify02.top).assertEqual(textHeightModify03.top) - expect(textHeightModify01.top).assertEqual(flexHeightModify.top) + expect(textHeightModify01.top).assertEqual(textHeightModify02.top); + expect(textHeightModify02.top).assertEqual(textHeightModify03.top); + expect(textHeightModify01.top).assertEqual(flexHeightModify.top); - expect(textHeightModify01.left).assertEqual(flexHeightModify.left) - expect(textHeightModify02.left).assertEqual(textHeightModify01.right) + expect(textHeightModify01.left).assertEqual(flexHeightModify.left); + expect(textHeightModify02.left).assertEqual(textHeightModify01.right); - expect(Math.round(textHeightModify01.bottom - textHeightModify01.top)).assertEqual(vp2px(80)) - expect(Math.round(textHeightModify02.bottom - textHeightModify02.top)).assertEqual(vp2px(100)) - expect(Math.round(textHeightModify03.bottom - textHeightModify03.top)).assertEqual(vp2px(150)) - expect(Math.round(textHeightModify01.right - textHeightModify01.left)).assertEqual(vp2px(150)) - expect(Math.round(textHeightModify02.right - textHeightModify02.left)).assertEqual(vp2px(150)) - expect(Math.round(textHeightModify03.right - textHeightModify03.left)).assertEqual(vp2px(150)) - expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') - expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto') - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0900 END'); + expect(Math.round(textHeightModify01.bottom - textHeightModify01.top)).assertEqual(vp2px(80)); + expect(Math.round(textHeightModify02.bottom - textHeightModify02.top)).assertEqual(vp2px(100)); + expect(Math.round(textHeightModify03.bottom - textHeightModify03.top)).assertEqual(vp2px(150)); + expect(Math.round(textHeightModify01.right - textHeightModify01.left)).assertEqual(vp2px(150)); + expect(Math.round(textHeightModify02.right - textHeightModify02.left)).assertEqual(vp2px(150)); + expect(Math.round(textHeightModify03.right - textHeightModify03.left)).assertEqual(vp2px(150)); + expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); + expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto'); + console.info('new testFlexItemAlignAutoTextHei END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexMarginJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexMarginJsunit.test.ets index 3955c0049..0749b0d35 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexMarginJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexMarginJsunit.test.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "../../../../MainAbility/common/Common"; @@ -46,34 +46,34 @@ export default function flexMargin_AutoJsunit() { /** * @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0500 - * @tc.name ItemAlign_Auto_FlexMargin - * @tc.desc aceFlexAlignItemTest + * @tc.name testFlexItemAlignAutoFlexMargin + * @tc.desc the margin of parent component set to 10 */ - it('SUB_ACE_FLEXALIGNITEMS_AUTO_0500', 0, async function (done) { - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0500 START'); + it('testFlexItemAlignAutoFlexMargin', 0, async function (done) { + console.info('new testFlexItemAlignAutoFlexMargin START'); let strJson1 = getInspectorByKey('flexMargin'); let obj1 = JSON.parse(strJson1); let textFlexMargin01 = CommonFunc.getComponentRect('textFlexMargin01'); let textFlexMargin02 = CommonFunc.getComponentRect('textFlexMargin02'); let textFlexMargin03 = CommonFunc.getComponentRect('textFlexMargin03'); let flexMargin = CommonFunc.getComponentRect('flexMargin'); - expect(flexMargin.top).assertEqual(textFlexMargin01.top) - expect(textFlexMargin01.top).assertEqual(textFlexMargin02.top) - expect(textFlexMargin02.top).assertEqual(textFlexMargin03.top) + expect(flexMargin.top).assertEqual(textFlexMargin01.top); + expect(textFlexMargin01.top).assertEqual(textFlexMargin02.top); + expect(textFlexMargin02.top).assertEqual(textFlexMargin03.top); - expect(flexMargin.left).assertEqual(textFlexMargin01.left) - expect(textFlexMargin01.right).assertEqual(textFlexMargin02.left) - expect(textFlexMargin02.right).assertEqual(textFlexMargin03.left) + expect(flexMargin.left).assertEqual(textFlexMargin01.left); + expect(textFlexMargin01.right).assertEqual(textFlexMargin02.left); + expect(textFlexMargin02.right).assertEqual(textFlexMargin03.left); - expect(Math.round(textFlexMargin01.bottom - textFlexMargin01.top)).assertEqual(vp2px(50)) - expect(Math.round(textFlexMargin02.bottom - textFlexMargin02.top)).assertEqual(vp2px(100)) - expect(Math.round(textFlexMargin03.bottom - textFlexMargin03.top)).assertEqual(vp2px(150)) - expect(Math.round(textFlexMargin01.right - textFlexMargin01.left)).assertEqual(vp2px(150)) - expect(Math.round(textFlexMargin02.right - textFlexMargin02.left)).assertEqual(vp2px(150)) - expect(Math.round(textFlexMargin03.right - textFlexMargin03.left)).assertEqual(vp2px(150)) - expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') - expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto') - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0500 END'); + expect(Math.round(textFlexMargin01.bottom - textFlexMargin01.top)).assertEqual(vp2px(50)); + expect(Math.round(textFlexMargin02.bottom - textFlexMargin02.top)).assertEqual(vp2px(100)); + expect(Math.round(textFlexMargin03.bottom - textFlexMargin03.top)).assertEqual(vp2px(150)); + expect(Math.round(textFlexMargin01.right - textFlexMargin01.left)).assertEqual(vp2px(150)); + expect(Math.round(textFlexMargin02.right - textFlexMargin02.left)).assertEqual(vp2px(150)); + expect(Math.round(textFlexMargin03.right - textFlexMargin03.left)).assertEqual(vp2px(150)); + expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); + expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto'); + console.info('new testFlexItemAlignAutoFlexMargin END'); done(); }); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexOffsetJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexOffsetJsunit.test.ets index ff534aa5e..5c9c83289 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexOffsetJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexOffsetJsunit.test.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "../../../../MainAbility/common/Common"; @@ -46,32 +46,32 @@ export default function flexOffset_AutoJsunit() { /** * @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1000 - * @tc.name ItemAlign_Auto_FlexOffset + * @tc.name testFlexItemAlignAutoFlexOffset * @tc.desc First subcomponent set offset attribute. */ - it('SUB_ACE_FLEXALIGNITEMS_AUTO_1000', 0, async function (done) { - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1000 START'); + it('testFlexItemAlignAutoFlexOffset', 0, async function (done) { + console.info('new testFlexItemAlignAutoFlexOffset START'); let strJson1 = getInspectorByKey('flexOffset'); let obj1 = JSON.parse(strJson1); let textOffset01 = CommonFunc.getComponentRect('textOffset01'); let textOffset02 = CommonFunc.getComponentRect('textOffset02'); let textOffset03 = CommonFunc.getComponentRect('textOffset03'); let flexOffset = CommonFunc.getComponentRect('flexOffset'); - expect(Math.round((textOffset01.right - textOffset02.left)*10)/10).assertEqual(Math.round(vp2px(15)*10)/10) - expect(Math.round(textOffset01.top - flexOffset.top)).assertEqual(vp2px(30)) - expect(Math.round((textOffset01.left - flexOffset.left)*10)/10).assertEqual(Math.round(vp2px(15)*10)/10) - expect(textOffset02.top).assertEqual(textOffset03.top) - expect(textOffset03.top).assertEqual(flexOffset.top) + expect(Math.round((textOffset01.right - textOffset02.left)*10)/10).assertEqual(Math.round(vp2px(15)*10)/10); + expect(Math.round(textOffset01.top - flexOffset.top)).assertEqual(vp2px(30)); + expect(Math.round((textOffset01.left - flexOffset.left)*10)/10).assertEqual(Math.round(vp2px(15)*10)/10); + expect(textOffset02.top).assertEqual(textOffset03.top); + expect(textOffset03.top).assertEqual(flexOffset.top); - expect(Math.round(textOffset01.bottom - textOffset01.top)).assertEqual(vp2px(50)) - expect(Math.round(textOffset02.bottom - textOffset02.top)).assertEqual(vp2px(100)) - expect(Math.round(textOffset03.bottom - textOffset03.top)).assertEqual(vp2px(150)) - expect(Math.round(textOffset01.right - textOffset01.left)).assertEqual(vp2px(150)) - expect(Math.round(textOffset02.right - textOffset02.left)).assertEqual(vp2px(150)) - expect(Math.round(textOffset03.right - textOffset03.left)).assertEqual(vp2px(150)) - expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') - expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto') - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1000 END'); + expect(Math.round(textOffset01.bottom - textOffset01.top)).assertEqual(vp2px(50)); + expect(Math.round(textOffset02.bottom - textOffset02.top)).assertEqual(vp2px(100)); + expect(Math.round(textOffset03.bottom - textOffset03.top)).assertEqual(vp2px(150)); + expect(Math.round(textOffset01.right - textOffset01.left)).assertEqual(vp2px(150)); + expect(Math.round(textOffset02.right - textOffset02.left)).assertEqual(vp2px(150)); + expect(Math.round(textOffset03.right - textOffset03.left)).assertEqual(vp2px(150)); + expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); + expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto'); + console.info('new testFlexItemAlignAutoFlexOffset END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexPaddingJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexPaddingJsunit.test.ets index b632ea0da..2582bce61 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexPaddingJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexPaddingJsunit.test.ets @@ -13,10 +13,9 @@ * limitations under the License. */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "../../../../MainAbility/common/Common"; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flexPadding_AutoJsunit() { describe('flexItemAlignAutoTest', function () { @@ -47,47 +46,47 @@ export default function flexPadding_AutoJsunit() { /** * @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0300 - * @tc.name ItemAlign_Auto_testFlexPadding + * @tc.name testFlexItemAlignAutoFlexPadMeet * @tc.desc Parent component set paddding,subcomponent does not exceed the parent component. */ - it('SUB_ACE_FLEXALIGNITEMS_AUTO_0300', 0, async function (done) { - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0300 START'); + it('testFlexItemAlignAutoFlexPadMeet', 0, async function (done) { + console.info('new testFlexItemAlignAutoFlexPadMeet START'); globalThis.value.message.notify({name:'padding', value:10}) await CommonFunc.sleep(2000); let strJson1 = getInspectorByKey('flexPadding01'); let obj1 = JSON.parse(strJson1); - let textFlexPadding01 = CommonFunc.getComponentRect('textFlexPadding01') - let textFlexPadding02 = CommonFunc.getComponentRect('textFlexPadding02') - let textFlexPadding03 = CommonFunc.getComponentRect('textFlexPadding03') - let flexPadding01 = CommonFunc.getComponentRect('flexPadding01') - expect(Math.round(textFlexPadding01.left - flexPadding01.left)).assertEqual(vp2px(10)) - expect(textFlexPadding01.right).assertEqual(textFlexPadding02.left) - expect(textFlexPadding02.right).assertEqual(textFlexPadding03.left) + let textFlexPadding01 = CommonFunc.getComponentRect('textFlexPadding01'); + let textFlexPadding02 = CommonFunc.getComponentRect('textFlexPadding02'); + let textFlexPadding03 = CommonFunc.getComponentRect('textFlexPadding03'); + let flexPadding01 = CommonFunc.getComponentRect('flexPadding01'); + expect(Math.round(textFlexPadding01.left - flexPadding01.left)).assertEqual(vp2px(10)); + expect(textFlexPadding01.right).assertEqual(textFlexPadding02.left); + expect(textFlexPadding02.right).assertEqual(textFlexPadding03.left); - expect(textFlexPadding01.top).assertEqual(textFlexPadding02.top) - expect(textFlexPadding02.top).assertEqual(textFlexPadding03.top) - expect(Math.round(textFlexPadding01.top - flexPadding01.top)).assertEqual(vp2px(10)) + expect(textFlexPadding01.top).assertEqual(textFlexPadding02.top); + expect(textFlexPadding02.top).assertEqual(textFlexPadding03.top); + expect(Math.round(textFlexPadding01.top - flexPadding01.top)).assertEqual(vp2px(10)); - expect(Math.round(textFlexPadding01.bottom - textFlexPadding01.top)).assertEqual(vp2px(50)) - expect(Math.round(textFlexPadding02.bottom - textFlexPadding02.top)).assertEqual(vp2px(100)) - expect(Math.round(textFlexPadding03.bottom - textFlexPadding03.top)).assertEqual(vp2px(150)) + expect(Math.round(textFlexPadding01.bottom - textFlexPadding01.top)).assertEqual(vp2px(50)); + expect(Math.round(textFlexPadding02.bottom - textFlexPadding02.top)).assertEqual(vp2px(100)); + expect(Math.round(textFlexPadding03.bottom - textFlexPadding03.top)).assertEqual(vp2px(150)); - expect(Math.round(textFlexPadding01.right - textFlexPadding01.left)).assertEqual(vp2px(150)) - expect(Math.round(textFlexPadding02.right - textFlexPadding02.left)).assertEqual(vp2px(150)) - expect(Math.round(textFlexPadding03.right - textFlexPadding03.left)).assertEqual(vp2px(150)) - expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') - expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto') - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0300 END'); + expect(Math.round(textFlexPadding01.right - textFlexPadding01.left)).assertEqual(vp2px(150)); + expect(Math.round(textFlexPadding02.right - textFlexPadding02.left)).assertEqual(vp2px(150)); + expect(Math.round(textFlexPadding03.right - textFlexPadding03.left)).assertEqual(vp2px(150)); + expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); + expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto'); + console.info('new testFlexItemAlignAutoFlexPadMeet END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_0400 - * @tc.name ItemAlign_Auto_FlexPadding + * @tc.name testFlexItemAlignAutoFlexPadOverflow * @tc.desc Parent component set paddding,subcomponent exceedS the parent component. */ - it('SUB_ACE_FLEXALIGNITEMS_AUTO_0400', 0, async function (done) { - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0400 START'); + it('testFlexItemAlignAutoFlexPadOverflow', 0, async function (done) { + console.info('new testFlexItemAlignAutoFlexPadOverflow START'); globalThis.value.message.notify({name:'padding', value:30}); await CommonFunc.sleep(2000); let strJson1 = getInspectorByKey('flexPadding01'); @@ -96,23 +95,23 @@ export default function flexPadding_AutoJsunit() { let textFlexPadding02 = CommonFunc.getComponentRect('textFlexPadding02'); let textFlexPadding03 = CommonFunc.getComponentRect('textFlexPadding03'); let flexPadding01 = CommonFunc.getComponentRect('flexPadding01'); - expect(Math.round(textFlexPadding01.left - flexPadding01.left)).assertEqual(vp2px(30)) - expect(textFlexPadding01.right).assertEqual(textFlexPadding02.left) - expect(textFlexPadding02.right).assertEqual(textFlexPadding03.left) + expect(Math.round(textFlexPadding01.left - flexPadding01.left)).assertEqual(vp2px(30)); + expect(textFlexPadding01.right).assertEqual(textFlexPadding02.left); + expect(textFlexPadding02.right).assertEqual(textFlexPadding03.left); - expect(textFlexPadding01.top).assertEqual(textFlexPadding02.top) - expect(textFlexPadding02.top).assertEqual(textFlexPadding03.top) - expect(Math.round(textFlexPadding01.top - flexPadding01.top)).assertEqual(vp2px(30)) + expect(textFlexPadding01.top).assertEqual(textFlexPadding02.top); + expect(textFlexPadding02.top).assertEqual(textFlexPadding03.top); + expect(Math.round(textFlexPadding01.top - flexPadding01.top)).assertEqual(vp2px(30)); - expect(Math.round(textFlexPadding01.bottom - textFlexPadding01.top)).assertEqual(vp2px(50)) - expect(Math.round(textFlexPadding02.bottom - textFlexPadding02.top)).assertEqual(vp2px(100)) - expect(Math.round(textFlexPadding03.bottom - textFlexPadding03.top)).assertEqual(vp2px(150)) - expect(Math.round(textFlexPadding01.right - textFlexPadding01.left)).assertEqual(Math.round(vp2px(440/3))) - expect(Math.round(textFlexPadding02.right - textFlexPadding02.left)).assertEqual(Math.round(vp2px(440/3))) - expect(Math.round(textFlexPadding03.right - textFlexPadding03.left)).assertEqual(Math.round(vp2px(440/3))) - expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') - expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto') - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_0400 END'); + expect(Math.round(textFlexPadding01.bottom - textFlexPadding01.top)).assertEqual(vp2px(50)); + expect(Math.round(textFlexPadding02.bottom - textFlexPadding02.top)).assertEqual(vp2px(100)); + expect(Math.round(textFlexPadding03.bottom - textFlexPadding03.top)).assertEqual(vp2px(150)); + expect(Math.round(textFlexPadding01.right - textFlexPadding01.left)).assertEqual(Math.round(vp2px(440/3))); + expect(Math.round(textFlexPadding02.right - textFlexPadding02.left)).assertEqual(Math.round(vp2px(440/3))); + expect(Math.round(textFlexPadding03.right - textFlexPadding03.left)).assertEqual(Math.round(vp2px(440/3))); + expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); + expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto'); + console.info('new testFlexItemAlignAutoFlexPadOverflow END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexTextMarginJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexTextMarginJsunit.test.ets index 890798c16..e8f786cfa 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexTextMarginJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexTextMarginJsunit.test.ets @@ -13,10 +13,9 @@ * limitations under the License. */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "../../../../MainAbility/common/Common"; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flexTextMargin_AutoJsunit() { describe('flexItemAlignAutoTest', function () { @@ -47,11 +46,11 @@ export default function flexTextMargin_AutoJsunit() { /** * @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1400 - * @tc.name ItemAlign_Auto_TextMargin + * @tc.name testFlexItemAlignAutoTextMarginMeet * @tc.desc Subcomponents set margin within the scope of the parent component. */ - it('SUB_ACE_FLEXALIGNITEMS_AUTO_1400', 0, async function (done) { - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1400 START'); + it('testFlexItemAlignAutoTextMarginMeet', 0, async function (done) { + console.info('new testFlexItemAlignAutoTextMarginMeet START'); globalThis.value.message.notify({name:'margin', value:10}); await CommonFunc.sleep(2000); let strJson1 = getInspectorByKey('flexTextMargin01'); @@ -60,33 +59,33 @@ export default function flexTextMargin_AutoJsunit() { let textMargin02 = CommonFunc.getComponentRect('textMargin02'); let textMargin03 = CommonFunc.getComponentRect('textMargin03'); let flexTextMargin01 = CommonFunc.getComponentRect('flexTextMargin01'); - expect(Math.round(textMargin01.left - flexTextMargin01.left)).assertEqual(vp2px(10)) - expect(Math.round(textMargin02.left - textMargin01.right)).assertEqual(vp2px(10)) - expect(textMargin02.right).assertEqual(textMargin03.left) + expect(Math.round(textMargin01.left - flexTextMargin01.left)).assertEqual(vp2px(10)); + expect(Math.round(textMargin02.left - textMargin01.right)).assertEqual(vp2px(10)); + expect(textMargin02.right).assertEqual(textMargin03.left); - expect(Math.round(textMargin01.top - flexTextMargin01.top)).assertEqual(vp2px(10)) - expect(textMargin02.top).assertEqual(textMargin03.top) - expect(textMargin03.top).assertEqual(flexTextMargin01.top) + expect(Math.round(textMargin01.top - flexTextMargin01.top)).assertEqual(vp2px(10)); + expect(textMargin02.top).assertEqual(textMargin03.top); + expect(textMargin03.top).assertEqual(flexTextMargin01.top); - expect(Math.round(textMargin01.bottom - textMargin01.top)).assertEqual(vp2px(50)) - expect(Math.round(textMargin02.bottom - textMargin02.top)).assertEqual(vp2px(100)) - expect(Math.round(textMargin03.bottom - textMargin03.top)).assertEqual(vp2px(150)) - expect(Math.round(textMargin01.right - textMargin01.left)).assertEqual(vp2px(150)) - expect(Math.round(textMargin02.right - textMargin02.left)).assertEqual(vp2px(150)) - expect(Math.round(textMargin03.right - textMargin03.left)).assertEqual(vp2px(150)) - expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') - expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto') - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1400 END'); + expect(Math.round(textMargin01.bottom - textMargin01.top)).assertEqual(vp2px(50)); + expect(Math.round(textMargin02.bottom - textMargin02.top)).assertEqual(vp2px(100)); + expect(Math.round(textMargin03.bottom - textMargin03.top)).assertEqual(vp2px(150)); + expect(Math.round(textMargin01.right - textMargin01.left)).assertEqual(vp2px(150)); + expect(Math.round(textMargin02.right - textMargin02.left)).assertEqual(vp2px(150)); + expect(Math.round(textMargin03.right - textMargin03.left)).assertEqual(vp2px(150)); + expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); + expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto'); + console.info('new testFlexItemAlignAutoTextMarginMeet END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1500 - * @tc.name ItemAlign_Auto_TextMargin + * @tc.name testFlexItemAlignAutoTextMarginOverflow * @tc.desc Subcomponents set margin outside the scope of the parent component */ - it('SUB_ACE_FLEXALIGNITEMS_AUTO_1500', 0, async function (done) { - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1500 START'); + it('testFlexItemAlignAutoTextMarginOverflow', 0, async function (done) { + console.info('new testFlexItemAlignAutoTextMarginOverflow START'); globalThis.value.message.notify({name:'margin', value:30}); await CommonFunc.sleep(2000); let strJson1 = getInspectorByKey('flexTextMargin01'); @@ -96,24 +95,24 @@ export default function flexTextMargin_AutoJsunit() { let textMargin03 = CommonFunc.getComponentRect('textMargin03'); let flexTextMargin01 = CommonFunc.getComponentRect('flexTextMargin01'); - expect(Math.round(textMargin01.left - flexTextMargin01.left)).assertEqual(vp2px(30)) - expect(Math.round(textMargin02.left - textMargin01.right)).assertEqual(vp2px(30)) - expect(textMargin02.right).assertEqual(textMargin03.left) - expect(textMargin03.right).assertEqual(flexTextMargin01.right) + expect(Math.round(textMargin01.left - flexTextMargin01.left)).assertEqual(vp2px(30)); + expect(Math.round(textMargin02.left - textMargin01.right)).assertEqual(vp2px(30)); + expect(textMargin02.right).assertEqual(textMargin03.left); + expect(textMargin03.right).assertEqual(flexTextMargin01.right); - expect(Math.round(textMargin01.top - flexTextMargin01.top)).assertEqual(vp2px(30)) - expect(textMargin02.top).assertEqual(textMargin03.top) - expect(textMargin03.top).assertEqual(flexTextMargin01.top) + expect(Math.round(textMargin01.top - flexTextMargin01.top)).assertEqual(vp2px(30)); + expect(textMargin02.top).assertEqual(textMargin03.top); + expect(textMargin03.top).assertEqual(flexTextMargin01.top); - expect(Math.round(textMargin01.bottom - textMargin01.top)).assertEqual(vp2px(50)) - expect(Math.round(textMargin02.bottom - textMargin02.top)).assertEqual(vp2px(100)) - expect(Math.round(textMargin03.bottom - textMargin03.top)).assertEqual(vp2px(150)) - expect(Math.round(textMargin01.right - textMargin01.left)).assertEqual(Math.round(vp2px(440/3))) - expect(Math.round(textMargin02.right - textMargin02.left)).assertEqual(Math.round(vp2px(440/3))) - expect(Math.round(textMargin03.right - textMargin03.left)).assertEqual(Math.round(vp2px(440/3))) - expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') - expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto') - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1500 END'); + expect(Math.round(textMargin01.bottom - textMargin01.top)).assertEqual(vp2px(50)); + expect(Math.round(textMargin02.bottom - textMargin02.top)).assertEqual(vp2px(100)); + expect(Math.round(textMargin03.bottom - textMargin03.top)).assertEqual(vp2px(150)); + expect(Math.round(textMargin01.right - textMargin01.left)).assertEqual(Math.round(vp2px(440/3))); + expect(Math.round(textMargin02.right - textMargin02.left)).assertEqual(Math.round(vp2px(440/3))); + expect(Math.round(textMargin03.right - textMargin03.left)).assertEqual(Math.round(vp2px(440/3))); + expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); + expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto'); + console.info('new testFlexItemAlignAutoTextMarginOverflow END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexVisibilityJsunit.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexVisibilityJsunit.test.ets index 16a6c6245..2652a1c75 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexVisibilityJsunit.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/alignItems/ItemAlign_Auto/FlexVisibilityJsunit.test.ets @@ -13,10 +13,9 @@ * limitations under the License. */ -import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "../../../../MainAbility/common/Common"; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function flexVisibility_AutoJsunit() { describe('flexItemAlignAutoTest', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function flexVisibility_AutoJsunit() { /** * @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1100 - * @tc.name ItemAlign_Auto_FlexVisibility + * @tc.name testFlexItemAlignAutoFlexVisibilityNone * @tc.desc The first subcomponent set Visibility.None attribute. */ - it('SUB_ACE_FLEXALIGNITEMS_AUTO_1100', 0, async function (done) { - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1100 START'); + it('testFlexItemAlignAutoFlexVisibilityNone', 0, async function (done) { + console.info('new testFlexItemAlignAutoFlexVisibilityNone START'); try{ globalThis.value.message.notify({name:'visibility', value:Visibility.None}) await CommonFunc.sleep(2000); @@ -78,20 +77,20 @@ export default function flexVisibility_AutoJsunit() { expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto') } catch (err) { - console.error('[SUB_ACE_FLEXALIGNITEMS_AUTO_1100] failed'); + console.error('[testFlexItemAlignAutoFlexVisibilityNone] failed'); expect().assertFail(); } - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1100 END'); + console.info('new testFlexItemAlignAutoFlexVisibilityNone END'); done(); }); /** * @tc.number SUB_ACE_FLEXALIGNITEMS_AUTO_1200 - * @tc.name ItemAlign_Auto_FlexVisibility + * @tc.name testFlexItemAlignAutoFlexVisibilityHidden * @tc.desc The first subcomponent set Visibility.Hidden attribute. */ - it('SUB_ACE_FLEXALIGNITEMS_AUTO_1200', 0, async function (done) { - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1200 START'); + it('testFlexItemAlignAutoFlexVisibilityHidden', 0, async function (done) { + console.info('new testFlexItemAlignAutoFlexVisibilityHidden START'); try{ globalThis.value.message.notify({name:'visibility', value:Visibility.Hidden}); await CommonFunc.sleep(2000); @@ -120,10 +119,10 @@ export default function flexVisibility_AutoJsunit() { expect(obj1.$attrs.constructor.direction).assertEqual('FlexDirection.Row') expect(obj1.$attrs.constructor.alignItems).assertEqual('ItemAlign.Auto') } catch (err) { - console.error('[SUB_ACE_FLEXALIGNITEMS_AUTO_1200] failed'); + console.error('[testFlexItemAlignAutoFlexVisibilityHidden] failed'); expect().assertFail(); } - console.info('new SUB_ACE_FLEXALIGNITEMS_AUTO_1200 END'); + console.info('new testFlexItemAlignAutoFlexVisibilityHidden END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddAlign.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddAlign.test.ets index 80cd876e1..fb7ad5d80 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddAlign.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddAlign.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignCenter_AddAlign() { describe('AlignCenter_AddAlign', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignCenter_AddAlign() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0800 - * @tc.name Align_Center_Row_AddAlign + * @tc.name testFlexAlignCenterAlignBottomEnd * @tc.desc Setting generic properties does not take effect, and owned properties take precedence */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0800', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0800] START'); + it('testFlexAlignCenterAlignBottomEnd', 0, async function (done) { + console.info('[testFlexAlignCenterAlignBottomEnd] START'); globalThis.value.message.notify({name:'DadAlign', value:Alignment.BottomEnd}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Center_AddAlign_01'); @@ -59,10 +58,10 @@ export default function AlignCenter_AddAlign() { expect(obj.$type).assertEqual('Flex'); expect(obj.$attrs.constructor.direction).assertEqual('FlexDirection.Row'); expect(obj.$attrs.constructor.justifyContent).assertEqual('FlexAlign.Center'); - let Center_AddAlign_011 = CommonFunc.getComponentRect('Center_AddAlign_011') - let Center_AddAlign_012 = CommonFunc.getComponentRect('Center_AddAlign_012') - let Center_AddAlign_013 = CommonFunc.getComponentRect('Center_AddAlign_013') - let Center_AddAlign_01 = CommonFunc.getComponentRect('Center_AddAlign_01') + let Center_AddAlign_011 = CommonFunc.getComponentRect('Center_AddAlign_011'); + let Center_AddAlign_012 = CommonFunc.getComponentRect('Center_AddAlign_012'); + let Center_AddAlign_013 = CommonFunc.getComponentRect('Center_AddAlign_013'); + let Center_AddAlign_01 = CommonFunc.getComponentRect('Center_AddAlign_01'); expect(Center_AddAlign_011.top).assertEqual(Center_AddAlign_012.top); expect(Center_AddAlign_012.top).assertEqual(Center_AddAlign_013.top); expect(Center_AddAlign_011.top).assertEqual(Center_AddAlign_01.top); @@ -78,7 +77,7 @@ export default function AlignCenter_AddAlign() { expect(Math.round(Center_AddAlign_011.bottom - Center_AddAlign_011.top)).assertEqual(vp2px(50)); expect(Math.round(Center_AddAlign_012.bottom - Center_AddAlign_012.top)).assertEqual(vp2px(100)); expect(Math.round(Center_AddAlign_013.bottom - Center_AddAlign_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0800] END'); + console.info('[testFlexAlignCenterAlignBottomEnd] END'); done() }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddAllSpace.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddAllSpace.test.ets index 6e5b8068c..9d9400d60 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddAllSpace.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddAllSpace.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignCenter_AddAllSpace() { describe('AlignCenter_AddAllSpace', function () { beforeEach(async function (done) { @@ -47,12 +46,11 @@ export default function AlignCenter_AddAllSpace() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0600 - * @tc.name Align_Center_Row_AddAllSpace - * @tc.desc After setting margin, after subtracting the padding from the layout space of the parent component, - * the interface display of the spindle layout that does not meet the sub-component + * @tc.name testFlexAlignCenterFlexSpaceOverflow + * @tc.desc the space of parent component set to 30 */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0600', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0600] START'); + it('testFlexAlignCenterFlexSpaceOverflow', 0, async function (done) { + console.info('[testFlexAlignCenterFlexSpaceOverflow] START'); globalThis.value.message.notify({name:'DadAllSpace', value:30}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Center_AddAllSpace_01'); @@ -77,20 +75,22 @@ export default function AlignCenter_AddAllSpace() { expect(Math.round(Center_AddAllSpace_011.bottom - Center_AddAllSpace_011.top)).assertEqual(vp2px(50)); expect(Math.round(Center_AddAllSpace_012.bottom - Center_AddAllSpace_012.top)).assertEqual(vp2px(100)); expect(Math.round(Center_AddAllSpace_013.bottom - Center_AddAllSpace_013.top)).assertEqual(vp2px(150)); - expect(Math.round(Center_AddAllSpace_011.right - Center_AddAllSpace_011.left)).assertEqual(Math.round(vp2px(440/3))); - expect(Math.round(Center_AddAllSpace_012.right - Center_AddAllSpace_012.left)).assertEqual(Math.round(vp2px(440/3))); - expect(Math.round(Center_AddAllSpace_013.right - Center_AddAllSpace_013.left)).assertEqual(Math.round(vp2px(440/3))); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0600] END'); + expect(Math.round(Center_AddAllSpace_011.right - Center_AddAllSpace_011.left)) + .assertEqual(Math.round(vp2px(440/3))); + expect(Math.round(Center_AddAllSpace_012.right - Center_AddAllSpace_012.left)) + .assertEqual(Math.round(vp2px(440/3))); + expect(Math.round(Center_AddAllSpace_013.right - Center_AddAllSpace_013.left)) + .assertEqual(Math.round(vp2px(440/3))); + console.info('[testFlexAlignCenterFlexSpaceOverflow] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0700 - * @tc.name Align_Center_Row_AddAllSpace - * @tc.desc After setting margin, the interface that satisfies the spindle layout of the child component is - * displayed after subtracting the padding from the layout space of the parent component + * @tc.name testFlexAlignCenterFlexSpaceMeet + * @tc.desc the space of parent component set to 20 */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0700', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0700] START'); + it('testFlexAlignCenterFlexSpaceMeet', 0, async function (done) { + console.info('[testFlexAlignCenterFlexSpaceMeet] START'); globalThis.value.message.notify({name:'DadAllSpace', value:20}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Center_AddAllSpace_01'); @@ -120,7 +120,7 @@ export default function AlignCenter_AddAllSpace() { expect(Math.round(Center_AddAllSpace_011.right - Center_AddAllSpace_011.left)).assertEqual(vp2px(150)); expect(Math.round(Center_AddAllSpace_012.right - Center_AddAllSpace_012.left)).assertEqual(vp2px(150)); expect(Math.round(Center_AddAllSpace_013.right - Center_AddAllSpace_013.left)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0700] END'); + console.info('[testFlexAlignCenterFlexSpaceMeet] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddLayoutWeight.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddLayoutWeight.test.ets index 3a70ff877..5f3e43bef 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddLayoutWeight.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddLayoutWeight.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignCenter_AddLayoutWeight() { describe('AlignCenter_AddLayoutWeight', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignCenter_AddLayoutWeight() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1200 - * @tc.name Align_Center_Row_AddLayoutWeight - * @tc.desc The interface displays all subcomponents that set different layoutWeight properties + * @tc.name testFlexAlignCenterTextLayoutWeight01 + * @tc.desc The window displays all subcomponents that set different layoutWeight properties */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1200', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1200] START'); + it('testFlexAlignCenterTextLayoutWeight01', 0, async function (done) { + console.info('[testFlexAlignCenterTextLayoutWeight01] START'); globalThis.value.message.notify({name:'OneLayoutWeight1', value:1}); globalThis.value.message.notify({name:'OneLayoutWeight2', value:2}); globalThis.value.message.notify({name:'OneLayoutWeight3', value:2}); @@ -78,16 +77,16 @@ export default function AlignCenter_AddLayoutWeight() { expect(Math.round(Center_AddLayoutWeight_011.bottom - Center_AddLayoutWeight_011.top)).assertEqual(vp2px(50)); expect(Math.round(Center_AddLayoutWeight_012.bottom - Center_AddLayoutWeight_012.top)).assertEqual(vp2px(100)); expect(Math.round(Center_AddLayoutWeight_013.bottom - Center_AddLayoutWeight_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1200] END'); + console.info('[testFlexAlignCenterTextLayoutWeight01] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1600 - * @tc.name Align_Center_Row_AddLayoutWeight + * @tc.name testFlexAlignCenterTextLayoutWeight02 * @tc.desc Some subcomponents are displayed with different layoutWeight properties */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1600', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1600] START'); + it('testFlexAlignCenterTextLayoutWeight02', 0, async function (done) { + console.info('[testFlexAlignCenterTextLayoutWeight02] 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}); @@ -116,7 +115,7 @@ export default function AlignCenter_AddLayoutWeight() { expect(Math.round(Center_AddLayoutWeight_011.bottom - Center_AddLayoutWeight_011.top)).assertEqual(vp2px(50)); expect(Math.round(Center_AddLayoutWeight_012.bottom - Center_AddLayoutWeight_012.top)).assertEqual(vp2px(100)); expect(Math.round(Center_AddLayoutWeight_013.bottom - Center_AddLayoutWeight_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1600] END'); + console.info('[testFlexAlignCenterTextLayoutWeight02] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddMargin.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddMargin.test.ets index 0a64a90a0..13156fe1f 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddMargin.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddMargin.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignCenter_AddMargin() { describe('AlignCenter_AddMargin', function () { beforeEach(async function (done) { @@ -45,12 +44,11 @@ export default function AlignCenter_AddMargin() { }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0500 - * @tc.name Align_Center_Row_AddMargin - * @tc.desc The interface display where the child component is offset by the margin setting of the parent - * component + * @tc.name testFlexAlignCenterFlexMargin + * @tc.desc the margin of parent component set to 20 */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0500', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0500] START'); + it('testFlexAlignCenterFlexMargin', 0, async function (done) { + console.info('[testFlexAlignCenterFlexMargin] START'); globalThis.value.message.notify({name:'DadMargin', value:20}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Center_AddMargin_01'); @@ -80,7 +78,7 @@ export default function AlignCenter_AddMargin() { expect(Math.round(Center_AddMargin_011.right - Center_AddMargin_011.left)).assertEqual(vp2px(150)); expect(Math.round(Center_AddMargin_012.right - Center_AddMargin_012.left)).assertEqual(vp2px(150)); expect(Math.round(Center_AddMargin_013.right - Center_AddMargin_013.left)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0500] END'); + console.info('[testFlexAlignCenterFlexMargin] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOffset.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOffset.test.ets index eb2db8ca8..44cff8739 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOffset.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOffset.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignCenter_AddOffset() { describe('AlignCenter_AddOffset', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignCenter_AddOffset() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0900 - * @tc.name Align_Center_Row_AddOffset - * @tc.desc The interface display of the component that sets the offset position when drawing + * @tc.name testFlexAlignCenterTextOffset + * @tc.desc the offset of fist subcomponent set to "{ x: 10, y: 15 }" */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0900', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0900] START'); + it('testFlexAlignCenterTextOffset', 0, async function (done) { + console.info('[testFlexAlignCenterTextOffset] START'); globalThis.value.message.notify({name:'OneOffset', value:{ x: 10, y: 15 }}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Center_AddAlign_01'); @@ -78,7 +77,7 @@ export default function AlignCenter_AddOffset() { expect(Math.round(Center_AddOffset_011.bottom - Center_AddOffset_011.top)).assertEqual(vp2px(50)); expect(Math.round(Center_AddOffset_012.bottom - Center_AddOffset_012.top)).assertEqual(vp2px(100)); expect(Math.round(Center_AddOffset_013.bottom - Center_AddOffset_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0900] END'); + console.info('[testFlexAlignCenterTextOffset] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOneMargin.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOneMargin.test.ets index 7d0979620..52df9d72e 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOneMargin.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOneMargin.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignCenter_AddOneMargin() { describe('AlignCenter_AddOneMargin', function () { beforeEach(async function (done) { @@ -47,12 +46,12 @@ export default function AlignCenter_AddOneMargin() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1400 - * @tc.name Align_Center_Row_AddOneMargin + * @tc.name testFlexAlignCenterTextMarginMeet * @tc.desc After setting margin for the first subcomponent, the layout of the parent component's spindle * meets the interface display of the subcomponent's layout */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1400', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1400] START'); + it('testFlexAlignCenterTextMarginMeet', 0, async function (done) { + console.info('[testFlexAlignCenterTextMarginMeet] START'); globalThis.value.message.notify({name:'OneMargin', value:20}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Center_AddOneMargin_01'); @@ -79,17 +78,17 @@ export default function AlignCenter_AddOneMargin() { expect(Math.round(Center_AddOneMargin_011.right - Center_AddOneMargin_011.left)).assertEqual(vp2px(150)); expect(Math.round(Center_AddOneMargin_012.right - Center_AddOneMargin_012.left)).assertEqual(vp2px(150)); expect(Math.round(Center_AddOneMargin_013.right - Center_AddOneMargin_013.left)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1400] END'); + console.info('[testFlexAlignCenterTextMarginMeet] END'); done(); }) /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1500 - * @tc.name Align_Center_Row_AddOneMargin + * @tc.name testFlexAlignCenterTextMarginOverflow * @tc.desc After setting margin for the first subcomponent, the layout of the parent component's spindle does * not meet the interface display of the subcomponent's layout */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1500', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1500] START'); + it('testFlexAlignCenterTextMarginOverflow', 0, async function (done) { + console.info('[testFlexAlignCenterTextMarginOverflow] START'); globalThis.value.message.notify({name:'OneMargin', value:30}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Center_AddOneMargin_01'); @@ -118,7 +117,7 @@ export default function AlignCenter_AddOneMargin() { .assertEqual(Math.round(vp2px(440/3))); expect(Math.round(Center_AddOneMargin_013.right - Center_AddOneMargin_013.left)) .assertEqual(Math.round(vp2px(440/3))); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1500] END'); + console.info('[testFlexAlignCenterTextMarginOverflow] END'); done(); }) }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOneWidth.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOneWidth.test.ets index 80675b39d..20d2fc966 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOneWidth.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddOneWidth.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignCenter_AddOneWidth() { describe('AlignCenter_AddOneWidth', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignCenter_AddOneWidth() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1300 - * @tc.name Align_Center_Row_ChangeOneWidth - * @tc.desc The interface is displayed when you change the spindle length (width) of the first subassembly + * @tc.name testFlexAlignCenterTextWidth + * @tc.desc The interface is displayed when you change the width of the first subcomponent */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1300', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1300] START'); + it('testFlexAlignCenterTextWidth', 0, async function (done) { + console.info('[testFlexAlignCenterTextWidth] START'); globalThis.value.message.notify({name:'OneWidth', value:160}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Center_AddOneWidth_01'); @@ -76,7 +75,7 @@ export default function AlignCenter_AddOneWidth() { expect(Math.round(Center_AddOneWidth_011.bottom - Center_AddOneWidth_011.top)).assertEqual(vp2px(50)); expect(Math.round(Center_AddOneWidth_012.bottom - Center_AddOneWidth_012.top)).assertEqual(vp2px(100)); expect(Math.round(Center_AddOneWidth_013.bottom - Center_AddOneWidth_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1300] END'); + console.info('[testFlexAlignCenterTextWidth] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddPadding.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddPadding.test.ets index ee17ab721..00c83de72 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddPadding.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddPadding.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignCenter_AddPadding() { describe('AlignCenter_AddPadding', function () { beforeEach(async function (done) { @@ -47,12 +46,12 @@ export default function AlignCenter_AddPadding() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0300 - * @tc.name Align_Center_Row_AddPadding + * @tc.name testFlexAlignCenterFlexPadOverflow * @tc.desc After subtracting the padding from the parent component layout space, the interface * display that does not meet the spindle layout of the child component */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0300', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0300] START'); + it('testFlexAlignCenterFlexPadOverflow', 0, async function (done) { + console.info('[testFlexAlignCenterFlexPadOverflow] START'); globalThis.value.message.notify({name:'DadPadding', value:30}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Center_AddPadding_01'); @@ -77,17 +76,17 @@ export default function AlignCenter_AddPadding() { expect(Math.round(Center_AddPadding_011.right - Center_AddPadding_011.left)).assertEqual(Math.round(vp2px(440/3))); expect(Math.round(Center_AddPadding_012.right - Center_AddPadding_012.left)).assertEqual(Math.round(vp2px(440/3))); expect(Math.round(Center_AddPadding_013.right - Center_AddPadding_013.left)).assertEqual(Math.round(vp2px(440/3))); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0300] END'); + console.info('[testFlexAlignCenterFlexPadOverflow] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0400 - * @tc.name Align_Center_Row_AddPadding + * @tc.name testFlexAlignCenterFlexPadMeet * @tc.desc After subtracting the padding from the parent component layout space, the interface that * satisfies the spindle layout of the child component is displayed */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0400', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0400] START'); + it('testFlexAlignCenterFlexPadMeet', 0, async function (done) { + console.info('[testFlexAlignCenterFlexPadMeet] START'); globalThis.value.message.notify({name:'DadPadding', value:20}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Center_AddPadding_01'); @@ -114,7 +113,7 @@ export default function AlignCenter_AddPadding() { expect(Math.round(Center_AddPadding_011.bottom - Center_AddPadding_011.top)).assertEqual(vp2px(50)); expect(Math.round(Center_AddPadding_012.bottom - Center_AddPadding_012.top)).assertEqual(vp2px(100)); expect(Math.round(Center_AddPadding_013.bottom - Center_AddPadding_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0400] END'); + console.info('[testFlexAlignCenterFlexPadMeet] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddVisibility.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddVisibility.test.ets index ac2b173fe..702e7f02b 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddVisibility.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_AddVisibility.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignCenter_AddVisibility() { describe('AlignCenter_AddVisibility', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignCenter_AddVisibility() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1000 - * @tc.name Align_Center_Row_AddVisibility + * @tc.name testFlexAlignCenterVisibilityNone * @tc.desc The subcomponent sets the visibility. None, the child components are hidden in the interface display */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1000', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1000] START'); + it('testFlexAlignCenterVisibilityNone', 0, async function (done) { + console.info('[testFlexAlignCenterVisibilityNone] START'); try { globalThis.value.message.notify({name:'OneVisibility',value:Visibility.None}); await CommonFunc.sleep(3000); @@ -76,20 +75,20 @@ export default function AlignCenter_AddVisibility() { expect(Math.round(Center_AddVisibility_012.bottom - Center_AddVisibility_012.top)).assertEqual(vp2px(100)); expect(Math.round(Center_AddVisibility_013.bottom - Center_AddVisibility_013.top)).assertEqual(vp2px(150)); } catch (err) { - console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1000] failed'); + console.error('[testFlexAlignCenterVisibilityNone] failed'); expect().assertFail(); } - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1000] END'); + console.info('[testFlexAlignCenterVisibilityNone] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1100 - * @tc.name Align_Center_Row_AddVisibility + * @tc.name testFlexAlignCenterVisibilityHidden * @tc.desc When the subcomponent sets visibility.hidden, the interface of the subcomponent does not occupy the * position */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1100', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1100] START'); + it('testFlexAlignCenterVisibilityHidden', 0, async function (done) { + console.info('[testFlexAlignCenterVisibilityHidden] START'); try{ globalThis.value.message.notify({name:'OneVisibility', value:Visibility.Hidden}); await CommonFunc.sleep(3000); @@ -121,20 +120,20 @@ export default function AlignCenter_AddVisibility() { expect(Math.round(Center_AddVisibility_012.bottom - Center_AddVisibility_012.top)).assertEqual(vp2px(100)); expect(Math.round(Center_AddVisibility_013.bottom - Center_AddVisibility_013.top)).assertEqual(vp2px(150)); } catch (err) { - console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1100] failed'); + console.error('[testFlexAlignCenterVisibilityHidden] failed'); expect().assertFail(); } - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1100] END'); + console.info('[testFlexAlignCenterVisibilityHidden] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1700 - * @tc.name Align_Center_Row_AddVisibility + * @tc.name testFlexAlignCenterVisibilityVisible * @tc.desc The subcomponent sets the visibility. Visible, the subcomponent does not occupy a position in the * interface display */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1700', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1700] START'); + it('testFlexAlignCenterVisibilityVisible', 0, async function (done) { + console.info('[testFlexAlignCenterVisibilityVisible] START'); try{ globalThis.value.message.notify({name:'OneVisibility', value:Visibility.Visible}); await CommonFunc.sleep(3000); @@ -166,10 +165,10 @@ export default function AlignCenter_AddVisibility() { expect(Math.round(Center_AddVisibility_012.bottom - Center_AddVisibility_012.top)).assertEqual(vp2px(100)); expect(Math.round(Center_AddVisibility_013.bottom - Center_AddVisibility_013.top)).assertEqual(vp2px(150)); } catch (err) { - console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1700] failed'); + console.error('[testFlexAlignCenterVisibilityVisible] failed'); expect().assertFail(); } - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_1700] END'); + console.info('[testFlexAlignCenterVisibilityVisible] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_NoSpace.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_NoSpace.test.ets index 05bbdb5ad..d72a9e762 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_NoSpace.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Center/AlignCenter_NoSpace.test.ets @@ -16,7 +16,7 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; + export default function AlignCenter_NoSpace() { describe('AlignCenter_NoSpace', function () { beforeEach(async function (done) { @@ -47,12 +47,12 @@ export default function AlignCenter_NoSpace() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0100 - * @tc.name Align_Center_Row_ChangeWidth + * @tc.name testFlexAlignCenterFlexWidthOverflow * @tc.desc The parent component layout space does not meet the interface display of the spindle layout of * the child component */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0100', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0100] START'); + it('testFlexAlignCenterFlexWidthOverflow', 0, async function (done) { + console.info('[testFlexAlignCenterFlexWidthOverflow] START'); globalThis.value.message.notify({name:'DadWidth', value:400}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Center_NoSpace_01'); @@ -77,17 +77,17 @@ export default function AlignCenter_NoSpace() { expect(Math.round(Center_NoSpace_011.right - Center_NoSpace_011.left)).assertEqual(Math.round(vp2px(400/3))); expect(Math.round(Center_NoSpace_012.right - Center_NoSpace_012.left)).assertEqual(Math.round(vp2px(400/3))); expect(Math.round(Center_NoSpace_013.right - Center_NoSpace_013.left)).assertEqual(Math.round(vp2px(400/3))); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0100] END'); + console.info('[testFlexAlignCenterFlexWidthOverflow] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0200 - * @tc.name Align_Center_Row_ChangeWidth + * @tc.name testFlexAlignCenterFlexWidthMeet * @tc.desc The interface display where the parent component layout space satisfies the spindle layout of * the child component */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0200', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0200] START'); + it('testFlexAlignCenterFlexWidthMeet', 0, async function (done) { + console.info('[testFlexAlignCenterFlexWidthMeet] START'); globalThis.value.message.notify({name:'DadWidth', value:500}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Center_NoSpace_01'); @@ -106,14 +106,15 @@ export default function AlignCenter_NoSpace() { expect(Center_NoSpace_013.left).assertEqual(Center_NoSpace_012.right); expect(Math.round(Center_NoSpace_011.left - Center_NoSpace_01.left)) .assertEqual(Math.round(Center_NoSpace_01.right - Center_NoSpace_013.right)); - expect(Math.round((Center_NoSpace_011.left - Center_NoSpace_01.left)*10)/10).assertEqual(Math.round(vp2px(25)*10)/10); + expect(Math.round((Center_NoSpace_011.left - Center_NoSpace_01.left)*10)/10) + .assertEqual(Math.round(vp2px(25)*10)/10); expect(Math.round(Center_NoSpace_011.right - Center_NoSpace_011.left)).assertEqual(vp2px(150)); expect(Math.round(Center_NoSpace_012.right - Center_NoSpace_012.left)).assertEqual(vp2px(150)); expect(Math.round(Center_NoSpace_013.right - Center_NoSpace_013.left)).assertEqual(vp2px(150)); expect(Math.round(Center_NoSpace_011.bottom - Center_NoSpace_011.top)).assertEqual(vp2px(50)); expect(Math.round(Center_NoSpace_012.bottom - Center_NoSpace_012.top)).assertEqual(vp2px(100)); expect(Math.round(Center_NoSpace_013.bottom - Center_NoSpace_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_CENTER_TEST_0200] END'); + console.info('[testFlexAlignCenterFlexWidthMeet] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddAlign.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddAlign.test.ets index 36fbc8c5d..40dbfc4e8 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddAlign.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddAlign.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignEnd_AddAlign() { describe('AlignEnd_AddAlign', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignEnd_AddAlign() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0800 - * @tc.name Align_End_Row_AddAlign + * @tc.name testFlexAlignEndAlignBottomEnd * @tc.desc Setting generic properties does not take effect, and owned properties take precedence */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0800', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0800] START'); + it('testFlexAlignEndAlignBottomEnd', 0, async function (done) { + console.info('[testFlexAlignEndAlignBottomEnd] START'); globalThis.value.message.notify({name:'DadAlign', value:Alignment.BottomEnd}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('End_AddAlign_01'); @@ -76,7 +75,7 @@ export default function AlignEnd_AddAlign() { expect(Math.round(End_AddAlign_011.bottom - End_AddAlign_011.top)).assertEqual(vp2px(50)); expect(Math.round(End_AddAlign_012.bottom - End_AddAlign_012.top)).assertEqual(vp2px(100)); expect(Math.round(End_AddAlign_013.bottom - End_AddAlign_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0800] END'); + console.info('[testFlexAlignEndAlignBottomEnd] END'); done() }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddAllSpace.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddAllSpace.test.ets index 0b8f53a7a..507fc769b 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddAllSpace.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddAllSpace.test.ets @@ -15,7 +15,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignEnd_AddAllSpace() { describe('AlignEnd_AddAllSpace', function () { beforeEach(async function (done) { @@ -46,12 +45,11 @@ export default function AlignEnd_AddAllSpace() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0600 - * @tc.name Align_End_Row_AddAllSpace - * @tc.desc After setting margin, after subtracting the padding from the layout space of the parent component, - * the interface display of the spindle layout that does not meet the sub-component + * @tc.name testFlexAlignEndFlexSpaceOverflow + * @tc.desc the space of parent component set to 30 */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0600', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0600] START'); + it('testFlexAlignEndFlexSpaceOverflow', 0, async function (done) { + console.info('[testFlexAlignEndFlexSpaceOverflow] START'); globalThis.value.message.notify({name:'DadAllSpace', value:30}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('End_AddAllSpace_01'); @@ -79,17 +77,16 @@ export default function AlignEnd_AddAllSpace() { expect(Math.round(End_AddAllSpace_011.right - End_AddAllSpace_011.left)).assertEqual(Math.round(vp2px(440/3))); expect(Math.round(End_AddAllSpace_012.right - End_AddAllSpace_012.left)).assertEqual(Math.round(vp2px(440/3))); expect(Math.round(End_AddAllSpace_013.right - End_AddAllSpace_013.left)).assertEqual(Math.round(vp2px(440/3))); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0600] END'); + console.info('[testFlexAlignEndFlexSpaceOverflow] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0700 - * @tc.name Align_End_Row_AddAllSpace - * @tc.desc After setting margin, the interface that satisfies the spindle layout of the child component is - * displayed after subtracting the padding from the layout space of the parent component + * @tc.name testFlexAlignEndFlexSpaceMeet + * @tc.desc the space of parent component set to 20 */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0700', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0700] START'); + it('testFlexAlignEndFlexSpaceMeet', 0, async function (done) { + console.info('[testFlexAlignEndFlexSpaceMeet] START'); globalThis.value.message.notify({name:'DadAllSpace', value:20}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('End_AddAllSpace_01'); @@ -117,7 +114,7 @@ export default function AlignEnd_AddAllSpace() { expect(Math.round(End_AddAllSpace_011.bottom - End_AddAllSpace_011.top)).assertEqual(vp2px(50)); expect(Math.round(End_AddAllSpace_012.bottom - End_AddAllSpace_012.top)).assertEqual(vp2px(100)); expect(Math.round(End_AddAllSpace_013.bottom - End_AddAllSpace_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0700] END'); + console.info('[testFlexAlignEndFlexSpaceMeet] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddLayoutWeight.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddLayoutWeight.test.ets index 2d7c6bec5..8f7fe6e6f 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddLayoutWeight.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddLayoutWeight.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignEnd_AddLayoutWeight() { describe('AlignEnd_AddLayoutWeight', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignEnd_AddLayoutWeight() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1200 - * @tc.name Align_End_Row_AddLayoutWeight + * @tc.name testFlexAlignEndTextLayoutWeight01 * @tc.desc The interface displays all subcomponents that set different layoutWeight properties */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1200', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1200] START'); + it('testFlexAlignEndTextLayoutWeight01', 0, async function (done) { + console.info('[testFlexAlignEndTextLayoutWeight01] START'); globalThis.value.message.notify({name:'OneLayoutWeight1', value:1}); globalThis.value.message.notify({name:'OneLayoutWeight2', value:2}) globalThis.value.message.notify({name:'OneLayoutWeight3', value:2}) @@ -78,16 +77,16 @@ export default function AlignEnd_AddLayoutWeight() { expect(Math.round(End_AddLayoutWeight_011.bottom - End_AddLayoutWeight_011.top)).assertEqual(vp2px(50)); expect(Math.round(End_AddLayoutWeight_012.bottom - End_AddLayoutWeight_012.top)).assertEqual(vp2px(100)); expect(Math.round(End_AddLayoutWeight_013.bottom - End_AddLayoutWeight_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1200] END'); + console.info('[testFlexAlignEndTextLayoutWeight01] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1600 - * @tc.name Align_End_Row_AddLayoutWeight + * @tc.name testFlexAlignEndTextLayoutWeight02 * @tc.desc Some subcomponents are displayed with different layoutWeight properties */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1600', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1600] START'); + it('testFlexAlignEndTextLayoutWeight02', 0, async function (done) { + console.info('[testFlexAlignEndTextLayoutWeight02] 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}) @@ -116,7 +115,7 @@ export default function AlignEnd_AddLayoutWeight() { expect(Math.round(End_AddLayoutWeight_011.bottom - End_AddLayoutWeight_011.top)).assertEqual(vp2px(50)); expect(Math.round(End_AddLayoutWeight_012.bottom - End_AddLayoutWeight_012.top)).assertEqual(vp2px(100)); expect(Math.round(End_AddLayoutWeight_013.bottom - End_AddLayoutWeight_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1600] END'); + console.info('[testFlexAlignEndTextLayoutWeight02] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddMargin.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddMargin.test.ets index a057f351b..673df62f0 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddMargin.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddMargin.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignEnd_AddMargin() { describe('AlignEnd_AddMargin', function () { beforeEach(async function (done) { @@ -47,12 +46,12 @@ export default function AlignEnd_AddMargin() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0500 - * @tc.name Align_End_Row_AddMargin + * @tc.name testFlexAlignEndFlexMargin * @tc.desc The interface display where the child component is offset by the margin setting of the parent * component */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0500', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0500] START'); + it('testFlexAlignEndFlexMargin', 0, async function (done) { + console.info('[testFlexAlignEndFlexMargin] START'); globalThis.value.message.notify({name:'DadMargin', value:20}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('End_AddMargin_01'); @@ -79,7 +78,7 @@ export default function AlignEnd_AddMargin() { expect(Math.round(End_AddMargin_011.right - End_AddMargin_011.left)).assertEqual(vp2px(150)); expect(Math.round(End_AddMargin_012.right - End_AddMargin_012.left)).assertEqual(vp2px(150)); expect(Math.round(End_AddMargin_013.right - End_AddMargin_013.left)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0500] END'); + console.info('[testFlexAlignEndFlexMargin] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOffset.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOffset.test.ets index 45b5b9f53..2298e0839 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOffset.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOffset.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignEnd_AddOffset() { describe('AlignEnd_AddOffset', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignEnd_AddOffset() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0900 - * @tc.name Align_End_Row_AddOffset + * @tc.name testFlexAlignEndTextOffset * @tc.desc The interface display of the component that sets the offset position when drawing */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0900', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0900] START'); + it('testFlexAlignEndTextOffset', 0, async function (done) { + console.info('[testFlexAlignEndTextOffset] START'); globalThis.value.message.notify({name:'OneOffset', value:{ x: 10, y: 15 }}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('End_AddAlign_01'); @@ -76,7 +75,7 @@ export default function AlignEnd_AddOffset() { expect(Math.round(End_AddOffset_011.bottom - End_AddOffset_011.top)).assertEqual(vp2px(50)); expect(Math.round(End_AddOffset_012.bottom - End_AddOffset_012.top)).assertEqual(vp2px(100)); expect(Math.round(End_AddOffset_013.bottom - End_AddOffset_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0900] END'); + console.info('[testFlexAlignEndTextOffset] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOneMargin.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOneMargin.test.ets index 82f5cb62c..65c7c4b37 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOneMargin.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOneMargin.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignEnd_AddOneMargin() { describe('AlignEnd_AddOneMargin', function () { beforeEach(async function (done) { @@ -47,12 +46,12 @@ export default function AlignEnd_AddOneMargin() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1400 - * @tc.name Align_End_Row_AddOneMargin + * @tc.name testFlexAlignEndTextMarginMeet * @tc.desc After setting margin for the first subcomponent, the layout of the parent component's spindle * meets the interface display of the subcomponent's layout */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1400', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1400] START'); + it('testFlexAlignEndTextMarginMeet', 0, async function (done) { + console.info('[testFlexAlignEndTextMarginMeet] START'); globalThis.value.message.notify({name:'OneMargin', value:20}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('End_AddOneMargin_01'); @@ -77,17 +76,17 @@ export default function AlignEnd_AddOneMargin() { expect(Math.round(End_AddOneMargin_011.right - End_AddOneMargin_011.left)).assertEqual(vp2px(150)); expect(Math.round(End_AddOneMargin_012.right - End_AddOneMargin_012.left)).assertEqual(vp2px(150)); expect(Math.round(End_AddOneMargin_013.right - End_AddOneMargin_013.left)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1400] END'); + console.info('[testFlexAlignEndTextMarginMeet] END'); done(); }) /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1500 - * @tc.name Align_End_Row_AddOneMargin + * @tc.name testFlexAlignEndTextMarginOverflow * @tc.desc After setting margin for the first subcomponent, the layout of the parent component's spindle does * not meet the interface display of the subcomponent's layout */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1500', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1500] START'); + it('testFlexAlignEndTextMarginOverflow', 0, async function (done) { + console.info('[testFlexAlignEndTextMarginOverflow] START'); globalThis.value.message.notify({name:'OneMargin', value:30}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('End_AddOneMargin_01'); @@ -112,7 +111,7 @@ export default function AlignEnd_AddOneMargin() { expect(Math.round(End_AddOneMargin_011.right - End_AddOneMargin_011.left)).assertEqual(Math.round(vp2px(440/3))); expect(Math.round(End_AddOneMargin_012.right - End_AddOneMargin_012.left)).assertEqual(Math.round(vp2px(440/3))); expect(Math.round(End_AddOneMargin_013.right - End_AddOneMargin_013.left)).assertEqual(Math.round(vp2px(440/3))); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1500] END'); + console.info('[testFlexAlignEndTextMarginOverflow] END'); done(); }) }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOneWidth.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOneWidth.test.ets index 30b9fc113..008de07c8 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOneWidth.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddOneWidth.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignEnd_AddOneWidth() { describe('AlignEnd_AddOneWidth', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignEnd_AddOneWidth() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1300 - * @tc.name Align_End_Row_ChangeOneWidth - * @tc.desc The interface is displayed when you change the spindle length (width) of the first subassembly + * @tc.name testFlexAlignEndTextWidth + * @tc.desc The interface is displayed when you change the width of the first subcomponent */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1300', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1300] START'); + it('testFlexAlignEndTextWidth', 0, async function (done) { + console.info('[testFlexAlignEndTextWidth] START'); globalThis.value.message.notify({name:'OneWidth', value:160}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('End_AddOneWidth_01'); @@ -76,7 +75,7 @@ export default function AlignEnd_AddOneWidth() { expect(Math.round(End_AddOneWidth_011.bottom - End_AddOneWidth_011.top)).assertEqual(vp2px(50)); expect(Math.round(End_AddOneWidth_012.bottom - End_AddOneWidth_012.top)).assertEqual(vp2px(100)); expect(Math.round(End_AddOneWidth_013.bottom - End_AddOneWidth_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1300] END'); + console.info('[testFlexAlignEndTextWidth] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddPadding.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddPadding.test.ets index 8f25dff56..847be026b 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddPadding.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddPadding.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignEnd_AddPadding() { describe('AlignEnd_AddPadding', function () { beforeEach(async function (done) { @@ -47,12 +46,12 @@ export default function AlignEnd_AddPadding() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0300 - * @tc.name Align_End_Row_AddPadding + * @tc.name testFlexAlignEndFlexPadOverflow * @tc.desc After subtracting the padding from the parent component layout space, the interface * display that does not meet the spindle layout of the child component */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0300', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0300] START'); + it('testFlexAlignEndFlexPadOverflow', 0, async function (done) { + console.info('[testFlexAlignEndFlexPadOverflow] START'); globalThis.value.message.notify({name:'DadPadding', value:30}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('End_AddPadding_01'); @@ -77,17 +76,17 @@ export default function AlignEnd_AddPadding() { expect(Math.round(End_AddPadding_011.right - End_AddPadding_011.left)).assertEqual(Math.round(vp2px(440/3))); expect(Math.round(End_AddPadding_012.right - End_AddPadding_012.left)).assertEqual(Math.round(vp2px(440/3))); expect(Math.round(End_AddPadding_013.right - End_AddPadding_013.left)).assertEqual(Math.round(vp2px(440/3))); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0300] END'); + console.info('[testFlexAlignEndFlexPadOverflow] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0400 - * @tc.name Align_End_Row_AddPadding + * @tc.name testFlexAlignEndFlexPadMeet * @tc.desc After subtracting the padding from the parent component layout space, the interface that * satisfies the spindle layout of the child component is displayed */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0400', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0400] START'); + it('testFlexAlignEndFlexPadMeet', 0, async function (done) { + console.info('[testFlexAlignEndFlexPadMeet] START'); globalThis.value.message.notify({name:'DadPadding', value:20}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('End_AddPadding_01'); @@ -112,7 +111,7 @@ export default function AlignEnd_AddPadding() { expect(Math.round(End_AddPadding_011.bottom - End_AddPadding_011.top)).assertEqual(vp2px(50)); expect(Math.round(End_AddPadding_012.bottom - End_AddPadding_012.top)).assertEqual(vp2px(100)); expect(Math.round(End_AddPadding_013.bottom - End_AddPadding_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0400] END'); + console.info('[testFlexAlignEndFlexPadMeet] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddVisibility.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddVisibility.test.ets index 977ac8d31..53d9a08c1 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddVisibility.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_AddVisibility.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignEnd_AddVisibility() { describe('AlignEnd_AddVisibility', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignEnd_AddVisibility() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1000 - * @tc.name Align_End_Row_AddVisibility + * @tc.name testFlexAlignEndVisibilityNone * @tc.desc The subcomponent sets the visibility. None, the child components are hidden in the interface display */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1000', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1000] START'); + it('testFlexAlignEndVisibilityNone', 0, async function (done) { + console.info('[testFlexAlignEndVisibilityNone] START'); try{ globalThis.value.message.notify({name:'OneVisibility',value:Visibility.None}); await CommonFunc.sleep(3000); @@ -76,20 +75,20 @@ export default function AlignEnd_AddVisibility() { expect(Math.round(End_AddVisibility_012.bottom - End_AddVisibility_012.top)).assertEqual(vp2px(100)); expect(Math.round(End_AddVisibility_013.bottom - End_AddVisibility_013.top)).assertEqual(vp2px(150)); } catch (err) { - console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1000] failed'); + console.error('[testFlexAlignEndVisibilityNone] failed'); expect().assertFail(); } - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1000] END'); + console.info('[testFlexAlignEndVisibilityNone] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1100 - * @tc.name Align_End_Row_AddVisibility + * @tc.name testFlexAlignEndVisibilityHidden * @tc.desc When the subcomponent sets visibility.hidden, the interface of the subcomponent does not occupy the * position */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1100', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1100] START'); + it('testFlexAlignEndVisibilityHidden', 0, async function (done) { + console.info('[testFlexAlignEndVisibilityHidden] START'); try{ globalThis.value.message.notify({name:'OneVisibility',value:Visibility.Hidden}) await CommonFunc.sleep(3000); @@ -119,20 +118,20 @@ export default function AlignEnd_AddVisibility() { expect(Math.round(End_AddVisibility_012.bottom - End_AddVisibility_012.top)).assertEqual(vp2px(100)); expect(Math.round(End_AddVisibility_013.bottom - End_AddVisibility_013.top)).assertEqual(vp2px(150)); } catch (err) { - console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1100] failed'); + console.error('[testFlexAlignEndVisibilityHidden] failed'); expect().assertFail(); } - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1100] END'); + console.info('[testFlexAlignEndVisibilityHidden] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1700 - * @tc.name Align_End_Row_AddVisibility + * @tc.name testFlexAlignEndVisibilityVisible * @tc.desc The subcomponent sets the visibility. Visible, the subcomponent does not occupy a position in the * interface display */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1700', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1700] START'); + it('testFlexAlignEndVisibilityVisible', 0, async function (done) { + console.info('[testFlexAlignEndVisibilityVisible] START'); try{ globalThis.value.message.notify({name:'OneVisibility',value:Visibility.Visible}) await CommonFunc.sleep(3000); @@ -162,10 +161,10 @@ export default function AlignEnd_AddVisibility() { expect(Math.round(End_AddVisibility_012.bottom - End_AddVisibility_012.top)).assertEqual(vp2px(100)); expect(Math.round(End_AddVisibility_013.bottom - End_AddVisibility_013.top)).assertEqual(vp2px(150)); } catch (err) { - console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1700] failed'); + console.error('[testFlexAlignEndVisibilityVisible] failed'); expect().assertFail(); } - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_1700] END'); + console.info('[testFlexAlignEndVisibilityVisible] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_NoSpace.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_NoSpace.test.ets index b3c69f95e..4e09f0926 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_NoSpace.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/End/AlignEnd_NoSpace.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignEnd_NoSpace() { describe('AlignEnd_NoSpace', function () { beforeEach(async function (done) { @@ -47,12 +46,12 @@ export default function AlignEnd_NoSpace() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0100 - * @tc.name Align_End_Row_ChangeWidth + * @tc.name testFlexAlignEndFlexWidthOverflow * @tc.desc The parent component layout space does not meet the interface display of the spindle layout of * the child component */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0100', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0100] START'); + it('testFlexAlignEndFlexWidthOverflow', 0, async function (done) { + console.info('[testFlexAlignEndFlexWidthOverflow] START'); globalThis.value.message.notify({name:'DadWidth', value:400}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('End_NoSpace_01'); @@ -77,17 +76,17 @@ export default function AlignEnd_NoSpace() { expect(Math.round(End_NoSpace_011.right - End_NoSpace_011.left)).assertEqual(Math.round(vp2px(400/3))); expect(Math.round(End_NoSpace_012.right - End_NoSpace_012.left)).assertEqual(Math.round(vp2px(400/3))); expect(Math.round(End_NoSpace_013.right - End_NoSpace_013.left)).assertEqual(Math.round(vp2px(400/3))); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0100] END'); + console.info('[testFlexAlignEndFlexWidthOverflow] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0200 - * @tc.name Align_End_Row_ChangeWidth + * @tc.name testFlexAlignEndFlexWidthMeet * @tc.desc The interface display where the parent component layout space satisfies the spindle layout of * the child component */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0200', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0200] START'); + it('testFlexAlignEndFlexWidthMeet', 0, async function (done) { + console.info('[testFlexAlignEndFlexWidthMeet] START'); globalThis.value.message.notify({name:'DadWidth', value:500}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('End_NoSpace_01'); @@ -112,7 +111,7 @@ export default function AlignEnd_NoSpace() { expect(Math.round(End_NoSpace_011.right - End_NoSpace_011.left)).assertEqual(vp2px(150)); expect(Math.round(End_NoSpace_012.right - End_NoSpace_012.left)).assertEqual(vp2px(150)); expect(Math.round(End_NoSpace_013.right - End_NoSpace_013.left)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_END_TEST_0200] END'); + console.info('[testFlexAlignEndFlexWidthMeet] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAlign.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAlign.test.ets index 1076256aa..397b93ca5 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAlign.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAlign.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignSpaceEvenly_AddAlign() { describe('AlignSpaceEvenly_AddAlign', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignSpaceEvenly_AddAlign() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0800 - * @tc.name Align_SpaceEvenly_Row_AddAlign + * @tc.name testFlexAlignSpaceEvenlyAlignBottomEnd * @tc.desc Setting generic properties does not take effect, and owned properties take precedence */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0800', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0800] START'); + it('testFlexAlignSpaceEvenlyAlignBottomEnd', 0, async function (done) { + console.info('[testFlexAlignSpaceEvenlyAlignBottomEnd] START'); globalThis.value.message.notify({name:'DadAlign', value:Alignment.BottomEnd}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('SpaceEvenly_AddAlign_01'); @@ -80,7 +79,7 @@ export default function AlignSpaceEvenly_AddAlign() { expect(Math.round(SpaceEvenly_AddAlign_011.bottom - SpaceEvenly_AddAlign_011.top)).assertEqual(vp2px(50)); expect(Math.round(SpaceEvenly_AddAlign_012.bottom - SpaceEvenly_AddAlign_012.top)).assertEqual(vp2px(100)); expect(Math.round(SpaceEvenly_AddAlign_013.bottom - SpaceEvenly_AddAlign_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0800] END'); + console.info('[testFlexAlignSpaceEvenlyAlignBottomEnd] END'); done() }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAllSpace.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAllSpace.test.ets index 7b4262757..6ba5d8fd3 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAllSpace.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddAllSpace.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignSpaceEvenly_AddAllSpace() { describe('AlignSpaceEvenly_AddAllSpace', function () { beforeEach(async function (done) { @@ -47,12 +46,11 @@ export default function AlignSpaceEvenly_AddAllSpace() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0600 - * @tc.name Align_SpaceEvenly_Row_AddAllSpace - * @tc.desc After setting margin, after subtracting the padding from the layout space of the parent component, - * the interface display of the spindle layout that does not meet the sub-component + * @tc.name testFlexAlignSpaceEvenlyFlexSpaceOverflow + * @tc.desc the space of parent component set to 30 */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0600', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0600] START'); + it('testFlexAlignSpaceEvenlyFlexSpaceOverflow', 0, async function (done) { + console.info('[testFlexAlignSpaceEvenlyFlexSpaceOverflow] START'); globalThis.value.message.notify({name:'DadAllSpace', value:30}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('SpaceEvenly_AddAllSpace_01'); @@ -77,20 +75,22 @@ export default function AlignSpaceEvenly_AddAllSpace() { expect(Math.round(SpaceEvenly_AddAllSpace_011.bottom - SpaceEvenly_AddAllSpace_011.top)).assertEqual(vp2px(50)); expect(Math.round(SpaceEvenly_AddAllSpace_012.bottom - SpaceEvenly_AddAllSpace_012.top)).assertEqual(vp2px(100)); expect(Math.round(SpaceEvenly_AddAllSpace_013.bottom - SpaceEvenly_AddAllSpace_013.top)).assertEqual(vp2px(150)); - expect(Math.round(SpaceEvenly_AddAllSpace_011.right - SpaceEvenly_AddAllSpace_011.left)).assertEqual(Math.round(vp2px(440/3))); - expect(Math.round(SpaceEvenly_AddAllSpace_012.right - SpaceEvenly_AddAllSpace_012.left)).assertEqual(Math.round(vp2px(440/3))); - expect(Math.round(SpaceEvenly_AddAllSpace_013.right - SpaceEvenly_AddAllSpace_013.left)).assertEqual(Math.round(vp2px(440/3))); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0600] END'); + expect(Math.round(SpaceEvenly_AddAllSpace_011.right - SpaceEvenly_AddAllSpace_011.left)) + .assertEqual(Math.round(vp2px(440/3))); + expect(Math.round(SpaceEvenly_AddAllSpace_012.right - SpaceEvenly_AddAllSpace_012.left)) + .assertEqual(Math.round(vp2px(440/3))); + expect(Math.round(SpaceEvenly_AddAllSpace_013.right - SpaceEvenly_AddAllSpace_013.left)) + .assertEqual(Math.round(vp2px(440/3))); + console.info('[testFlexAlignSpaceEvenlyFlexSpaceOverflow] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0700 - * @tc.name Align_SpaceEvenly_Row_AddAllSpace - * @tc.desc After setting margin, the interface that satisfies the spindle layout of the child component is - * displayed after subtracting the padding from the layout space of the parent component + * @tc.name testFlexAlignSpaceEvenlyFlexSpaceMeet + * @tc.desc the space of parent component set to 20 */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0700', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0700] START'); + it('testFlexAlignSpaceEvenlyFlexSpaceMeet', 0, async function (done) { + console.info('[testFlexAlignSpaceEvenlyFlexSpaceMeet] START'); globalThis.value.message.notify({name:'DadAllSpace', value:20}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('SpaceEvenly_AddAllSpace_01'); @@ -122,7 +122,7 @@ export default function AlignSpaceEvenly_AddAllSpace() { .assertEqual(Math.round(SpaceEvenly_AddAllSpace_013.left - SpaceEvenly_AddAllSpace_012.right)); expect(Math.round((SpaceEvenly_AddAllSpace_012.left - SpaceEvenly_AddAllSpace_011.right)*100)/100) .assertEqual(Math.round(vp2px(2.5)*100)/100); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0700] END'); + console.info('[testFlexAlignSpaceEvenlyFlexSpaceMeet] END'); done(); }); }) 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 539851160..409abdd24 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 @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignSpaceEvenly_AddLayoutWeight() { describe('AlignSpaceEvenly_AddLayoutWeight', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignSpaceEvenly_AddLayoutWeight() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1200 - * @tc.name Align_SpaceEvenly_Row_AddLayoutWeight + * @tc.name testFlexAlignSpaceEvenlyLayoutWeight01 * @tc.desc The interface displays all subcomponents that set different layoutWeight properties */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1200', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1200] START'); + it('testFlexAlignSpaceEvenlyLayoutWeight01', 0, async function (done) { + console.info('[testFlexAlignSpaceEvenlyLayoutWeight01] START'); globalThis.value.message.notify({name:'OneLayoutWeight1', value:1}); globalThis.value.message.notify({name:'OneLayoutWeight2', value:2}); globalThis.value.message.notify({name:'OneLayoutWeight3', value:2}); @@ -84,16 +83,16 @@ export default function AlignSpaceEvenly_AddLayoutWeight() { .assertEqual(vp2px(200)); expect(Math.round(SpaceEvenly_AddLayoutWeight_013.right - SpaceEvenly_AddLayoutWeight_013.left)) .assertEqual(vp2px(200)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1200] END'); + console.info('[testFlexAlignSpaceEvenlyLayoutWeight01] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1300 - * @tc.name Align_SpaceEvenly_Row_AddLayoutWeight + * @tc.name testFlexAlignSpaceEvenlyLayoutWeight02 * @tc.desc Some subcomponents are displayed with different layoutWeight properties */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1300', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1300] START'); + it('testFlexAlignSpaceEvenlyLayoutWeight02', 0, async function (done) { + console.info('[testFlexAlignSpaceEvenlyLayoutWeight02] 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}); @@ -126,7 +125,7 @@ export default function AlignSpaceEvenly_AddLayoutWeight() { expect(twoWidth + oneWidth).assertEqual(vp2px(350)); expect(Math.round(SpaceEvenly_AddLayoutWeight_013.right - SpaceEvenly_AddLayoutWeight_013.left)). assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1300] END'); + console.info('[testFlexAlignSpaceEvenlyLayoutWeight02] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddMargin.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddMargin.test.ets index 6ecd61e1f..7ea2fb026 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddMargin.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddMargin.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignSpaceEvenly_AddMargin() { describe('AlignSpaceEvenly_AddMargin', function () { beforeEach(async function (done) { @@ -47,12 +46,12 @@ export default function AlignSpaceEvenly_AddMargin() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0500 - * @tc.name Align_SpaceEvenly_Row_AddMargin + * @tc.name testFlexAlignSpaceEvenlyFlexMargin * @tc.desc The interface display where the child component is offset by the margin setting of the parent * component */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0500', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0500] START'); + it('testFlexAlignSpaceEvenlyFlexMargin', 0, async function (done) { + console.info('[testFlexAlignSpaceEvenlyFlexMargin] START'); globalThis.value.message.notify({name:'DadMargin',value:20}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('SpaceEvenly_AddMargin_01'); @@ -82,7 +81,7 @@ export default function AlignSpaceEvenly_AddMargin() { expect(Math.round(SpaceEvenly_AddMargin_011.bottom - SpaceEvenly_AddMargin_011.top)).assertEqual(vp2px(50)); expect(Math.round(SpaceEvenly_AddMargin_012.bottom - SpaceEvenly_AddMargin_012.top)).assertEqual(vp2px(100)); expect(Math.round(SpaceEvenly_AddMargin_013.bottom - SpaceEvenly_AddMargin_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0500] END'); + console.info('[testFlexAlignSpaceEvenlyFlexMargin] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOffset.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOffset.test.ets index 23b789311..045e047cc 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOffset.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOffset.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignSpaceEvenly_AddOffset() { describe('AlignSpaceEvenly_AddOffset', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignSpaceEvenly_AddOffset() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0900 - * @tc.name Align_SpaceEvenly_Row_AddOffset + * @tc.name testFlexAlignSpaceEvenlyTextOffset * @tc.desc The interface display of the component that sets the offset position when drawing */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0900', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0900] START'); + it('testFlexAlignSpaceEvenlyTextOffset', 0, async function (done) { + console.info('[testFlexAlignSpaceEvenlyTextOffset] START'); globalThis.value.message.notify({name:'OneOffset', value:{ x: 10, y: 15 }}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('SpaceEvenly_AddOffset_01'); @@ -80,7 +79,7 @@ export default function AlignSpaceEvenly_AddOffset() { expect(Math.round(SpaceEvenly_AddOffset_011.bottom - SpaceEvenly_AddOffset_011.top)).assertEqual(vp2px(50)); expect(Math.round(SpaceEvenly_AddOffset_012.bottom - SpaceEvenly_AddOffset_012.top)).assertEqual(vp2px(100)); expect(Math.round(SpaceEvenly_AddOffset_013.bottom - SpaceEvenly_AddOffset_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0900] END'); + console.info('[testFlexAlignSpaceEvenlyTextOffset] END'); done(); }); }) 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 fd13ad557..4d93cc3a6 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 @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignSpaceEvenly_AddOneMargin() { describe('AlignSpaceEvenly_AddOneMargin', function () { beforeEach(async function (done) { @@ -47,12 +46,12 @@ export default function AlignSpaceEvenly_AddOneMargin() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1500 - * @tc.name Align_SpaceEvenly_Row_AddOneMargin + * @tc.name testFlexAlignSpaceEvenlyTextMarginMeet * @tc.desc After setting margin for the first subcomponent, the layout of the parent component's spindle * meets the interface display of the subcomponent's layout */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1500', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1500] START'); + it('testFlexAlignSpaceEvenlyTextMarginMeet', 0, async function (done) { + console.info('[testFlexAlignSpaceEvenlyTextMarginMeet] START'); globalThis.value.message.notify({name:'OneMargin', value:20}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('SpaceEvenly_AddOneMargin_01'); @@ -81,17 +80,17 @@ export default function AlignSpaceEvenly_AddOneMargin() { expect(Math.round(SpaceEvenly_AddOneMargin_011.right - SpaceEvenly_AddOneMargin_011.left)).assertEqual(vp2px(150)); expect(Math.round(SpaceEvenly_AddOneMargin_012.right - SpaceEvenly_AddOneMargin_012.left)).assertEqual(vp2px(150)); expect(Math.round(SpaceEvenly_AddOneMargin_013.right - SpaceEvenly_AddOneMargin_013.left)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1500] END'); + console.info('[testFlexAlignSpaceEvenlyTextMarginMeet] END'); done(); }) /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1600 - * @tc.name Align_SpaceEvenly_Row_AddOneMargin + * @tc.name testFlexAlignSpaceEvenlyTextMarginOverflow * @tc.desc After setting margin for the first subcomponent, the layout of the parent component's spindle does * not meet the interface display of the subcomponent's layout */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1600', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1600] START'); + it('testFlexAlignSpaceEvenlyTextMarginOverflow', 0, async function (done) { + console.info('[testFlexAlignSpaceEvenlyTextMarginOverflow] START'); globalThis.value.message.notify({name:'OneMargin', value:30}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('SpaceEvenly_AddOneMargin_01'); @@ -121,7 +120,7 @@ export default function AlignSpaceEvenly_AddOneMargin() { .assertEqual(Math.round(vp2px(440/3))); expect(Math.round(SpaceEvenly_AddOneMargin_013.right - SpaceEvenly_AddOneMargin_013.left)) .assertEqual(Math.round(vp2px(440/3))); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1600] END'); + console.info('[testFlexAlignSpaceEvenlyTextMarginOverflow] END'); done(); }) }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneWidth.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneWidth.test.ets index 65af9868e..0a667af2f 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneWidth.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddOneWidth.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignSpaceEvenly_AddOneWidth() { describe('AlignSpaceEvenly_AddOneWidth', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignSpaceEvenly_AddOneWidth() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1400 - * @tc.name Align_SpaceEvenly_Row_ChangeOneWidth + * @tc.name testFlexAlignSpaceEvenlyTextWidth * @tc.desc The interface is displayed when you change the spindle length (width) of the first subassembly */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1400', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1400] START'); + it('testFlexAlignSpaceEvenlyTextWidth', 0, async function (done) { + console.info('[testFlexAlignSpaceEvenlyTextWidth] START'); globalThis.value.message.notify({name:'OneWidth', value:160}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('SpaceEvenly_AddOneWidth_01'); @@ -77,7 +76,7 @@ export default function AlignSpaceEvenly_AddOneWidth() { expect(Math.round(SpaceEvenly_AddOneWidth_011.bottom - SpaceEvenly_AddOneWidth_011.top)).assertEqual(vp2px(50)); expect(Math.round(SpaceEvenly_AddOneWidth_012.bottom - SpaceEvenly_AddOneWidth_012.top)).assertEqual(vp2px(100)); expect(Math.round(SpaceEvenly_AddOneWidth_013.bottom - SpaceEvenly_AddOneWidth_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1400] END'); + console.info('[testFlexAlignSpaceEvenlyTextWidth] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddPadding.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddPadding.test.ets index 568fea834..bf1ed9ec9 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddPadding.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddPadding.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignSpaceEvenly_AddPadding() { describe('AlignSpaceEvenly_AddPadding', function () { beforeEach(async function (done) { @@ -47,12 +46,12 @@ export default function AlignSpaceEvenly_AddPadding() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0300 - * @tc.name Align_SpaceEvenly_Row_AddPadding + * @tc.name testAlignSpaceEvenlyFlexPadMeet * @tc.desc After subtracting the padding from the parent component layout space, the interface * display that does not meet the spindle layout of the child component */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0300', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0300] START'); + it('testAlignSpaceEvenlyFlexPadMeet', 0, async function (done) { + console.info('[testAlignSpaceEvenlyFlexPadMeet] START'); globalThis.value.message.notify({name:'DadPadding', value:30}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('SpaceEvenly_AddPadding_01'); @@ -81,17 +80,17 @@ export default function AlignSpaceEvenly_AddPadding() { expect(Math.round(SpaceEvenly_AddPadding_011.left - SpaceEvenly_AddPadding_01.left)) .assertEqual(vp2px(30)); expect(Math.round(SpaceEvenly_AddPadding_01.right - SpaceEvenly_AddPadding_013.right)).assertEqual(vp2px(30)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0300] END'); + console.info('[testAlignSpaceEvenlyFlexPadMeet] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0400 - * @tc.name Align_SpaceAround_Row_AddPadding + * @tc.name testAlignSpaceEvenlyFlexPadOverflow * @tc.desc After subtracting the padding from the parent component layout space, the interface that * satisfies the spindle layout of the child component is displayed */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0400', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0400] START'); + it('testAlignSpaceEvenlyFlexPadOverflow', 0, async function (done) { + console.info('[testAlignSpaceEvenlyFlexPadOverflow] START'); globalThis.value.message.notify({name:'DadPadding', value:20}) await CommonFunc.sleep(3000); let strJson = getInspectorByKey('SpaceEvenly_AddPadding_01'); @@ -120,7 +119,7 @@ export default function AlignSpaceEvenly_AddPadding() { .assertEqual(Math.round(vp2px(22.5)*100)/100); expect(Math.round((SpaceEvenly_AddPadding_01.right - SpaceEvenly_AddPadding_013.right)*100)/100) .assertEqual(Math.round(vp2px(22.5)*100)/100); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0400] END'); + console.info('[testAlignSpaceEvenlyFlexPadOverflow] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddVisibility.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddVisibility.test.ets index b287adcf5..ff64571cc 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddVisibility.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_AddVisibility.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignSpaceEvenly_AddVisibility() { describe('AlignSpaceEvenly_AddVisibility', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignSpaceEvenly_AddVisibility() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1000 - * @tc.name Align_SpaceEvenly_Row_AddVisibility + * @tc.name textFlexAlignSpaceEvenlyTextVisibilityNone * @tc.desc The subcomponent sets the visibility. None, the child components are hidden in the interface display */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1000', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1000] START'); + it('textFlexAlignSpaceEvenlyTextVisibilityNone', 0, async function (done) { + console.info('[textFlexAlignSpaceEvenlyTextVisibilityNone] START'); try{ globalThis.value.message.notify({name:'OneVisibility', value:Visibility.None}); await CommonFunc.sleep(3000); @@ -83,20 +82,20 @@ export default function AlignSpaceEvenly_AddVisibility() { expect(Math.round(SpaceEvenly_AddVisibility_013.bottom - SpaceEvenly_AddVisibility_013.top)) .assertEqual(vp2px(150)); } catch (err) { - console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1000] failed'); + console.error('[textFlexAlignSpaceEvenlyTextVisibilityNone] failed'); expect().assertFail(); } - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1000] END'); + console.info('[textFlexAlignSpaceEvenlyTextVisibilityNone] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1100 - * @tc.name Align_SpaceEvenly_Row_AddVisibility + * @tc.name textFlexAlignSpaceEvenlyTextVisibilityHidden * @tc.desc When the subcomponent sets visibility.hidden, the interface of the subcomponent does not occupy the * position */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1100', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1100] START'); + it('textFlexAlignSpaceEvenlyTextVisibilityHidden', 0, async function (done) { + console.info('[textFlexAlignSpaceEvenlyTextVisibilityHidden] START'); try{ globalThis.value.message.notify({name:'OneVisibility',value:Visibility.Hidden}); await CommonFunc.sleep(3000); @@ -136,20 +135,20 @@ export default function AlignSpaceEvenly_AddVisibility() { expect(Math.round(SpaceEvenly_AddVisibility_013.bottom - SpaceEvenly_AddVisibility_013.top)) .assertEqual(vp2px(150)); } catch (err) { - console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1100] failed'); + console.error('[textFlexAlignSpaceEvenlyTextVisibilityHidden] failed'); expect().assertFail(); } - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1100] END'); + console.info('[textFlexAlignSpaceEvenlyTextVisibilityHidden] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1700 - * @tc.name Align_SpaceEvenly_Row_AddVisibility + * @tc.name textFlexAlignSpaceEvenlyTextVisibilityVisible * @tc.desc The subcomponent sets the visibility. Visible, the subcomponent does not occupy a position in the * interface display */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1700', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1700] START'); + it('textFlexAlignSpaceEvenlyTextVisibilityVisible', 0, async function (done) { + console.info('[textFlexAlignSpaceEvenlyTextVisibilityVisible] START'); try{ globalThis.value.message.notify({name:'OneVisibility',value:Visibility.Visible}); await CommonFunc.sleep(3000); @@ -189,10 +188,10 @@ export default function AlignSpaceEvenly_AddVisibility() { expect(Math.round(SpaceEvenly_AddVisibility_013.bottom - SpaceEvenly_AddVisibility_013.top)) .assertEqual(vp2px(150)); } catch (err) { - console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1700] failed'); + console.error('[textFlexAlignSpaceEvenlyTextVisibilityVisible] failed'); expect().assertFail(); } - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_1700] END'); + console.info('[textFlexAlignSpaceEvenlyTextVisibilityVisible] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_NoSpace.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_NoSpace.test.ets index 20d5c52c1..db58c2510 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_NoSpace.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/SpaceEvenly/AlignSpaceEvenly_NoSpace.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignSpaceEvenly_NoSpace() { describe('AlignSpaceEvenly_NoSpace', function () { beforeEach(async function (done) { @@ -47,12 +46,12 @@ export default function AlignSpaceEvenly_NoSpace() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0100 - * @tc.name Align_SpaceEvenly_Row_ChangeWidth + * @tc.name testFlexAlignSpaceEvenlyFlexWidthOverflow * @tc.desc The parent component layout space does not meet the interface display of the spindle layout of * the child component */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0100', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0100] START'); + it('testFlexAlignSpaceEvenlyFlexWidthOverflow', 0, async function (done) { + console.info('[testFlexAlignSpaceEvenlyFlexWidthOverflow] START'); globalThis.value.message.notify({name:'DadWidth', value:400}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('SpaceEvenly_NoSpace_01'); @@ -85,12 +84,12 @@ export default function AlignSpaceEvenly_NoSpace() { }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0200 - * @tc.name Align_SpaceEvenly_Row_ChangeWidth + * @tc.name testFlexAlignSpaceEvenlyFlexWidthMeet * @tc.desc The interface display where the parent component layout space satisfies the spindle layout of * the child component */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0200', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0200] START'); + it('testFlexAlignSpaceEvenlyFlexWidthMeet', 0, async function (done) { + console.info('[testFlexAlignSpaceEvenlyFlexWidthMeet] START'); let strJson = getInspectorByKey('SpaceEvenly_NoSpace_01'); globalThis.value.message.notify({name:'DadWidth', value:500}); await CommonFunc.sleep(3000); @@ -119,7 +118,7 @@ export default function AlignSpaceEvenly_NoSpace() { expect(Math.round(SpaceEvenly_NoSpace_011.bottom - SpaceEvenly_NoSpace_011.top)).assertEqual(vp2px(50)); expect(Math.round(SpaceEvenly_NoSpace_012.bottom - SpaceEvenly_NoSpace_012.top)).assertEqual(vp2px(100)); expect(Math.round(SpaceEvenly_NoSpace_013.bottom - SpaceEvenly_NoSpace_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_SPACEEVENLY_TEST_0200] END'); + console.info('[testFlexAlignSpaceEvenlyFlexWidthMeet] END'); done(); }); }); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAlign.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAlign.test.ets index 152a6084a..6e4a788bc 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAlign.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAlign.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignStart_AddAlign() { describe('AlignStart_AddAlign', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignStart_AddAlign() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0800 - * @tc.name Align_Start_Row_AddAlign + * @tc.name textFlexAlignStartAlignBottomEnd * @tc.desc Setting generic properties does not take effect, and owned properties take precedence */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0800', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0800] START'); + it('textFlexAlignStartAlignBottomEnd', 0, async function (done) { + console.info('[textFlexAlignStartAlignBottomEnd] START'); globalThis.value.message.notify({name:'DadAlign', value:Alignment.BottomEnd}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Start_AddAlign_01'); @@ -76,7 +75,7 @@ export default function AlignStart_AddAlign() { expect(Math.round(Start_AddAlign_012.bottom - Start_AddAlign_012.top)).assertEqual(vp2px(100)); expect(Math.round(Start_AddAlign_013.bottom - Start_AddAlign_013.top)).assertEqual(vp2px(150)); expect(Math.round(Start_AddAlign_01.right - Start_AddAlign_013.right)).assertEqual(vp2px(50)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0800] END'); + console.info('[textFlexAlignStartAlignBottomEnd] END'); done() }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAllSpace.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAllSpace.test.ets index 757eda1b1..b72a11af2 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAllSpace.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddAllSpace.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignStart_AddAllSpace() { describe('AlignStart_AddAllSpace', function () { beforeEach(async function (done) { @@ -46,12 +45,11 @@ export default function AlignStart_AddAllSpace() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0600 - * @tc.name Align_Start_Row_AddAllSpace - * @tc.desc After setting margin, after subtracting the padding from the layout space of the parent component, - * the interface display of the spindle layout that does not meet the sub-component + * @tc.name testFlexAlignStartFlexSpaceOverflow + * @tc.desc the space of the parent component set to 20 */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0600', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0600] START'); + it('testFlexAlignStartFlexSpaceOverflow', 0, async function (done) { + console.info('[testFlexAlignStartFlexSpaceOverflow] START'); globalThis.value.message.notify({name:'DadAllSpace', value:30}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Start_AddAllSpace_01'); @@ -79,17 +77,16 @@ export default function AlignStart_AddAllSpace() { expect(Math.round(Start_AddAllSpace_011.right - Start_AddAllSpace_011.left)).assertEqual(Math.round(vp2px(440/3))); expect(Math.round(Start_AddAllSpace_012.right - Start_AddAllSpace_012.left)).assertEqual(Math.round(vp2px(440/3))); expect(Math.round(Start_AddAllSpace_013.right - Start_AddAllSpace_013.left)).assertEqual(Math.round(vp2px(440/3))); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0600] END'); + console.info('[testFlexAlignStartFlexSpaceOverflow] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0700 - * @tc.name Align_Start_Row_AddAllSpace - * @tc.desc After setting margin, the interface that satisfies the spindle layout of the child component is - * displayed after subtracting the padding from the layout space of the parent component + * @tc.name testFlexAlignStartFlexSpaceMeet + * @tc.desc the space of the parent component set to 20 */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0700', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0700] START'); + it('testFlexAlignStartFlexSpaceMeet', 0, async function (done) { + console.info('[testFlexAlignStartFlexSpaceMeet] START'); globalThis.value.message.notify({name:'DadAllSpace', value:20}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Start_AddAllSpace_01'); @@ -117,7 +114,7 @@ export default function AlignStart_AddAllSpace() { expect(Math.round(Start_AddAllSpace_011.bottom - Start_AddAllSpace_011.top)).assertEqual(vp2px(50)); expect(Math.round(Start_AddAllSpace_012.bottom - Start_AddAllSpace_012.top)).assertEqual(vp2px(100)); expect(Math.round(Start_AddAllSpace_013.bottom - Start_AddAllSpace_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0700] END'); + console.info('[testFlexAlignStartFlexSpaceMeet] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddLayoutWeight.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddLayoutWeight.test.ets index df3c3d2ed..e4e474a58 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddLayoutWeight.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddLayoutWeight.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common"; -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignStart_AddLayoutWeight() { describe('AlignStart_AddLayoutWeight', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignStart_AddLayoutWeight() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1200 - * @tc.name Align_Start_Row_AddLayoutWeight + * @tc.name testFlexAlignStartTextLayoutWeight01 * @tc.desc The interface displays all subcomponents that set different layoutWeight properties */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1200', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1200] START'); + it('testFlexAlignStartTextLayoutWeight01', 0, async function (done) { + console.info('[testFlexAlignStartTextLayoutWeight01] START'); globalThis.value.message.notify({name:'OneLayoutWeight1', value:1}); globalThis.value.message.notify({name:'OneLayoutWeight2', value:2}); globalThis.value.message.notify({name:'OneLayoutWeight3', value:2}); @@ -78,16 +77,16 @@ export default function AlignStart_AddLayoutWeight() { expect(Math.round(Start_AddLayoutWeight_011.bottom - Start_AddLayoutWeight_011.top)).assertEqual(vp2px(50)); expect(Math.round(Start_AddLayoutWeight_012.bottom - Start_AddLayoutWeight_012.top)).assertEqual(vp2px(100)); expect(Math.round(Start_AddLayoutWeight_013.bottom - Start_AddLayoutWeight_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1200] END'); + console.info('[testFlexAlignStartTextLayoutWeight01] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1600 - * @tc.name Align_Start_Row_AddLayoutWeight + * @tc.name testFlexAlignStartTextLayoutWeight02 * @tc.desc Some subcomponents are displayed with different layoutWeight properties */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1600', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1600] START'); + it('testFlexAlignStartTextLayoutWeight02', 0, async function (done) { + console.info('[testFlexAlignStartTextLayoutWeight02] 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}); @@ -116,7 +115,7 @@ export default function AlignStart_AddLayoutWeight() { expect(Math.round(Start_AddLayoutWeight_011.bottom - Start_AddLayoutWeight_011.top)).assertEqual(vp2px(50)); expect(Math.round(Start_AddLayoutWeight_012.bottom - Start_AddLayoutWeight_012.top)).assertEqual(vp2px(100)); expect(Math.round(Start_AddLayoutWeight_013.bottom - Start_AddLayoutWeight_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1600] END'); + console.info('[testFlexAlignStartTextLayoutWeight02] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddMargin.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddMargin.test.ets index 004681a25..55ffb353d 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddMargin.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddMargin.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignStart_AddMargin() { describe('AlignStart_AddMargin', function () { beforeEach(async function (done) { @@ -47,12 +46,12 @@ export default function AlignStart_AddMargin() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0500 - * @tc.name Align_Start_Row_AddMargin + * @tc.name testFlexAlignStartFlexMargin * @tc.desc The interface display where the child component is offset by the margin setting of the parent * component */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0500', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0500] START'); + it('testFlexAlignStartFlexMargin', 0, async function (done) { + console.info('[testFlexAlignStartFlexMargin] START'); globalThis.value.message.notify({name:'DadMargin', value:20}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Start_AddMargin_01'); @@ -79,7 +78,7 @@ export default function AlignStart_AddMargin() { expect(Math.round(Start_AddMargin_011.right - Start_AddMargin_011.left)).assertEqual(vp2px(150)); expect(Math.round(Start_AddMargin_012.right - Start_AddMargin_012.left)).assertEqual(vp2px(150)); expect(Math.round(Start_AddMargin_013.right - Start_AddMargin_013.left)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0500] END'); + console.info('[testFlexAlignStartFlexMargin] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOffset.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOffset.test.ets index 3c02198c3..420b2e559 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOffset.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOffset.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignStart_AddOffset() { describe('AlignStart_AddOffset', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignStart_AddOffset() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0900 - * @tc.name Align_Start_Row_AddOffset + * @tc.name testFlexAlignStartTextOffset * @tc.desc The interface display of the component that sets the offset position when drawing */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0900', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0900] START'); + it('testFlexAlignStartTextOffset', 0, async function (done) { + console.info('[testFlexAlignStartTextOffset] START'); globalThis.value.message.notify({name:'OneOffset', value:{ x: 10, y: 15 }}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Start_AddOffset_01'); @@ -74,7 +73,7 @@ export default function AlignStart_AddOffset() { expect(Math.round(Start_AddOffset_011.bottom - Start_AddOffset_011.top)).assertEqual(vp2px(50)); expect(Math.round(Start_AddOffset_012.bottom - Start_AddOffset_012.top)).assertEqual(vp2px(100)); expect(Math.round(Start_AddOffset_013.bottom - Start_AddOffset_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0900] END'); + console.info('[testFlexAlignStartTextOffset] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneMargin.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneMargin.test.ets index a239d1643..bd8f24ff7 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneMargin.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneMargin.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignStart_AddOneMargin() { describe('AlignStart_AddOneMargin', function () { beforeEach(async function (done) { @@ -47,13 +46,12 @@ export default function AlignStart_AddOneMargin() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1400 - * @tc.name Align_Start_Row_AddOneMargin + * @tc.name testFlexAlignStartTextMarginMeet * @tc.desc After setting margin for the first subcomponent, the layout of the parent component's spindle * meets the interface display of the subcomponent's layout */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1400', 0, async function (done) { - //await CommonFunc.sleep(2000); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1400] START'); + it('testFlexAlignStartTextMarginMeet', 0, async function (done) { + console.info('[testFlexAlignStartTextMarginMeet] START'); globalThis.value.message.notify({name:'OneMargin', value:20}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Start_AddOneMargin_01'); @@ -77,17 +75,17 @@ export default function AlignStart_AddOneMargin() { expect(Math.round(Start_AddOneMargin_011.bottom - Start_AddOneMargin_011.top)).assertEqual(vp2px(50)); expect(Math.round(Start_AddOneMargin_012.bottom - Start_AddOneMargin_012.top)).assertEqual(vp2px(100)); expect(Math.round(Start_AddOneMargin_013.bottom - Start_AddOneMargin_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1400] END'); + console.info('[testFlexAlignStartTextMarginMeet] END'); done(); }) /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1500 - * @tc.name Align_Start_Row_AddOneMargin + * @tc.name testFlexAlignStartTextMarginOverflow * @tc.desc After setting margin for the first subcomponent, the layout of the parent component's spindle does * not meet the interface display of the subcomponent's layout */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1500', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1500] START'); + it('testFlexAlignStartTextMarginOverflow', 0, async function (done) { + console.info('[testFlexAlignStartTextMarginOverflow] START'); globalThis.value.message.notify({name:'OneMargin', value:30}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Start_AddOneMargin_01'); @@ -117,7 +115,7 @@ export default function AlignStart_AddOneMargin() { expect(Math.round(Start_AddOneMargin_011.bottom - Start_AddOneMargin_011.top)).assertEqual(vp2px(50)); expect(Math.round(Start_AddOneMargin_012.bottom - Start_AddOneMargin_012.top)).assertEqual(vp2px(100)); expect(Math.round(Start_AddOneMargin_013.bottom - Start_AddOneMargin_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1500] END'); + console.info('[testFlexAlignStartTextMarginOverflow] END'); done(); }) }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneWidth.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneWidth.test.ets index a1e38f372..0198777ed 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneWidth.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddOneWidth.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignStart_AddOneWidth() { describe('AlignStart_AddOneWidth', function () { beforeEach(async function (done) { @@ -47,11 +46,11 @@ export default function AlignStart_AddOneWidth() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1300 - * @tc.name Align_Start_Row_ChangeOneWidth - * @tc.desc The interface is displayed when you change the spindle length (width) of the first subassembly + * @tc.name testFlexAlignStartTextWidth + * @tc.desc The interface is displayed when you change the width of the first subcomponent */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1300', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1300] START'); + it('testFlexAlignStartTextWidth', 0, async function (done) { + console.info('[testFlexAlignStartTextWidth] START'); globalThis.value.message.notify({name:'OneWidth', value:160}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Start_AddOneWidth_01'); @@ -76,7 +75,7 @@ export default function AlignStart_AddOneWidth() { expect(Math.round(Start_AddOneWidth_012.bottom - Start_AddOneWidth_012.top)).assertEqual(vp2px(100)); expect(Math.round(Start_AddOneWidth_013.bottom - Start_AddOneWidth_013.top)).assertEqual(vp2px(150)); expect(Math.round(Start_AddOneWidth_01.right - Start_AddOneWidth_013.right)).assertEqual(vp2px(40)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1300] END'); + console.info('[testFlexAlignStartTextWidth] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddPadding.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddPadding.test.ets index 4605b4a58..c1398402b 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddPadding.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddPadding.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignStart_AddPadding() { describe('AlignStart_AddPadding', function () { beforeEach(async function (done) { @@ -47,13 +46,12 @@ export default function AlignStart_AddPadding() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0300 - * @tc.name Align_Start_Row_AddPadding + * @tc.name testFlexAlignStartFlexPadOverflow * @tc.desc After subtracting the padding from the parent component layout space, the interface display * that does not meet the spindle layout of the child component */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0300', 0, async function (done) { - //await CommonFunc.sleep(2000); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0300] START'); + it('testFlexAlignStartFlexPadOverflow', 0, async function (done) { + console.info('[testFlexAlignStartFlexPadOverflow] START'); globalThis.value.message.notify({name:'DadPadding', value:30}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Start_AddPadding_01'); @@ -78,17 +76,17 @@ export default function AlignStart_AddPadding() { expect(Math.round(Start_AddPadding_011.bottom - Start_AddPadding_011.top)).assertEqual(vp2px(50)); expect(Math.round(Start_AddPadding_012.bottom - Start_AddPadding_012.top)).assertEqual(vp2px(100)); expect(Math.round(Start_AddPadding_013.bottom - Start_AddPadding_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0300] END'); + console.info('[testFlexAlignStartFlexPadOverflow] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0400 - * @tc.name Align_Start_Row_AddPadding + * @tc.name testFlexAlignStartFlexPadMeet * @tc.desc After subtracting the padding from the parent component layout space, the interface that * satisfies the spindle layout of the child component is displayed */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0400', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0400] START'); + it('testFlexAlignStartFlexPadMeet', 0, async function (done) { + console.info('[testFlexAlignStartFlexPadMeet] START'); globalThis.value.message.notify({name:'DadPadding', value:20}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Start_AddPadding_01'); @@ -113,7 +111,7 @@ export default function AlignStart_AddPadding() { expect(Math.round(Start_AddPadding_011.bottom - Start_AddPadding_011.top)).assertEqual(vp2px(50)); expect(Math.round(Start_AddPadding_012.bottom - Start_AddPadding_012.top)).assertEqual(vp2px(100)); expect(Math.round(Start_AddPadding_013.bottom - Start_AddPadding_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0400] END'); + console.info('[testFlexAlignStartFlexPadMeet] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddVisibility.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddVisibility.test.ets index 74f903963..5fb8d5830 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddVisibility.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_AddVisibility.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignStart_AddVisibility() { describe('AlignStart_AddVisibility', function () { beforeEach(async function (done) { @@ -45,11 +44,11 @@ export default function AlignStart_AddVisibility() { }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1000 - * @tc.name Align_Start_Row_AddVisibility + * @tc.name testFlexAlignStartTextVisibilityNone * @tc.desc The subcomponent sets the visibility. None, the child components are hidden in the interface display */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1000', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1000] START'); + it('testFlexAlignStartTextVisibilityNone', 0, async function (done) { + console.info('[testFlexAlignStartTextVisibilityNone] START'); try{ globalThis.value.message.notify({name:'OneVisibility', value:Visibility.None}); await CommonFunc.sleep(3000); @@ -74,20 +73,20 @@ export default function AlignStart_AddVisibility() { expect(Math.round(Start_AddVisibility_013.bottom - Start_AddVisibility_013.top)).assertEqual(vp2px(150)); expect(Math.round(Start_AddVisibility_01.right - Start_AddVisibility_013.right)).assertEqual(vp2px(200)); } catch (err) { - console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1000] failed'); + console.error('[testFlexAlignStartTextVisibilityNone] failed'); expect().assertFail(); } - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1000] END'); + console.info('[testFlexAlignStartTextVisibilityNone] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1100 - * @tc.name Align_Start_Row_AddVisibility + * @tc.name testFlexAlignStartTextVisibilityHidden * @tc.desc When the subcomponent sets visibility.hidden, the interface of the subcomponent does not occupy the * position */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1100', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1100] START'); + it('testFlexAlignStartTextVisibilityHidden', 0, async function (done) { + console.info('[testFlexAlignStartTextVisibilityHidden] START'); try{ globalThis.value.message.notify({name:'OneVisibility', value:Visibility.Hidden}); await CommonFunc.sleep(3000); @@ -117,20 +116,20 @@ export default function AlignStart_AddVisibility() { expect(Math.round(Start_AddVisibility_013.bottom - Start_AddVisibility_013.top)).assertEqual(vp2px(150)); expect(Math.round(Start_AddVisibility_012.left - Start_AddVisibility_01.left)).assertEqual(vp2px(150)); } catch (err) { - console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1100] failed'); + console.error('[testFlexAlignStartTextVisibilityHidden] failed'); expect().assertFail(); } - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1100] END'); + console.info('[testFlexAlignStartTextVisibilityHidden] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1700 - * @tc.name Align_Start_Row_AddVisibility + * @tc.name testFlexAlignStartTextVisibilityVisible * @tc.desc The subcomponent sets the visibility. Visible, the subcomponent does not occupy a position in the * interface display */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1700', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1700] START'); + it('testFlexAlignStartTextVisibilityVisible', 0, async function (done) { + console.info('[testFlexAlignStartTextVisibilityVisible] START'); try{ globalThis.value.message.notify({name:'OneVisibility', value:Visibility.Visible}); await CommonFunc.sleep(3000); @@ -160,10 +159,10 @@ export default function AlignStart_AddVisibility() { expect(Math.round(Start_AddVisibility_013.bottom - Start_AddVisibility_013.top)).assertEqual(vp2px(150)); expect(Math.round(Start_AddVisibility_012.left - Start_AddVisibility_01.left)).assertEqual(vp2px(150)); } catch (err) { - console.error('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1700] failed'); + console.error('[testFlexAlignStartTextVisibilityVisible] failed'); expect().assertFail(); } - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_1700] END'); + console.info('[testFlexAlignStartTextVisibilityVisible] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_NoSpace.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_NoSpace.test.ets index 00c3f9fb6..b0338353c 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_NoSpace.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Flex/justifyContent/Start/AlignStart_NoSpace.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium"; import router from '@system.router'; import CommonFunc from "./../../../../MainAbility/common/Common" -import {MessageManager,Callback} from './../../../../MainAbility/common/MessageManager'; export default function AlignStart_NoSpace() { describe('AlignStart_NoSpace', function () { beforeEach(async function (done) { @@ -47,12 +46,12 @@ export default function AlignStart_NoSpace() { /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0100 - * @tc.name Align_Start_Row_ChangeWidth + * @tc.name testFlexAlignStartFlexWidthOverflow * @tc.desc The parent component layout space does not meet the interface display of the spindle layout of * the child component */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0100', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0100] START'); + it('testFlexAlignStartFlexWidthOverflow', 0, async function (done) { + console.info('[testFlexAlignStartFlexWidthOverflow] START'); globalThis.value.message.notify({name:'DadWidth', value:400}); await CommonFunc.sleep(3000); let strJson = getInspectorByKey('Start_NoSpace_01'); @@ -77,17 +76,17 @@ export default function AlignStart_NoSpace() { expect(Math.round(Start_NoSpace_011.bottom - Start_NoSpace_011.top)).assertEqual(vp2px(50)); expect(Math.round(Start_NoSpace_012.bottom - Start_NoSpace_012.top)).assertEqual(vp2px(100)); expect(Math.round(Start_NoSpace_013.bottom - Start_NoSpace_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0100] END'); + console.info('[testFlexAlignStartFlexWidthOverflow] END'); done(); }); /** * @tc.number SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0200 - * @tc.name Align_Start_Row_ChangeWidth + * @tc.name testFlexAlignStartFlexWidthMeet * @tc.desc The interface display where the parent component layout space satisfies the spindle layout of * the child component */ - it('SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0200', 0, async function (done) { - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0200] START'); + it('testFlexAlignStartFlexWidthMeet', 0, async function (done) { + console.info('[testFlexAlignStartFlexWidthMeet] START'); let strJson = getInspectorByKey('Start_NoSpace_01'); globalThis.value.message.notify({name:'DadWidth', value:500}) await CommonFunc.sleep(3000); @@ -112,7 +111,7 @@ export default function AlignStart_NoSpace() { expect(Math.round(Start_NoSpace_011.bottom - Start_NoSpace_011.top)).assertEqual(vp2px(50)); expect(Math.round(Start_NoSpace_012.bottom - Start_NoSpace_012.top)).assertEqual(vp2px(100)); expect(Math.round(Start_NoSpace_013.bottom - Start_NoSpace_013.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_FLEX_JUSTIFYCONTENT_FLEXALIGN_START_TEST_0200] END'); + console.info('[testFlexAlignStartFlexWidthMeet] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_Gap.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_Gap.test.ets index 8c9e9992a..57eb8d784 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_Gap.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_Gap.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function Grid_RowCol_Gap() { describe('Grid_RowCol_GapTest', function () { beforeEach(async function (done) { - console.info("Grid_RowCol_Gap beforeEach start"); + console.info("Grid_RowCol_GapTest beforeEach start"); let options = { url: "MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_Gap", } @@ -38,6 +37,7 @@ export default function Grid_RowCol_Gap() { console.error("push Grid_RowCol_Gap page error " + JSON.stringify(err)); expect().assertFail(); } + console.info("Grid_RowCol_GapTest beforeEach end"); done(); }); afterEach(async function () { @@ -46,11 +46,11 @@ export default function Grid_RowCol_Gap() { }); /** * @tc.number SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0600 - * @tc.name Grid_RowCol_Gap + * @tc.name testGridColGap * @tc.desc Add columnGap,Grid is divided into 4 equal parts, 4 components */ - it('SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0600', 0, async function (done) { - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0600] START'); + it('testGridColGap', 0, async function (done) { + console.info('[testGridColGap] START'); await CommonFunc.sleep(3000); let gridContainerStrJson = getInspectorByKey('Grid_RowCol_Gap_01'); let gridContainerObj = JSON.parse(gridContainerStrJson); @@ -96,16 +96,16 @@ export default function Grid_RowCol_Gap() { expect(Math.round(Grid_RowCol_Gap_012.bottom - Grid_RowCol_Gap_012.top)).assertEqual(vp2px(150)); expect(Math.round(Grid_RowCol_Gap_013.bottom - Grid_RowCol_Gap_013.top)).assertEqual(vp2px(150)); expect(Math.round(Grid_RowCol_Gap_014.bottom - Grid_RowCol_Gap_014.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0600] END'); + console.info('[testGridColGap] END'); done(); }); /** * @tc.number SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0700 - * @tc.name Grid_RowCol_Gap + * @tc.name testGridRowGap * @tc.desc Add rowGap,Grid is divided into 4 equal parts, 4 components */ - it('SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0700', 0, async function (done) { - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0700] START'); + it('testGridRowGap', 0, async function (done) { + console.info('[testGridRowGap] START'); globalThis.value.message.notify({name:'addColumnGap', value:0}); globalThis.value.message.notify({name:'addRowGap', value:5}); await CommonFunc.sleep(3000); @@ -153,16 +153,16 @@ export default function Grid_RowCol_Gap() { .assertEqual(Math.round(vp2px(147.5)*100)/100); expect(Math.round((Grid_RowCol_Gap_014.bottom - Grid_RowCol_Gap_014.top)*100)/100) .assertEqual(Math.round(vp2px(147.5)*100)/100); - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0700] END'); + console.info('[testGridRowGap] END'); done(); }); /** * @tc.number SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0800 - * @tc.name Grid_RowCol_Gap + * @tc.name testGridRowColGap * @tc.desc Add columnGap and rowGap,Grid is divided into 4 equal parts, 4 components */ - it('SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0800', 0, async function (done) { - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0800] START'); + it('testGridRowColGap', 0, async function (done) { + console.info('[testGridRowColGap] START'); globalThis.value.message.notify({name:'addColumnGap', value:5}); globalThis.value.message.notify({name:'addRowGap', value:5}); await CommonFunc.sleep(3000); @@ -216,7 +216,7 @@ export default function Grid_RowCol_Gap() { .assertEqual(Math.round(vp2px(147.5)*100)/100); expect(Math.round((Grid_RowCol_Gap_014.bottom - Grid_RowCol_Gap_014.top)*100)/100) .assertEqual(Math.round(vp2px(147.5)*100)/100); - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0800] END'); + console.info('[testGridRowColGap] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_GridSize.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_GridSize.test.ets index 711129ef1..e003e41f9 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_GridSize.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_GridSize.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function Grid_RowCol_GridSize() { describe('Grid_RowCol_GridSizeTest', function () { beforeEach(async function (done) { @@ -38,6 +37,7 @@ export default function Grid_RowCol_GridSize() { console.error("push Grid_RowCol_GridSize page error " + JSON.stringify(err)); expect().assertFail(); } + console.info("Grid_RowCol_GridSize beforeEach end"); done(); }); afterEach(async function () { @@ -46,11 +46,11 @@ export default function Grid_RowCol_GridSize() { }); /** * @tc.number SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0100 - * @tc.name Grid_RowCol_GridSize + * @tc.name testGridRowColGridSize01 * @tc.desc The Width 200 height 200,Grid is divided into 4 equal parts, 4 components */ - it('SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0100', 0, async function (done) { - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0100] START'); + it('testGridRowColGridSize01', 0, async function (done) { + console.info('[testGridRowColGridSize01] START'); await CommonFunc.sleep(3000); let gridContainerStrJson = getInspectorByKey('Grid_RowCol_GridSize_01'); let gridContainerObj = JSON.parse(gridContainerStrJson); @@ -88,16 +88,16 @@ export default function Grid_RowCol_GridSize() { expect(Math.round(Grid_RowCol_GridSize_012.bottom - Grid_RowCol_GridSize_012.top)).assertEqual(vp2px(100)); expect(Math.round(Grid_RowCol_GridSize_013.bottom - Grid_RowCol_GridSize_013.top)).assertEqual(vp2px(100)); expect(Math.round(Grid_RowCol_GridSize_014.bottom - Grid_RowCol_GridSize_014.top)).assertEqual(vp2px(100)); - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0100] END'); + console.info('[testGridRowColGridSize01] END'); done(); }); /** * @tc.number SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0200 - * @tc.name Grid_RowCol_GridSize + * @tc.name testGridRowColGridSize02 * @tc.desc The Width 200 height 300,Grid is divided into 4 equal parts, 4 components */ - it('SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0200', 0, async function (done) { - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0200] START'); + it('testGridRowColGridSize02', 0, async function (done) { + console.info('[testGridRowColGridSize02] START'); globalThis.value.message.notify({name:'changeHeight', value:300}); await CommonFunc.sleep(3000); let gridContainerStrJson = getInspectorByKey('Grid_RowCol_GridSize_01'); @@ -136,7 +136,7 @@ export default function Grid_RowCol_GridSize() { expect(Math.round(Grid_RowCol_GridSize_012.bottom - Grid_RowCol_GridSize_012.top)).assertEqual(vp2px(150)); expect(Math.round(Grid_RowCol_GridSize_013.bottom - Grid_RowCol_GridSize_013.top)).assertEqual(vp2px(150)); expect(Math.round(Grid_RowCol_GridSize_014.bottom - Grid_RowCol_GridSize_014.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0200] END'); + console.info('[testGridRowColGridSize02] END'); done(); }); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_LayoutDirection.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_LayoutDirection.test.ets index d1b84af3d..c19cd35fa 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_LayoutDirection.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_LayoutDirection.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function Grid_RowCol_LayoutDirection() { describe('Grid_RowCol_LayoutDirectionTest', function () { beforeEach(async function (done) { - console.info("Grid_RowCol_LayoutDirection beforeEach start"); + console.info("Grid_RowCol_LayoutDirectionTest beforeEach start"); let options = { url: "MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_LayoutDirection", } @@ -38,6 +37,7 @@ export default function Grid_RowCol_LayoutDirection() { console.error("push Grid_RowCol_LayoutDirection page error " + JSON.stringify(err)); expect().assertFail(); } + console.info("Grid_RowCol_LayoutDirectionTest beforeEach end"); done(); }); afterEach(async function () { @@ -46,11 +46,11 @@ export default function Grid_RowCol_LayoutDirection() { }); /** * @tc.number SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0900 - * @tc.name Grid_RowCol_LayoutDirection + * @tc.name testGridRowColGridLayoutDirection * @tc.desc The Grid layout layoutDirection property does not take effect */ - it('SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0900', 0, async function (done) { - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0900] START'); + it('testGridRowColGridLayoutDirection', 0, async function (done) { + console.info('[testGridRowColGridLayoutDirection] START'); await CommonFunc.sleep(3000); let gridContainerStrJson = getInspectorByKey('Grid_RowCol_LayoutDirection_01'); let gridContainerObj = JSON.parse(gridContainerStrJson); @@ -93,7 +93,7 @@ export default function Grid_RowCol_LayoutDirection() { .assertEqual(vp2px(150)); expect(Math.round(Grid_RowCol_LayoutDirection_014.bottom - Grid_RowCol_LayoutDirection_014.top)) .assertEqual(vp2px(150)); - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0900] END'); + console.info('[testGridRowColGridLayoutDirection] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_PadMar.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_PadMar.test.ets index fd96eab58..581b8bb8b 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_PadMar.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_PadMar.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function Grid_RowCol_PadMar() { describe('Grid_RowCol_PadMarTest', function () { beforeEach(async function (done) { - console.info("Grid_RowCol_PadMar beforeEach start"); + console.info("Grid_RowCol_PadMarTest beforeEach start"); let options = { url: "MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_PadMar", } @@ -38,6 +37,7 @@ export default function Grid_RowCol_PadMar() { console.error("push Grid_RowCol_PadMar page error " + JSON.stringify(err)); expect().assertFail(); } + console.info("Grid_RowCol_PadMarTest beforeEach end"); done(); }); afterEach(async function () { @@ -46,11 +46,11 @@ export default function Grid_RowCol_PadMar() { }); /** * @tc.number SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0300 - * @tc.name Grid_RowCol_PadMar + * @tc.name testGridRowColGridPad * @tc.desc Add padding,Grid is divided into 4 equal parts, 4 components */ - it('SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0300', 0, async function (done) { - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0300] START'); + it('testGridRowColGridPad', 0, async function (done) { + console.info('[testGridRowColGridPad] START'); await CommonFunc.sleep(3000); let gridContainerStrJson = getInspectorByKey('Grid_RowCol_PadMar_01'); let gridContainerObj = JSON.parse(gridContainerStrJson); @@ -88,16 +88,16 @@ export default function Grid_RowCol_PadMar() { expect(Math.round(Grid_RowCol_PadMar_012.bottom - Grid_RowCol_PadMar_012.top)).assertEqual(vp2px(140)); expect(Math.round(Grid_RowCol_PadMar_013.bottom - Grid_RowCol_PadMar_013.top)).assertEqual(vp2px(140)); expect(Math.round(Grid_RowCol_PadMar_014.bottom - Grid_RowCol_PadMar_014.top)).assertEqual(vp2px(140)); - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0300] END'); + console.info('[testGridRowColGridPad] END'); done(); }); /** * @tc.number SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0400 - * @tc.name Grid_RowCol_PadMar + * @tc.name testGridRowColGridMargin * @tc.desc Add margin,Grid is divided into 4 equal parts, 4 components */ - it('SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0400', 0, async function (done) { - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0400] START'); + it('testGridRowColGridMargin', 0, async function (done) { + console.info('[testGridRowColGridMargin] START'); globalThis.value.message.notify({name:'addPadding', value:0}); globalThis.value.message.notify({name:'addMargin', value:10}); await CommonFunc.sleep(3000); @@ -142,16 +142,16 @@ export default function Grid_RowCol_PadMar() { expect(Math.round(Grid_RowCol_PadMar_012.bottom - Grid_RowCol_PadMar_012.top)).assertEqual(vp2px(150)); expect(Math.round(Grid_RowCol_PadMar_013.bottom - Grid_RowCol_PadMar_013.top)).assertEqual(vp2px(150)); expect(Math.round(Grid_RowCol_PadMar_014.bottom - Grid_RowCol_PadMar_014.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0400] END'); + console.info('[testGridRowColGridMargin] END'); done(); }); /** * @tc.number SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0500 - * @tc.name Grid_RowCol_PadMar + * @tc.name testGridRowColGridPadMar * @tc.desc Add padding and margin,Grid is divided into 4 equal parts, 4 components */ - it('SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0500', 0, async function (done) { - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0500] START'); + it('testGridRowColGridPadMar', 0, async function (done) { + console.info('[testGridRowColGridPadMar] START'); globalThis.value.message.notify({name:'addPadding', value:10}); globalThis.value.message.notify({name:'addMargin', value:10}); await CommonFunc.sleep(3000); @@ -197,7 +197,7 @@ export default function Grid_RowCol_PadMar() { expect(Math.round(Grid_RowCol_PadMar_012.bottom - Grid_RowCol_PadMar_012.top)).assertEqual(vp2px(140)); expect(Math.round(Grid_RowCol_PadMar_013.bottom - Grid_RowCol_PadMar_013.top)).assertEqual(vp2px(140)); expect(Math.round(Grid_RowCol_PadMar_014.bottom - Grid_RowCol_PadMar_014.top)).assertEqual(vp2px(140)); - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_0500] END'); + console.info('[testGridRowColGridPadMar] END'); done(); }); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_cellLength.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_cellLength.test.ets index 173d171a6..ecc435d9c 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_cellLength.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_cellLength.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function Grid_RowCol_cellLength() { describe('Grid_RowCol_cellLengthTest', function () { beforeEach(async function (done) { - console.info("Grid_RowCol_cellLength beforeEach start"); + console.info("Grid_RowCol_cellLengthTest beforeEach start"); let options = { url: "MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_cellLength", } @@ -38,6 +37,7 @@ export default function Grid_RowCol_cellLength() { console.error("push Grid_RowCol_cellLength page error " + JSON.stringify(err)); expect().assertFail(); } + console.info("Grid_RowCol_cellLengthTest beforeEach end"); done(); }); afterEach(async function () { @@ -46,11 +46,11 @@ export default function Grid_RowCol_cellLength() { }); /** * @tc.number SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_1100 - * @tc.name Grid_RowCol_cellLength + * @tc.name testGridRowColGridCellLength * @tc.desc The Grid layout cellLength property does not take effect */ - it('SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_1100', 0, async function (done) { - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_1100] START'); + it('testGridRowColGridCellLength', 0, async function (done) { + console.info('[testGridRowColGridCellLength] START'); await CommonFunc.sleep(3000); let gridContainerStrJson = getInspectorByKey('Grid_RowCol_cellLength_01'); let gridContainerObj = JSON.parse(gridContainerStrJson); @@ -88,7 +88,7 @@ export default function Grid_RowCol_cellLength() { expect(Math.round(Grid_RowCol_cellLength_012.bottom - Grid_RowCol_cellLength_012.top)).assertEqual(vp2px(150)); expect(Math.round(Grid_RowCol_cellLength_013.bottom - Grid_RowCol_cellLength_013.top)).assertEqual(vp2px(150)); expect(Math.round(Grid_RowCol_cellLength_014.bottom - Grid_RowCol_cellLength_014.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_1100] END'); + console.info('[testGridRowColGridCellLength] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_maxCount.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_maxCount.test.ets index 925f2505c..97a0bfc54 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_maxCount.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_maxCount.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function Grid_RowCol_maxCount() { describe('Grid_RowCol_maxCountTest', function () { beforeEach(async function (done) { - console.info("Grid_RowCol_maxCount beforeEach start"); + console.info("Grid_RowCol_maxCountTest beforeEach start"); let options = { url: "MainAbility/pages/Grid/GridTemplatesAllSet/GridChange/Grid_RowCol_maxCount", } @@ -38,6 +37,7 @@ export default function Grid_RowCol_maxCount() { console.error("push Grid_RowCol_maxCount page error " + JSON.stringify(err)); expect().assertFail(); } + console.info("Grid_RowCol_maxCountTest beforeEach end"); done(); }); afterEach(async function () { @@ -46,11 +46,11 @@ export default function Grid_RowCol_maxCount() { }); /** * @tc.number SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_1000 - * @tc.name Grid_RowCol_maxCount + * @tc.name testGridRowColGridMaxCount * @tc.desc The Grid layout maxCount property does not take effect */ - it('SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_1000', 0, async function (done) { - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_1000] START'); + it('testGridRowColGridMaxCount', 0, async function (done) { + console.info('[testGridRowColGridMaxCount] START'); await CommonFunc.sleep(3000); let gridContainerStrJson = getInspectorByKey('Grid_RowCol_maxCount_01'); let gridContainerObj = JSON.parse(gridContainerStrJson); @@ -88,7 +88,7 @@ export default function Grid_RowCol_maxCount() { expect(Math.round(Grid_RowCol_maxCount_012.bottom - Grid_RowCol_maxCount_012.top)).assertEqual(vp2px(150)); expect(Math.round(Grid_RowCol_maxCount_013.bottom - Grid_RowCol_maxCount_013.top)).assertEqual(vp2px(150)); expect(Math.round(Grid_RowCol_maxCount_014.bottom - Grid_RowCol_maxCount_014.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDCHANGE_1000] END'); + console.info('[testGridRowColGridMaxCount] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridTemplateChange/Grid_RowCol_TemplateChange.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridTemplateChange/Grid_RowCol_TemplateChange.test.ets index f76002738..ae9459f21 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridTemplateChange/Grid_RowCol_TemplateChange.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Grid/GridTemplatesAllSet/GridTemplateChange/Grid_RowCol_TemplateChange.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../../MainAbility/common/MessageManager'; export default function Grid_RowCol_TemplateChange() { describe('Grid_RowCol_TemplateChangeTest', function () { beforeEach(async function (done) { - console.info("Grid_RowCol_TemplateChange beforeEach start"); + console.info("Grid_RowCol_TemplateChangeTest beforeEach start"); let options = { url: "MainAbility/pages/Grid/GridTemplatesAllSet/GridTemplateChange/Grid_RowCol_TemplateChange", } @@ -38,6 +37,7 @@ export default function Grid_RowCol_TemplateChange() { console.error("push Grid_RowCol_TemplateChange page error " + JSON.stringify(err)); expect().assertFail(); } + console.info("Grid_RowCol_TemplateChangeTest beforeEach end"); done(); }); afterEach(async function () { @@ -46,11 +46,11 @@ export default function Grid_RowCol_TemplateChange() { }); /** * @tc.number SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDTEMPLATECHANGE_0100 - * @tc.name Grid_RowCol_TemplateChange + * @tc.name testGridRowColTemplateChange01 * @tc.desc Grid is divided into 4 equal parts, 4 components */ - it('SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDTEMPLATECHANGE_0100', 0, async function (done) { - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDTEMPLATECHANGE_0100] START'); + it('testGridRowColTemplateChange01', 0, async function (done) { + console.info('[testGridRowColTemplateChange01] START'); await CommonFunc.sleep(1000); let gridContainerStrJson = getInspectorByKey('GridTemplateChange_Grid_01'); let gridContainerObj = JSON.parse(gridContainerStrJson); @@ -88,16 +88,16 @@ export default function Grid_RowCol_TemplateChange() { expect(Math.round(GridTemplateChange_Grid_012.bottom - GridTemplateChange_Grid_012.top)).assertEqual(vp2px(150)); expect(Math.round(GridTemplateChange_Grid_013.bottom - GridTemplateChange_Grid_013.top)).assertEqual(vp2px(150)); expect(Math.round(GridTemplateChange_Grid_014.bottom - GridTemplateChange_Grid_014.top)).assertEqual(vp2px(150)); - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDTEMPLATECHANGE_0100] END'); + console.info('[testGridRowColTemplateChange01] END'); done(); }); /** * @tc.number SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDTEMPLATECHANGE_0200 - * @tc.name Grid_RowCol_TemplateChange + * @tc.name testGridRowColTemplateChange02 * @tc.desc Grid is divided into 9 equal parts, 4 components */ - it('SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDTEMPLATECHANGE_0200', 0, async function (done) { - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDTEMPLATECHANGE_0200] START'); + it('testGridRowColTemplateChange02', 0, async function (done) { + console.info('[testGridRowColTemplateChange02] START'); globalThis.value.message.notify({name:'testColumnsTemplate', value:"1fr 1fr 1fr"}); globalThis.value.message.notify({name:'testRowsTemplate', value:"1fr 1fr 1fr"}); await CommonFunc.sleep(3000); @@ -134,7 +134,7 @@ export default function Grid_RowCol_TemplateChange() { expect(Math.round(GridTemplateChange_Grid_012.bottom - GridTemplateChange_Grid_012.top)).assertEqual(vp2px(100)); expect(Math.round(GridTemplateChange_Grid_013.bottom - GridTemplateChange_Grid_013.top)).assertEqual(vp2px(100)); expect(Math.round(GridTemplateChange_Grid_014.bottom - GridTemplateChange_Grid_014.top)).assertEqual(vp2px(100)); - console.info('[SUB_ACE_GRID_GRIDTEMPLATESALLSET_GRIDTEMPLATECHANGE_0200] END'); + console.info('[testGridRowColTemplateChange02] END'); done(); }); diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/List/List_initialIndex/List_ListInitialIndex1.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/List/List_initialIndex/List_ListInitialIndex1.test.ets index c37816b75..fe232347b 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/List/List_initialIndex/List_ListInitialIndex1.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/List/List_initialIndex/List_ListInitialIndex1.test.ets @@ -18,7 +18,6 @@ import router from '@ohos.router'; import CommonFunc from '../../../MainAbility/common/Common'; import { UiComponent, UiDriver, Component, Driver, UiWindow, ON, BY, MatchPattern, DisplayRotation, ResizeDirection, WindowMode, PointerMatrix, UiDirection, MouseButton } from '@ohos.UiTest'; -import { MessageManager,Callback } from '../../../MainAbility/common/MessageManager'; export default function list_ListInitialIndex1Test() { describe('List_ListInitialIndex1Test', function () { beforeEach(async function (done) { diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/spaceChanged/Row_Space.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/spaceChanged/Row_Space.test.ets index e4847092f..87c9d2cfe 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/spaceChanged/Row_Space.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Row/spaceChanged/Row_Space.test.ets @@ -16,11 +16,10 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../MainAbility/common/Common'; -import {MessageManager,Callback} from '../../../MainAbility/common/MessageManager'; export default function Row_Space() { describe('row_SpaceTest', function () { beforeEach(async function (done) { - console.info("Row_Space beforeEach start"); + console.info("row_SpaceTest beforeEach start"); let options = { url: "MainAbility/pages/Row/spaceChanged/Row_Space", } @@ -38,6 +37,7 @@ export default function Row_Space() { console.error("push Row_Space page error " + JSON.stringify(err)); expect().assertFail(); } + console.info("row_SpaceTest beforeEach end"); done(); }); afterEach(async function () { @@ -46,11 +46,12 @@ export default function Row_Space() { }); /** * @tc.number SUB_ACE_ROW_SPACE_TEST_0100 - * @tc.name Row_Space - * @tc.desc The value of space changes, and the layout size of the parent and child components is fixed + * @tc.name testRowSpaceUnfill + * @tc.desc The space of parent component set to 10,The child component is not fully filled with + * the parent component */ - it('SUB_ACE_ROW_SPACE_0100', 0, async function (done) { - console.info('[SUB_ACE_ROW_SPACE_TEST_0100] START'); + it('testRowSpaceUnfill', 0, async function (done) { + console.info('[testRowSpaceUnfill] START'); globalThis.value.message.notify({name:'addSpace', value:10}); await CommonFunc.sleep(3000); let Row_Space_011 = CommonFunc.getComponentRect('Row_Space_011'); @@ -74,16 +75,17 @@ export default function Row_Space() { expect(Math.round(Row_Space_011.right - Row_Space_011.left)).assertEqual(vp2px(100)); expect(Math.round(Row_Space_012.right - Row_Space_012.left)).assertEqual(vp2px(100)); expect(Math.round(Row_Space_013.right - Row_Space_013.left)).assertEqual(vp2px(100)); - console.info('[SUB_ACE_ROW_SPACE_TEST_0100] END'); + console.info('[testRowSpaceUnfill] END'); done(); }); /** * @tc.number SUB_ACE_ROW_SPACE_TEST_0200 - * @tc.name Row_Space - * @tc.desc The value of space changes, and the layout size of the parent and child components is fixed + * @tc.name testRowSpaceFill + * @tc.desc The space of parent component set to 25,The child component is filled with + * the parent component */ - it('SUB_ACE_ROW_SPACE_TEST_0200', 0, async function (done) { - console.info('[SUB_ACE_ROW_SPACE_TEST_0200] START'); + it('testRowSpaceFill', 0, async function (done) { + console.info('[testRowSpaceFill] START'); globalThis.value.message.notify({name:'addSpace', value:25}); await CommonFunc.sleep(3000); let Row_Space_011 = CommonFunc.getComponentRect('Row_Space_011'); @@ -107,16 +109,17 @@ export default function Row_Space() { expect(Math.round(Row_Space_011.right - Row_Space_011.left)).assertEqual(vp2px(100)); expect(Math.round(Row_Space_012.right - Row_Space_012.left)).assertEqual(vp2px(100)); expect(Math.round(Row_Space_013.right - Row_Space_013.left)).assertEqual(vp2px(100)); - console.info('[SUB_ACE_ROW_SPACE_TEST_0200] END'); + console.info('[testRowSpaceFill] END'); done(); }); /** * @tc.number SUB_ACE_ROW_SPACE_TEST_0300 - * @tc.name Row_Space - * @tc.desc The value of space changes, and the layout size of the parent and child components is fixed + * @tc.name testRowSpaceOverflow + * @tc.desc The space of parent component set to 30,The child component is overflow with + * the parent component */ - it('SUB_ACE_ROW_SPACE_TEST_0300', 0, async function (done) { - console.info('[SUB_ACE_ROW_SPACE_TEST_0300] START'); + it('testRowSpaceOverflow', 0, async function (done) { + console.info('[testRowSpaceOverflow] START'); globalThis.value.message.notify({name:'addSpace', value:30}); await CommonFunc.sleep(3000); let Row_Space_011 = CommonFunc.getComponentRect('Row_Space_011'); @@ -140,7 +143,7 @@ export default function Row_Space() { expect(Math.round(Row_Space_011.right - Row_Space_011.left)).assertEqual(vp2px(100)); expect(Math.round(Row_Space_012.right - Row_Space_012.left)).assertEqual(vp2px(100)); expect(Math.round(Row_Space_013.right - Row_Space_013.left)).assertEqual(vp2px(100)); - console.info('[SUB_ACE_ROW_SPACE_TEST_0300] END'); + console.info('[testRowSpaceOverflow] END'); done(); }); }) diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/StackItem_change/stack_offset_change.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/StackItem_change/stack_offset_change.test.ets index 816b3c86a..f8a536a0b 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/StackItem_change/stack_offset_change.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/StackItem_change/stack_offset_change.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../MainAbility/common/Common'; -import { MessageManager, Callback } from '../../../MainAbility/common/MessageManager'; export default function Stack_Offset_Change() { describe('Stack_Offset_ChangeTest', function () { beforeEach(async function (done) { diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/StackItem_change/stack_position_change.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/StackItem_change/stack_position_change.test.ets index 4f6b17ca2..d2e426696 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/StackItem_change/stack_position_change.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/StackItem_change/stack_position_change.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../MainAbility/common/Common'; -import { MessageManager, Callback } from '../../../MainAbility/common/MessageManager'; export default function Stack_Position_Change() { describe('Stack_Position_ChangeTest', function () { beforeEach(async function (done) { diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/StackItem_change/stack_zIndex.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/StackItem_change/stack_zIndex.test.ets index d8e3ac94e..707b596ec 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/StackItem_change/stack_zIndex.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/StackItem_change/stack_zIndex.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../MainAbility/common/Common'; -import { MessageManager, Callback } from '../../../MainAbility/common/MessageManager'; import screenshot from '@ohos.screenshot'; import image from '@ohos.multimedia.image'; import window from '@ohos.window'; diff --git a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/Stack_alignContent/stack_alignContent.test.ets b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/Stack_alignContent/stack_alignContent.test.ets index 6716e48a1..1469351d8 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/Stack_alignContent/stack_alignContent.test.ets +++ b/arkui/ace_ets_layout_test/entry/src/main/ets/test/Stack/Stack_alignContent/stack_alignContent.test.ets @@ -16,7 +16,6 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; import router from '@ohos.router'; import CommonFunc from '../../../MainAbility/common/Common'; -import { MessageManager, Callback } from '../../../MainAbility/common/MessageManager'; export default function Stack_AlignContent() { describe('Stack_AlignContent_Test', function () { beforeEach(async function (done) { diff --git a/arkui/ace_ets_layout_test/entry/src/main/module.json b/arkui/ace_ets_layout_test/entry/src/main/module.json index b25c8cc0a..c47f29d48 100644 --- a/arkui/ace_ets_layout_test/entry/src/main/module.json +++ b/arkui/ace_ets_layout_test/entry/src/main/module.json @@ -30,6 +30,10 @@ "entity.system.home" ] }] + }], + "metadata":[{ + "name":"ArkTSPartialUpdate", + "value":"true" }] } } \ No newline at end of file -- GitLab