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 ac670deec2644c77b203eb5553614243aae86459..504dd126eeb3edbda849fc71f7f2488a69d5fbc2 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 cc6dcfb5be606706d051efad5cef1b1ea79e2b06..01afc2a8e4bf807395d5bcef6b6fe34d13fefa0c 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 9f2e8e0adaaaae4d9f37a11cd956643087dd063c..ad3620173e6a2b8cd721141115a233a02c1008b1 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 56f5348f70b6a83b4642f426f35716890eebdb59..bc7272e4f7313e474580c85c69bc4a83c1597aba 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 5f4856a37976e70efc1919da408cad41bd4cdf1b..40d6c28411d89d0caeca360ffd6609374a3ee1c5 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 b046dfad35fa9a688bd7e9fc402e6262c37ec16c..a66da9c6ed656dbf4b02b1088618dc0d9231ce23 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 f1c1e132d33bce1cf58888ffacdb184979f6629a..4d18f3adf05a5e9149a9af2143029a2ab198d7cf 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 d29fa55d1159f6a7ce061dd501ad72ffca0d5aad..ee027db86858c03c7012fbe5501d21b2d2b4acdb 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 cc624947b47bff273207f73e8ac344f0eac5e20d..2c6ca6f604b7da70c49d591d4510788170cd8dbe 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 3494d0a4046d2399ee279cede4cc7775bb6ad2e7..4b5a27c5e2e1f2f61ca1f3616b9c519e5a1abb04 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 9c6b58ff8a6ba561fe4257770e4b6cb6c64ca8f5..f730b317e3dd1379de74eb208eb0bb58e7487ec8 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 766580e79d73bf27dcbbffb9136e1f596366d4ac..4d2cad89a03c662c6c57a4a3d64649c0c6861a9c 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 c200316581020aa29c611cea78b982fcf7f06d30..3ad1aa5bba61bcae9c84fc6d8337fc9b09acb732 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 714ef82932eab768b28c7bae605987b003ba3dcf..b66fd1ef3f98928fe70ee72df665547f661eadbe 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 431404b286d98e267872f3e794b78dce7e380713..27c86a59750173e6dcbca8fa9277fccaa9f7322c 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 934d56e7660609d438f4ae0217fd08da4277d54d..8034e90b21ceaf9b4b86e3268c2f7fbf42b8256b 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 d60f6c5f8d53d5658e5fb77de8ee4a441292918a..818d6dc4758c30e975ff8c58efca2f4e4502345c 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 c4f5cf05fdd3d85e8a4db4c6ab37e0a41265ea6d..88567572322c312c159f022eee84ab0232eb9129 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 0f41429cee9d9271eb4a79fd8839752bef35198c..27d16424b8e32ed5d728115d62d3574d7c5905d7 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 ec7a97d4fe846195885ade7343b0050317ea57b9..4b0a3ed246fe29ebb6c8536d407c87c2ba6bd647 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 b7e4c0a0b7fbc21d608b530750afa98930daad96..bdd977fa7004c42aa1eeccb6664e84fe5c23ad48 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 610286827bb836b5007a5f9429a9675c25236c5d..bf1913cd4b6f95955919ef4417b6ab9cb56ef158 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 245fe3fa0fb8fc89ab4e971cd999ba60e1a9fa11..d279ffe1678e48a64328ddd670c6bcd675b92de9 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 6e79643fbab824da30c5091467450c933ec69e6a..0ee821fbbec3f9e23416585cf9286b76c546ccce 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 3df1572ff2b894e628df6a37c49345602dfbf0ac..d9cf5a071effdcfe0da87d7151784ab1f9f76412 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 37bdc308f8e73d4a4c63ea0a35832de14b290afa..e0478f7f05b0a3cba203a828159e04c5ab56d4a7 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 df3321f4b8b5d83a6d059a39dc15aefce82995db..e9dec7de1d2a12a1eb856dd25f92403f0758d9af 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 808bbb94b3a719f0f0db94dc75e77aa40cbc11bc..74dd0cb268e5bbc1723ff9e0c0a63c908e11eed7 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 15d8bca297578f9b6ca535d8a87e071b18845650..9044c665c23d1b60d099b86b570014831c2afcd5 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 b5a9f7859416c5a4a0e85688da2fccc5f5def102..49eae746438995dc51c3665241583f176585f59d 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 fbf98eee43e068354057fabda3e431f08861f0fa..a1abf8b5985a59c9137d1bbb705f9981beae274c 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 5ed490d90b18e20027007a8c4729c8171597838a..f1e3365794c5cbc25655f76948700bf5678aee91 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 470ccf011fe48885213b46df3a214e30263baded..c2bfe037c9ebf17742910dcd206d38c46de564a1 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 b1b6e88b0c52580b86eec4bd6c6bcd90228a24d0..9a8a658a0cc74e1919aa2093927594b9f7fd558c 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 0697132993688cc232ddaf7f79f06aedc57e8b8e..637f6a69251cdafe74a9a2b787ddd224bb16920e 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 0318f59e2b8922da2eb1f39a88994660ea48b7c0..8ac440c338a0f527eac45a15cb34fe255b3c3e47 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 8756ec85a757de535b3aff35e0ab9f2d9d23e35f..546afe9ff132528925b6304ae5fbe38a7d8583b4 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 5f0e8556d7532b96df979e5a8bc8fd9dba396d68..1d888daf0eb6b0118c7c584ad1ae13fd8a0b1cb1 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 36ae4a093af6fd9f79d2bab591543f2fd2b01752..0436d8a57fe93051ae7ca1ef90ab0493cb28e8cc 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 dabfde1aa9f0e187bf90797042cfaff5a4ff4278..d5e312c319077d58888a6bb7acb501da9e86c8cc 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 12a02c6f1c242248a1b074796872d83fc62b84b0..b97b0e347191d56b80f6ac1bfdc6a41a31cd2503 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 320105751a438635531ebc540066f65640edcba1..e8ce4548a41de9a5bb9c51ffae7e8e00432fbd59 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 6dd7260140518183f4b97c991c870c8e6adaf8e1..67a9208f510a615a70516507aa1e334f52d8210c 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 dabccc7234fa962ea5d18d11e5b6a248c0e4cade..c7ec85923a6e7266df76d0c385e8954a09774d89 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 e16f4d64bd90f01e41d341234f5894afd5d63ebe..cc37fbe808873a1aa7ba0e90a7406e9d677f6acc 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 33283eb04a96f304f4dc77bfaf2eabbfd7251573..f46231f7c96ac7c92be60fea59574dfb6a213720 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 43b26dcadba6bf41959cbb363672f3d1b6213af1..2b33f678fa93fc43b58ef3f2be03f84dabbfb935 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 846b932f936cfb98da5d8d27435e0222eb652acc..0316a2799f999efc88d220716ba8c1806f6f38b3 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 f8b1414d1f8d2a7530d0ff15da05eaeee48e82c5..402f0d73e56b8188c9b33d6b43154160bae068cb 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 48373095fe8cbbcbe661b52f21fb99f1312d273c..061182a22d08676d61950b57e6f75d09ef4a2425 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 4deb2c9269b8aa725325309cdcf17142e75dbda8..ea1a4e43042a3cc7c5fdec49fcf6dda84c05adf4 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 276fd5ac993fa468c6481f31f22a36d096e796b0..be3c4f9d64f02092a7c15faa76b09337c767cbed 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 bb23c428ad99c060458dd13b0db4f4c2b917d2b3..6aa7602d4c6758902b4f6fbe479119cdcd716c3c 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 d3a500653a490cdaf1e337f71232117c821954fd..7d793ef0a31f6d292fb848bb9e7210967f9fd861 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 4cacd5b807d63406ae15e6657abc70abffd0992b..81302c3a8b66ff57b370a8f11b248179ef81f74e 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 6cb4deb845f420d1d3d810d74b94e9b82201e9f2..bebbcc0d2b11e2dcc40fe56a0bd6258610fff5f1 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 03c762a176663ceee11e0a7e7a13cdfade69efa4..99638ddaf48757ad5644929122c7f0ebb05b5f64 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 7ad1fcfd70a57707f90c8dd78d794501702c783e..185d07ae9db60ba3ffbee77046614acef4bdbb8b 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 9a7d356c701a26de308238a5e84a650b736f493f..070dd4bba37fa45add4a678598f1c9529a4254ae 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 90f2b8f1e2ff0c9c52157612db755f65da9986d2..dee86a98639ed8d4fb27ef7de6a069f3668fdbf0 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 d4f40400356d3e5ecdbfe03bd0df04238b33ab12..dc6433262f4cb66cc28cc6d7189ebb0a6a2803e4 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 d656f4a0da1b0481d886c0e8da5a88f5c8776746..dec7e0660465f628024b17f4922aee7f98c85998 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 1395a0578e88daa688ea6ecba326f5b1296b4c3c..6ca88a154acfeeff60ec929a96282c96e725a50e 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 cb3211a4c37bc6e3b41d696a9aedf8ea61aba714..5a1b5a723f0295eb220e73f4ee68f93d38f7b34e 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 339d039af212527f30bb8825ceff2342d0e735c7..8ab9ace5408ad14005af3085f575d33ab28225da 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 d83615c02264be469f0d7efd9b8dfdad82a7ce36..50c586811b5110dfcd0e4b3092cfbd0fd19f3410 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 a0db8d6146a613595a9f7ca1ed04b8486a1c54bc..a6c33893e71078fb37ba8c51d6f8b4048cb9ce7a 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 7b0ec4469454b723af72959b898b2a7275c4e27e..664951f0e5b3f31b977413a9018e9a917a415325 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 b363c34671e7c033472d2c02ee540f9cc7298dd1..7aecb9d57ca9b54c8332786238cf00ef065ff396 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 aec8dc9bd8b11a856b26cefba741af000fe49deb..d4eb04e6716521593ee5a659db476c7f1dbe630b 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 a9d5ec9e52aa1714e4d428d2cab60968b4adb59d..281142c878cf7f7880eb8a3c93b02e55b072ab0b 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 ab2ac2a929006af5307c958a6a2d0b8c6b30d3cf..f5355afd927c7dfe653c66f43f9f145b56c037ae 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 85886567b010d31965c7e1a18d2994abdbb031f1..2e7e08a74c58442d1c4178969f9a54cf87015553 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 0519b516b3f478fc71cabf1ab8105759beb1c0f6..3d982ca6b2f1cd5b9b7de16c03b23bc14b305058 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 0b453c0cdba29f3cf7d4c4b983e8c5291d0afb1f..e0862c6305ece15f3070c0cffc32adf28a29f127 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 cc3d7bd14a892a5611d1672c39b681c81df01a48..e1f457214a586386294736002ee9258bf0237226 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 c6169df3f9c7f0f5708f79aeb31cfcdcd1b3ed11..984c2e5c965d9c7b4a7f8c32be66b546d3a575c2 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 7eecee7b79296650c5108e3ab8dbad10aecd38bb..0ce21ee5bef27d3fd665f0260de0abdd0caafdee 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 afc74523f658ddd62149ee7089fffe34a9ac00dd..bc9d20cbf26fd1cf286a526f110052acb2d3d569 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 afab24f7515288bd16d71c1adc8596fd0ac1abee..a55a37c0ebd311899bb05f41e26b5c5048d7b226 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 f7844a25f2dcc42b034a8920b182f120a6027bc6..e962cc7e0807522e6741d73c90422263efc256c9 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 2cc07e7143413aa0555b3339c7ee06a74b29c653..08b35f2d8f6bee8255b54a03f8f25f82717c1bae 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 145dd9bab6ec357d68d9eb3acdb6aeffff302fbe..06e8ce431a93c470f395b4db031ef03781c1e999 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 f5244b04e95f6b010cb1b3f64ac36e0cf425895e..c18335d2a16c76cb69d9c1e1d2a6ca4b19a69deb 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 5e13a95661880023e542c98cf75ad60024a1444b..02cf5eef9d5153c6bee7939d4ad7d5a10a2627d4 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 283e317ba96a558ab6d7a170363248097394fe3c..512297aa460575f76bafedac04dd9935d5503bc2 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 22b0d697bab8d33986e4ee22e805e7e12baa49ac..bc04eb732dbab2c09c34a17556ae455cee0aa7a1 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 820cfca0804ce666b1045edd456b90109309e21a..da54b5e44ff244a6f0e2b3825c7bd96d98b80ef3 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 6c0e4d9611ed0265829447921451ed19153ac796..0c5026e0992f0eb0bb738c11a5ebdb29505f3a86 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 39e1bda6d790da3ff7cb0ea17ec8e1d2a295b58b..2d53237ea17768abe34d2dba76885adaf31a935b 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 18ebf93d5a6d7856863f59d74beff87f850b70be..e101a76378ffb2d7def95f637181687ea853d93e 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 07e3ba1a3366020ee6455bfe0b1ba8ae3d559795..034dc65c5dff42d42f66fc70a96ae0b2f675857c 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 8af71e6ae3e08fb58bf3e1832a7bc7ef40f966af..a93602a32ce4c0fa1e31850c0ce3f986f3b40971 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 e06e5301b235b4fe074cc84f0bfd6379662f933d..5ddc7d42ecf6751a2954ca1a462e1cbacbf5e298 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 7e2a813620d8610b335a96d62517c8036e29106c..37cb2b8760f5d190dffebf43eb375a4337b31631 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 1d4c415e640673c5292a7d3ab0adc0aa1b4ea4fb..eb0a8ca56c0e44eaac8c110ccb15da3693b23e54 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 25dccd785cb87c632b4a4ff02f3aecbab3fed63f..dae5d811b5b23c40098b9092ade87ab801b048fb 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 e8c5cca93de9542056e09826ef3ff051bbc40c64..705af7ae00840a32449225f2d92cf997515c12d7 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 b3b45cf0559af8cb5393fc309c3148802effaa85..2b8664d315ddc8b98bb61df1aaf9e2244fed038b 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 287eeeef1113ef3017fef25e291604e7ded6c3a8..1c6ec550c9894312bb7b22dd0cf2dd63d41ac524 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 4d8e2cdb19fb002eb3950c8e6f05c0cf85d055f9..c64a9c7e6b6de269ec05654b58046fb4ba4051b8 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 fa386c5c39f1c0134576e52b91af5e86f55dc54f..7412626f98d23eac7f61c1d935d8e9809bae7169 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 2f594487aabedf12d2b87996fceb83f844f89b7c..45651676e352e3ea5cc23e4ab0961a678ddfebe9 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 a7c18cde61783eb8d1468baff9afda99f2b0b9ed..64bbe42ddae46c3af4acc7fd3b17d67fd192a3e6 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 a95411bdd5081cc7a2f8a247730ec43f4f636252..d6767ca88a0c3b1a101da0027475ceeb59486976 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 35cff42e39e110cb75eb8eb51cc94d8f31d6d284..441a375156c18a42c0947395cc305bc43aeb2c71 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 c3b1852832fb0527aa016691b3488975dbc09bce..3d0d4bec35dc7724afadd76196d3d1649b604981 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 a6e205f111bff8820733c67a906b6829ebf70152..e4771f2acdce3bbbbf951bbe521254d324b363e3 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 6f6a8b506b78ab753aed36566132ecc72facadf5..90dd71c53d7ffcc59ff9716fab3b5ae382853e13 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 45199f0d17e2aa8adc70276f0e5559b656f2ba82..bab192cfa749a3ac0f18278fb9ecda641621f480 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 a876dfa9c6b2354d06f07766a1cfb1d12b8a0654..d83505917cc44c6f1887b79488c19d3aa1b44029 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 3955c0049c275722e65de5acd0f23822b0482880..0749b0d357828a2fb2f328c5fb9eba3eb0f713a6 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 ff534aa5ebb6b33d6af1e9c1ba99d4b1bf9419d2..5c9c83289dbfed487a8ae1580c7c48e12b08cb54 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 b632ea0da979ee3dd55b3fadc372a74a83f2b91a..2582bce61758914a26bd933e8a12c6bbf78af9dc 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 890798c169fa086f5638465f781d553bc50589ed..e8f786cfae18c38899f055f936de4fb7fa80e37f 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 16a6c62455717386709e4f125c043e7c0c6ff724..2652a1c754567ad5564204e29ca906f3ef5dc0c3 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 80cd876e1c2ba9c5f749c8b6f7e87aac5400a814..fb7ad5d805707ae6233214f7fc66fd53b7ce7925 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 6e5b8068cb7402152e09d6c61998c3e681f8e506..9d9400d6023e6af3f4e75f0819948568104eeeb5 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 3a70ff877efc2c4878b18b4b233151174d936a2b..5f3e43bef16bdf4d77ef6b7219daa5e0ec5e4956 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 0a64a90a0491c636ba759c36fbaba14354434e20..13156fe1f37554258fc9bb067692e2eff7020c73 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 eb2db8ca850bf4c5be9aa04209edcbe74ec4540b..44cff87399c53feae52a9bbc2c5931c002872eea 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 7d0979620900acf785d596ee7ba939caae811459..52df9d72e51cbee47d45e600f7896d731a1ec1d4 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 80675b39d0c4dea0598a1ee17e7f107c2e48b93e..20d2fc966ef7b5cd77edf768a7ffeb6eeb2ca431 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 ee17ab7213f9963c52ba86c2d238b7323d140a1d..00c83de72533f0c44fcfb762816a9681dc7bba24 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 ac2b173fe38aada1f816e66d6fd312587e0b308e..702e7f02bbac9f49fbddc31478e709eed97bf00d 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 05bbdb5adbac49178e80e2113cab1a3fb705d4b3..d72a9e7623e6ca3938b7e33d223821cecc5d98ac 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 36fbc8c5db7144e528e1dbfa83b3d651f3b1f37c..40dbfc4e82a89c482792f6b12fa53217d7830a43 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 0b8f53a7a56c5e6e4efd46d2d0babc3ea03c6984..507fc769b86bc6e1c0ffdabb4afb108f394328e1 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 2d7c6bec57b4ec23257e44174c72519072a7a41b..8f7fe6e6f744e7d7979e804b89739f0234a4fbb0 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 a057f351b6429496e0f7a90a8b98e8cd5fcb0881..673df62f07753737c555de81671b39bb7acabebf 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 45b5b9f53a52ea70743fa84f3e6e4b9147eaac37..2298e0839cb526cadd8af93c5b524a71c418a754 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 82f5cb62c1d9627c61917fb1e8655935196fc2df..65c7c4b37816218833d2afe4c78086842fb97dd0 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 30b9fc1138f3fe7a0d9923339a3a93078b931760..008de07c80952cf5e4ed4e798c4f5fa2097ada22 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 8f25dff562461194f2d05fe9f007bce039beedf5..847be026be308b7f083e04823466eff459e3aee0 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 977ac8d31e572994defa4597e953f1d16653f4fa..53d9a08c13b58688a5c0be139dfb1e204c38bdfc 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 b3c69f95eb63690b6f98fa5d592fe0f6113f00b0..4e09f0926d9ddf466da6ab534785bcec8e130d63 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 1076256aa9072c5952dbd2bd3bc86b01c2612451..397b93ca5b5e64c7f8e07e7ca79f2486023e25ad 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 7b42627571c3bc6da6dc76af183775042b20b064..6ba5d8fd306484c8ecfb723e90980f33d98f9229 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 539851160ac383bf8df028273395f15f08726544..409abdd24afcb2c54f3e74079292a2761e36ee4f 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 6ecd61e1f6674edc152ff0b289ba936c9bce583a..7ea2fb0269dfef3feae358d0c6dfcd7a2d77a52c 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 23b7893116ded71d61de33c29fbcf176ead1ad71..045e047cc1fc983b6c5d7c261e4206cfedc0d2e2 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 fd13ad55722f2fca9e252dcef769768aa819606d..4d93cc3a6482908e50b8466bba908ed2ce94a7bc 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 65af9868e4bdd51cd721eb68f45c265d1f2efea8..0a667af2f0ae05a1ce659320463ca8274579b738 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 568fea83414df11763f2b52d678aea57ca16a1c1..bf1ed9ec9c3eba7a268a3ce41fcf3bb759a899ff 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 b287adcf5fbeaf3ac850de486ba7ee882c7ac75f..ff64571cc61978726819c8346bfad1c8f70f3618 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 20d5c52c1efee03826fed550123dfe18da3bf63e..db58c25102709db7498b451326e6c40ea73b0d43 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 152a6084a78485cfcc8e87daeffacbe26342e456..6e4a788bc5969fefc1c03b6b28f88ae484e6c35f 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 757eda1b11fd7fc9d3c998a12a6bc558afa49c0e..b72a11af26aee207592a3354546da541e15e9f8b 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 df3c3d2ed3aba9b0d4035af86eb2b35a66a9677b..e4e474a58a69c49354089de290af87316e235d69 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 004681a25cb4d1bd3db8164f0a55256bf717415d..55ffb353dca398359eab42110b90cce0ea455a15 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 3c02198c3eeb41b2ddc97a5df6a725f90d2949d8..420b2e559c7077bbc9a48fa3e7dd6732edb52e04 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 a239d1643b831962df063d3b9c56e449d9f1f4be..bd8f24ff7ba9931f0a7f99bddeea191345ab8cf0 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 a1e38f3729f3736ea1865a129cf51c72ff36b102..0198777ede03d05da65dcddcc094fc0fd0c61432 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 4605b4a5885a72b66d2625ed1877363ef5995b77..c1398402b6a129791dc048d783fb22ec2c0514fc 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 74f903963f85860f44e4b084c6a6ce97f7245a54..5fb8d5830873dc8b6c9d3d5286a489aff7871be4 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 00c3f9fb641ca877a0c5802f95b5f515a91063e0..b0338353c96acfd6dbcdd27c9b91c987028dd222 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 8c9e9992a446a0b28839a0784a7b1451f593c6cb..57eb8d784d0a218a04058215bd0f2f633e1dac2f 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 711129ef15d7fa8a3b4492de7003e39fadb88f58..e003e41f963430baefe5f69d4978b3395f827d8e 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 d1b84af3d05b01a5e1c4d28299991ecae2463cef..c19cd35fa1251c6fd021b85fc11edbaa004cc031 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 fd96eab5853b9caa8ae838a932ba992b24df2761..581b8bb8b36ecce6b5e975c8644016841c052d05 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 173d171a6865d4fe4b374a7ec428909a3f4fd339..ecc435d9c75b64d514dd619d5bff84ad507a572a 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 925f2505c2b7e93c1c654146dc4fdfda6e259dc1..97a0bfc548e89bad7f7cd02b1f16384b31be7048 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 f760027380ecfdea2b5f20d683fbf9f8d8457f45..ae9459f2182a5bdc47e1d03bb3c0485c61413838 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 c37816b75b941974bd37c821b10d972840248707..fe232347bd1f0590d3452188530fe3e0c0dbb97f 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 e4847092f5ad85407a117babf4744cdace160b93..87c9d2cfee349f513de9ab4104c97425b885c998 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 816b3c86a4a37ccec61f335af3279a0a8828a5ab..f8a536a0b988cc0fca8744ca9b41b2f1da863a63 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 4f6b17ca2181e4aaf9dcf7a3753f72e9fe88cc0f..d2e4266969113a8aa74d585da8c1fc9341b5485a 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 d8e3ac94eeb02f499753657727b9fcd19668ce65..707b596ecb667b01203cb8d2cd2ded443b576d65 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 6716e48a1cff793353762f226f9fa4f46314469c..1469351d8fe12d6dca67204f03b4d8c2820b6113 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 b25c8cc0a50feb705836f8dac0a8a26df20726bd..c47f29d48c688a8aea01b5ce9864e76ac7acca6f 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