|
43 | 43 | <comment userInput="validateBackgroundImageContainerForParallaxRow" stepKey="comment"/>
|
44 | 44 | <executeJS function="return window.getComputedStyle({{section.parallaxJS(index)}}).backgroundImage" stepKey="backgroundImageValue"/>
|
45 | 45 | </actionGroup>
|
46 |
| - <!-- Validate Contained Row Appearance on stage --> |
47 |
| - <actionGroup name="validateContainedRowAppearanceOnStage"> |
48 |
| - <comment userInput="Increase window size to see varying widths for rows" stepKey="commentResizeWindow"/> |
49 |
| - <resizeWindow width="1920" height="1024" stepKey="resizeWindow"/> |
50 |
| - <executeJS function="return {{PageBuilderStage.stageWidthJS}}" stepKey="stageWidth"/> |
51 |
| - <executeJS function="return {{RowOnStage.rowWidthJS('contained', '0')}}" stepKey="rowWidth"/> |
52 |
| - <assertGreaterThan stepKey="assertRowWidthGreaterThanZero"> |
53 |
| - <expectedResult type="int">0</expectedResult> |
54 |
| - <actualResult type="variable">rowWidth</actualResult> |
55 |
| - </assertGreaterThan> |
56 |
| - <assertLessThan stepKey="assertRowWidthLessThanStage"> |
57 |
| - <expectedResult type="variable">stageWidth</expectedResult> |
58 |
| - <actualResult type="variable">rowWidth</actualResult> |
59 |
| - </assertLessThan> |
60 |
| - </actionGroup> |
61 |
| - <!-- Validate Full Width Row Appearance on stage --> |
62 |
| - <actionGroup name="validateFullWidthRowAppearanceOnStage"> |
63 |
| - <comment userInput="Increase window size to see varying widths for rows" stepKey="commentResizeWindow"/> |
64 |
| - <resizeWindow width="1920" height="1024" stepKey="resizeWindow"/> |
65 |
| - <executeJS function="return {{PageBuilderStage.stageWidthJS}}" stepKey="stageWidth"/> |
66 |
| - <executeJS function="return {{RowOnStage.rowWidthJS('full-width', '0')}}" stepKey="rowWidth"/> |
67 |
| - <executeJS function="return parseInt({{RowOnStage.rowH2ChildWidthJS('full-width', '0')}} + {{PageBuilderPaddingPropertyRowDefault.paddingLeft}} + {{PageBuilderPaddingPropertyRowDefault.paddingRight}})" stepKey="rowElementWidth"/> |
68 |
| - <assertGreaterThan stepKey="assertRowWidthGreaterThanZero"> |
69 |
| - <expectedResult type="int">0</expectedResult> |
70 |
| - <actualResult type="variable">rowWidth</actualResult> |
71 |
| - </assertGreaterThan> |
72 |
| - <assertEquals stepKey="assertRowWidthEqualsStage"> |
73 |
| - <expectedResult type="variable">stageWidth</expectedResult> |
74 |
| - <actualResult type="variable">rowWidth</actualResult> |
75 |
| - </assertEquals> |
76 |
| - <assertGreaterThan stepKey="assertRowWidthGreaterThanContents"> |
77 |
| - <expectedResult type="variable">rowElementWidth</expectedResult> |
78 |
| - <actualResult type="variable">rowWidth</actualResult> |
79 |
| - </assertGreaterThan> |
80 |
| - </actionGroup> |
81 |
| - <!-- Validate Full Bleed Row Appearance on stage --> |
82 |
| - <actionGroup name="validateFullBleedRowAppearanceOnStage"> |
83 |
| - <comment userInput="Increase window size to see varying widths for rows" stepKey="commentResizeWindow"/> |
84 |
| - <resizeWindow width="1920" height="1024" stepKey="resizeWindow"/> |
85 |
| - <executeJS function="return {{PageBuilderStage.stageWidthJS}}" stepKey="stageWidth"/> |
86 |
| - <executeJS function="return {{RowOnStage.rowWidthJS('full-bleed', '0')}}" stepKey="rowWidth"/> |
87 |
| - <executeJS function="return parseInt({{RowOnStage.rowH2ChildWidthJS('full-bleed', '0')}} + {{PageBuilderPaddingPropertyRowDefault.paddingLeft}} + {{PageBuilderPaddingPropertyRowDefault.paddingRight}})" stepKey="rowElementWidth"/> |
88 |
| - <assertGreaterThan stepKey="assertRowWidthGreaterThanZero"> |
89 |
| - <expectedResult type="int">0</expectedResult> |
90 |
| - <actualResult type="variable">rowWidth</actualResult> |
91 |
| - </assertGreaterThan> |
92 |
| - <assertEquals stepKey="assertRowWidthEqualsStage"> |
93 |
| - <expectedResult type="variable">stageWidth</expectedResult> |
94 |
| - <actualResult type="variable">rowWidth</actualResult> |
95 |
| - </assertEquals> |
96 |
| - <assertEquals stepKey="assertRowWidthEqualsContentsPlusPadding"> |
97 |
| - <expectedResult type="variable">rowElementWidth</expectedResult> |
98 |
| - <actualResult type="variable">rowWidth</actualResult> |
99 |
| - </assertEquals> |
100 |
| - </actionGroup> |
101 |
| - <!-- Validate Contained Row Appearance on Storefront --> |
102 |
| - <actionGroup name="validateContainedRowAppearanceOnStorefront"> |
| 46 | + <actionGroup name="validateContainedRowAppearance"> |
| 47 | + <arguments> |
| 48 | + <argument name="pageOrStageWidthJS" defaultValue="{{PageBuilderStage.stageWidthJS}}" type="string"/> |
| 49 | + <argument name="section" defaultValue="RowOnStage"/> |
| 50 | + <argument name="index" defaultValue="1" type="string"/> |
| 51 | + </arguments> |
103 | 52 | <comment userInput="Increase window size to see varying widths for rows" stepKey="commentResizeWindow"/>
|
104 | 53 | <resizeWindow width="1920" height="1024" stepKey="resizeWindow"/>
|
105 |
| - <executeJS function="return {{PageBuilderStoreFront.pageWidthJS}}" stepKey="pageWidth"/> |
106 |
| - <executeJS function="return {{RowOnStorefront.rowWidthJS('contained', '0')}}" stepKey="rowWidth"/> |
| 54 | + <executeJS function="return {{pageOrStageWidthJS}}" stepKey="pageOrStageWidth"/> |
| 55 | + <executeJS function="return {{section.rowWidthJS(index)}}" stepKey="rowWidth"/> |
107 | 56 | <assertGreaterThan stepKey="assertRowWidthGreaterThanZero">
|
108 | 57 | <expectedResult type="int">0</expectedResult>
|
109 | 58 | <actualResult type="variable">rowWidth</actualResult>
|
110 | 59 | </assertGreaterThan>
|
111 |
| - <assertLessThan stepKey="assertRowWidthLessThanPage"> |
112 |
| - <expectedResult type="variable">pageWidth</expectedResult> |
| 60 | + <assertLessThan stepKey="assertRowWidthLessThanStageOrPageWidth"> |
| 61 | + <expectedResult type="variable">pageOrStageWidth</expectedResult> |
113 | 62 | <actualResult type="variable">rowWidth</actualResult>
|
114 | 63 | </assertLessThan>
|
| 64 | + <resizeWindow width="1280" height="1024" stepKey="resizeWindowToDesktop"/> |
115 | 65 | </actionGroup>
|
116 |
| - <!-- Validate Full Width Row Appearance on Storefront --> |
117 |
| - <actionGroup name="validateFullWidthRowAppearanceOnStorefront"> |
| 66 | + <actionGroup name="validateFullWidthRowAppearance"> |
| 67 | + <arguments> |
| 68 | + <argument name="pageOrStageWidthJS" defaultValue="{{PageBuilderStage.stageWidthJS}}" type="string"/> |
| 69 | + <argument name="section" defaultValue="RowOnStage"/> |
| 70 | + <argument name="rowIndex" defaultValue="1" type="string"/> |
| 71 | + <argument name="childContentType" defaultValue="PageBuilderDividerContentType"/> |
| 72 | + <argument name="childContentTypeBorder" defaultValue="PageBuilderAdvancedBorderWidthProperty0"/> |
| 73 | + <argument name="childContentTypeIndex" defaultValue="1" type="string"/> |
| 74 | + <argument name="padding" defaultValue="PageBuilderPaddingPropertyRowDefault"/> |
| 75 | + <argument name="acceptableOffset" defaultValue="2" type="string"/> |
| 76 | + </arguments> |
118 | 77 | <comment userInput="Increase window size to see varying widths for rows" stepKey="commentResizeWindow"/>
|
119 | 78 | <resizeWindow width="1920" height="1024" stepKey="resizeWindow"/>
|
120 |
| - <executeJS function="return {{PageBuilderStoreFront.pageWidthJS}}" stepKey="pageWidth"/> |
121 |
| - <executeJS function="return {{RowOnStorefront.rowWidthJS('full-width', '0')}}" stepKey="rowWidth"/> |
122 |
| - <executeJS function="return parseInt({{RowOnStorefront.rowH2ChildWidthJS('full-width', '0')}} + {{PageBuilderPaddingPropertyRowDefault.paddingLeft}} + {{PageBuilderPaddingPropertyRowDefault.paddingRight}})" stepKey="rowElementWidth"/> |
| 79 | + <executeJS function="return {{pageOrStageWidthJS}}" stepKey="pageOrStageWidth"/> |
| 80 | + <executeJS function="return {{section.rowWidthJS(rowIndex)}}" stepKey="rowWidth"/> |
| 81 | + <executeJS function="return parseInt({{section.rowChildContentWidthJS(rowIndex, childContentType.role, childContentTypeIndex)}} + {{padding.paddingLeft}} + {{padding.paddingRight}} + ({{childContentTypeBorder.value}}*2))" stepKey="rowChildElementWidth"/> |
| 82 | + <executeJS function="return Math.abs({$pageOrStageWidth} - {$rowWidth})" stepKey="pageMinusRowWidth"/> |
123 | 83 | <assertGreaterThan stepKey="assertRowWidthGreaterThanZero">
|
124 | 84 | <expectedResult type="int">0</expectedResult>
|
125 | 85 | <actualResult type="variable">rowWidth</actualResult>
|
126 | 86 | </assertGreaterThan>
|
127 |
| - <assertEquals stepKey="assertRowWidthEqualsPage"> |
128 |
| - <expectedResult type="variable">pageWidth</expectedResult> |
129 |
| - <actualResult type="variable">rowWidth</actualResult> |
130 |
| - </assertEquals> |
131 |
| - <assertGreaterThan stepKey="assertRowWidthGreaterThanContents"> |
132 |
| - <expectedResult type="variable">rowElementWidth</expectedResult> |
133 |
| - <actualResult type="variable">rowWidth</actualResult> |
134 |
| - </assertGreaterThan> |
| 87 | + <assertLessThanOrEqual stepKey="assertRowWidthEqualsStageOrPageWidth"> |
| 88 | + <expectedResult type="int">{{acceptableOffset}}</expectedResult> |
| 89 | + <actualResult type="variable">pageMinusRowWidth</actualResult> |
| 90 | + </assertLessThanOrEqual> |
| 91 | + <assertGreaterThanOrEqual stepKey="assertRowWidthGreaterThanOrEqualToContents"> |
| 92 | + <expectedResult type="variable">rowChildElementWidth</expectedResult> |
| 93 | + <actualResult type="variable">rowWidth</actualResult> |
| 94 | + </assertGreaterThanOrEqual> |
| 95 | + <assertLessThanOrEqual stepKey="assertChildContentMaximumWidth"> |
| 96 | + <expectedResult type="int">1300</expectedResult> |
| 97 | + <actualResult type="variable">rowChildElementWidth</actualResult> |
| 98 | + </assertLessThanOrEqual> |
| 99 | + <resizeWindow width="1280" height="1024" stepKey="resizeWindowToDesktop"/> |
135 | 100 | </actionGroup>
|
136 |
| - <!-- Validate Full Bleed Row Appearance on Storefront --> |
137 |
| - <actionGroup name="validateFullBleedRowAppearanceOnStorefront"> |
138 |
| - <comment userInput="Increase window size to see varying widths for rows" stepKey="commentResizeWindow"/> |
139 |
| - <resizeWindow width="1920" height="1024" stepKey="resizeWindow"/> |
140 |
| - <executeJS function="return {{PageBuilderStoreFront.pageWidthJS}}" stepKey="pageWidth"/> |
141 |
| - <executeJS function="return {{RowOnStorefront.rowWidthJS('full-bleed', '0')}}" stepKey="rowWidth"/> |
142 |
| - <executeJS function="return parseInt({{RowOnStorefront.rowH2ChildWidthJS('full-bleed', '0')}} + {{PageBuilderPaddingPropertyRowDefault.paddingLeft}} + {{PageBuilderPaddingPropertyRowDefault.paddingRight}})" stepKey="rowElementWidth"/> |
143 |
| - <assertGreaterThan stepKey="assertRowWidthGreaterThanZero"> |
144 |
| - <expectedResult type="int">0</expectedResult> |
145 |
| - <actualResult type="variable">rowWidth</actualResult> |
146 |
| - </assertGreaterThan> |
147 |
| - <assertEquals stepKey="assertRowWidthEqualsPage"> |
148 |
| - <expectedResult type="variable">pageWidth</expectedResult> |
149 |
| - <actualResult type="variable">rowWidth</actualResult> |
150 |
| - </assertEquals> |
151 |
| - <assertEquals stepKey="assertRowWidthEqualsContentsPlusPadding"> |
152 |
| - <expectedResult type="variable">rowElementWidth</expectedResult> |
153 |
| - <actualResult type="variable">rowWidth</actualResult> |
154 |
| - </assertEquals> |
| 101 | + <actionGroup name="validateFullBleedRowAppearance" extends="validateFullWidthRowAppearance"> |
| 102 | + <executeJS function="return Math.abs({$rowChildElementWidth} - {$rowWidth})" stepKey="rowMinusChildWidth" after="pageMinusRowWidth"/> |
| 103 | + <assertLessThanOrEqual stepKey="assertRowWidthGreaterThanOrEqualToContents"> |
| 104 | + <expectedResult type="int">{{acceptableOffset}}</expectedResult> |
| 105 | + <actualResult type="variable">rowMinusChildWidth</actualResult> |
| 106 | + </assertLessThanOrEqual> |
| 107 | + <comment userInput="---merging to remove step---" stepKey="assertChildContentMaximumWidth"/> |
155 | 108 | </actionGroup>
|
156 | 109 | </actionGroups>
|
0 commit comments