Skip to content

Commit ba01e37

Browse files
committed
MAGETWO-91377: Create MFTF Tests
- Stabilise tabs min height test
1 parent 46bb24b commit ba01e37

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/ActionGroup.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,19 @@
775775
<actualResult type="variable">expectedContentBlockHeightWithPadding</actualResult>
776776
</assertEquals>
777777
</actionGroup>
778+
<actionGroup name="validateContentBlockHeightOnStageFromInteger">
779+
<arguments>
780+
<argument name="contentBlock" defaultValue=""/>
781+
<argument name="index" defaultValue="1" type="string"/>
782+
<argument name="expectedHeight" defaultValue="1" type="string"/>
783+
</arguments>
784+
<executeJS function="{{PageBuilderActionsSection.computedHeightOnStage(contentBlock.role,index)}}" stepKey="actualStageContentBlockHeight"/>
785+
<executeJS function="return Math.round({{expectedHeight}})" stepKey="expectedContentBlockHeight"/>
786+
<assertEquals stepKey="assertHeightOnStageMatchesExpected">
787+
<expectedResult type="variable">actualStageContentBlockHeight</expectedResult>
788+
<actualResult type="variable">expectedContentBlockHeight</actualResult>
789+
</assertEquals>
790+
</actionGroup>
778791
<actionGroup name="validateContentBlockHeightOnStageWithoutPadding">
779792
<arguments>
780793
<argument name="contentBlock" defaultValue=""/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderColumnContentTest.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,10 @@
149149
</actionGroup>
150150
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
151151
<comment userInput="Validate Column Height On Stage With Custom Min Height Matches Expected" stepKey="commentValidateColumnHeight"/>
152-
<actionGroup ref="validateContentBlockHeightOnStage" stepKey="assertInitialColumnHeightMatchesExpected">
152+
<actionGroup ref="validateContentBlockHeightOnStageFromInteger" stepKey="assertInitialColumnHeightMatchesExpected">
153153
<argument name="contentBlock" value="PageBuilderColumnContentBlock"/>
154154
<argument name="index" value="1"/>
155-
<argument name="containerDefaultHeight" value="PageBuilderAppearanceMinHeightProperty_200"/>
156-
<argument name="expectedPaddingTop" value="PageBuilderPaddingProperty10"/>
157-
<argument name="expectedPaddingBottom" value="PageBuilderPaddingProperty10"/>
155+
<argument name="expectedHeight" value="210"/>
158156
</actionGroup>
159157
<executeJS function="{{PageBuilderActionsSection.computedHeightOnStage(PageBuilderColumnContentBlock.role,'1')}}" stepKey="actualStageInitialColumnHeight"/>
160158
<comment userInput="Validate Row Height adjusts to Column Height" stepKey="commentValidateRowHeightAdjustToColumn"/>

0 commit comments

Comments
 (0)