|
62 | 62 | </arguments>
|
63 | 63 | <!-- Validate right edge of overlay -->
|
64 | 64 | <comment userInput="Validate right edge of overlay" stepKey="commentValidateRightEdgeOfOverlay"/>
|
65 |
| - <executeJS function="return {{page.wrapperJS(index)}}.getBoundingClientRect().right-{{page.wrapperJS(index)}}.getBoundingClientRect().width/2" stepKey="wrapperRightPositionMinusWidth50Percent"/> |
| 65 | + <executeJS function="return {{page.wrapperJS(index)}}.getBoundingClientRect().right" stepKey="wrapperRightPosition"/> |
66 | 66 | <executeJS function="return {{page.overlayJS(index)}}.getBoundingClientRect().right" stepKey="overlayRightPosition"/>
|
67 |
| - <executeJS function="return Math.round(({$wrapperRightPositionMinusWidth50Percent}/{$overlayRightPosition})*100)/100" stepKey="overlayRightRatio"/> |
68 |
| - <assertEquals stepKey="assertOverlayRightRatio"> |
69 |
| - <expectedResult type="int">1</expectedResult> |
70 |
| - <actualResult type="variable">overlayRightRatio</actualResult> |
71 |
| - </assertEquals> |
| 67 | + <executeJS function="return Math.round(({$wrapperRightPosition}-{$overlayRightPosition})*100)/100" stepKey="overlaySpaceRight"/> |
| 68 | + <assertGreaterThanOrEqual stepKey="assertOverlaySpaceRightGreaterThanOrEqualToRightPadding"> |
| 69 | + <expectedResult type="int">{{padding.paddingRight}}</expectedResult> |
| 70 | + <actualResult type="variable">overlaySpaceRight</actualResult> |
| 71 | + </assertGreaterThanOrEqual> |
72 | 72 | <!-- Validate left edge of overlay -->
|
73 | 73 | <comment userInput="Validate left edge of overlay" stepKey="commentValidateLeftEdgeOfOverlay"/>
|
74 | 74 | <executeJS function="return {{page.wrapperJS(index)}}.getBoundingClientRect().left" stepKey="wrapperLeftPosition"/>
|
|
97 | 97 | </assertEquals>
|
98 | 98 | <!-- Validate left edge of overlay -->
|
99 | 99 | <comment userInput="Validate left edge of overlay" stepKey="commentValidateLeftEdgeOfOverlay"/>
|
100 |
| - <executeJS function="return {{page.wrapperJS(index)}}.getBoundingClientRect().right-{{page.wrapperJS(index)}}.getBoundingClientRect().width/2" stepKey="wrapperRightMinusWidthHalf"/> |
| 100 | + <executeJS function="return {{page.wrapperJS(index)}}.getBoundingClientRect().left" stepKey="wrapperLeftPosition"/> |
101 | 101 | <executeJS function="return {{page.overlayJS(index)}}.getBoundingClientRect().left" stepKey="overlayLeftPosition"/>
|
102 |
| - <executeJS function="return Math.round(({$wrapperRightMinusWidthHalf}/{$overlayLeftPosition})*100)/100" stepKey="overlayLeftRatio"/> |
103 |
| - <assertEquals stepKey="assertOverlayLeftRatio"> |
104 |
| - <expectedResult type="int">1</expectedResult> |
105 |
| - <actualResult type="variable">overlayLeftRatio</actualResult> |
106 |
| - </assertEquals> |
| 102 | + <executeJS function="return Math.round(({$overlayLeftPosition}-{$wrapperLeftPosition})*100)/100" stepKey="overlaySpaceLeft"/> |
| 103 | + <assertGreaterThanOrEqual stepKey="assertOverlaySpaceLeftGreaterThanOrEqualToLeftPadding"> |
| 104 | + <expectedResult type="int">{{padding.paddingLeft}}</expectedResult> |
| 105 | + <actualResult type="variable">overlaySpaceLeft</actualResult> |
| 106 | + </assertGreaterThanOrEqual> |
107 | 107 | </actionGroup>
|
108 | 108 | <!-- Checks the position of the overlay with small padding value. This action group may not work with large padding values -->
|
109 | 109 | <actionGroup name="validateOverlayPositionCollageCenter">
|
|
113 | 113 | <argument name="padding" defaultValue="PageBuilderPaddingProperty40"/>
|
114 | 114 | </arguments>
|
115 | 115 | <!-- Validate right edge of overlay -->
|
116 |
| - <executeJS function="return ({{page.wrapperJS(index)}}.getBoundingClientRect().width+{{padding.paddingLeft}}+{{padding.paddingRight}})*.25" stepKey="wrapperWidthMinusPadding25"/> |
117 |
| - <executeJS function="return {{page.wrapperJS(index)}}.getBoundingClientRect().right-{{page.overlayJS(index)}}.getBoundingClientRect().right" stepKey="overlayRightPosition"/> |
118 |
| - <executeJS function="return Math.round(({$wrapperWidthMinusPadding25}/{$overlayRightPosition})*100)/100" stepKey="overlayRightRatio"/> |
119 |
| - <assertEquals stepKey="assertOverlayRightRatio"> |
120 |
| - <expectedResult type="int">1</expectedResult> |
121 |
| - <actualResult type="variable">overlayRightRatio</actualResult> |
122 |
| - </assertEquals> |
| 116 | + <executeJS function="return {{page.wrapperJS(index)}}.getBoundingClientRect().right" stepKey="wrapperRightPosition"/> |
| 117 | + <executeJS function="return {{page.overlayJS(index)}}.getBoundingClientRect().right" stepKey="overlayRightPosition"/> |
| 118 | + <executeJS function="return Math.round(({$wrapperRightPosition}-{$overlayRightPosition})*100)/100" stepKey="overlaySpaceRight"/> |
| 119 | + <assertGreaterThanOrEqual stepKey="assertOverlaySpaceRightGreaterThanOrEqualToRightPadding"> |
| 120 | + <expectedResult type="int">{{padding.paddingRight}}</expectedResult> |
| 121 | + <actualResult type="variable">overlaySpaceRight</actualResult> |
| 122 | + </assertGreaterThanOrEqual> |
123 | 123 | <!-- Validate left edge of overlay -->
|
124 | 124 | <comment userInput="Validate left edge of overlay" stepKey="commentValidateLeftEdgeOfOverlay"/>
|
125 |
| - <executeJS function="return {{page.overlayJS(index)}}.getBoundingClientRect().left-{{page.wrapperJS(index)}}.getBoundingClientRect().left" stepKey="overlayLeftPosition"/> |
126 |
| - <executeJS function="return Math.round(({$wrapperWidthMinusPadding25}/{$overlayLeftPosition})*100)/100" stepKey="overlayLeftRatio"/> |
127 |
| - <assertEquals stepKey="assertOverlayLeftRatio"> |
128 |
| - <expectedResult type="int">1</expectedResult> |
129 |
| - <actualResult type="variable">overlayLeftRatio</actualResult> |
130 |
| - </assertEquals> |
| 125 | + <executeJS function="return {{page.wrapperJS(index)}}.getBoundingClientRect().left" stepKey="wrapperLeftPosition"/> |
| 126 | + <executeJS function="return {{page.overlayJS(index)}}.getBoundingClientRect().left" stepKey="overlayLeftPosition"/> |
| 127 | + <executeJS function="return Math.round(({$overlayLeftPosition}-{$wrapperLeftPosition})*100)/100" stepKey="overlaySpaceLeft"/> |
| 128 | + <assertGreaterThanOrEqual stepKey="assertOverlaySpaceLeftGreaterThanOrEqualToLeftPadding"> |
| 129 | + <expectedResult type="int">{{padding.paddingLeft}}</expectedResult> |
| 130 | + <actualResult type="variable">overlaySpaceLeft</actualResult> |
| 131 | + </assertGreaterThanOrEqual> |
131 | 132 | </actionGroup>
|
132 | 133 | <!-- Overlay Position -->
|
133 | 134 | <actionGroup name="validateOverlayPositionTop">
|
|
0 commit comments