Skip to content

Commit e5d84d3

Browse files
committed
MC-5025: Right/Left Margin Not Working For Content Types
- assert right position is between 0-5px - remove extra border for right position assertion
1 parent 3f028b1 commit e5d84d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@
2222
<!-- Validate right edge of content is within parent -->
2323
<comment userInput="Validate right edge of content is within parent" stepKey="commentValidateRightEdgeOfContentIsWithinParent"/>
2424
<executeJS function="return document.querySelectorAll('{{content}}')[{{index}}-1].getBoundingClientRect().right+{{contentMargins.marginRight}}" stepKey="contentRightPosition"/>
25-
<executeJS function="return document.querySelectorAll('{{container}}')[{{index}}-1].getBoundingClientRect().right-{{containerPadding.paddingRight}}-({{containerBorder.value}}*2)" stepKey="parentRightPosition"/>
25+
<executeJS function="return document.querySelectorAll('{{container}}')[{{index}}-1].getBoundingClientRect().right-{{containerPadding.paddingRight}}-{{containerBorder.value}}" stepKey="parentRightPosition"/>
2626
<executeJS function="return Math.round({$parentRightPosition}-{$contentRightPosition})" stepKey="rightPositionDifference"/>
2727
<assertLessThanOrEqual stepKey="assertRightPositionDifference">
2828
<expectedResult type="int">{{pixelBuffer}}</expectedResult>
2929
<actualResult type="variable">rightPositionDifference</actualResult>
3030
</assertLessThanOrEqual>
31+
<assertGreaterThanOrEqual stepKey="assertRightPositionIsGreaterThanZero">
32+
<expectedResult type="int">0</expectedResult>
33+
<actualResult type="variable">rightPositionDifference</actualResult>
34+
</assertGreaterThanOrEqual>
3135
</actionGroup>
3236
<!-- Element Size -->
3337
<actionGroup name="validateContentWidthEqualToContainerWidth">

0 commit comments

Comments
 (0)