|
228 | 228 | <waitForPageLoad stepKey="waitForAnimation1" time="30"/>
|
229 | 229 | <waitForElementVisible selector="{{PageBuilderActionsSection.editForm}}" stepKey="waitForEditForm"/>
|
230 | 230 | <see userInput="Edit {{contentType.name}}" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentTypeNameInEditFormTitle"/>
|
231 |
| - <waitForPageLoad stepKey="waitForAnimation2" time="30"/> |
232 | 231 | </actionGroup>
|
233 | 232 | <actionGroup name="openPageBuilderEditPanelSmallByIndex">
|
234 | 233 | <arguments>
|
235 |
| - <argument name="contentType" defaultValue=""/> |
236 |
| - <argument name="contentTypeIndex" defaultValue="1" type="string"/> |
| 234 | + <argument name="section"/> |
| 235 | + <argument name="targetIndex" defaultValue="1" type="string"/> |
237 | 236 | </arguments>
|
238 |
| - <waitForElementVisible time="20" selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForButtonElement"/> |
239 |
| - <click selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="clickButtonElement"/> |
240 |
| - <waitForPageLoad stepKey="waitForPageLoad"/> |
241 |
| - <waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentTypeOptionsMenuByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForOptions"/> |
242 |
| - <waitForElementVisible selector="{{PageBuilderActionsSection.contentTypeEditByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForEditButton"/> |
243 |
| - <click selector="{{PageBuilderActionsSection.contentTypeEditByIndex(contentType.role, contentTypeIndex)}}" stepKey="clickEditButton"/> |
| 237 | + <waitForElementVisible time="20" selector="{{section.openOptionsMenu(targetIndex)}}" stepKey="waitForContentType"/> |
| 238 | + <click selector="{{section.openOptionsMenu(targetIndex)}}" stepKey="clickContentType"/> |
| 239 | + <waitForPageLoad stepKey="waitForPageLoad1"/> |
| 240 | + <waitForElementVisible time="10" selector="{{section.optionsMenu(targetIndex)}}" stepKey="waitForOptionsMenu"/> |
| 241 | + <waitForElementVisible selector="{{section.optionsMenuButton(targetIndex, 'edit')}}" stepKey="waitForEditButton"/> |
| 242 | + <click selector="{{section.optionsMenuButton(targetIndex, 'edit')}}" stepKey="clickEditButton"/> |
| 243 | + <waitForPageLoad time="30" stepKey="waitForPageLoad2"/> |
244 | 244 | <waitForElementVisible time="5" selector="{{PageBuilderActionsSection.editForm}}" stepKey="waitForEditForm"/>
|
245 |
| - <waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDisappear"/> |
246 |
| - <see userInput="Edit {{contentType.name}}" selector="{{PageBuilderActionsSection.editFormTitle}}" stepKey="seeContentTypeNameInEditFormTitle"/> |
247 |
| - <waitForPageLoad stepKey="waitForPageLoad2"/> |
248 | 245 | </actionGroup>
|
249 | 246 | <actionGroup name="duplicateContentType">
|
250 | 247 | <arguments>
|
|
261 | 258 | </actionGroup>
|
262 | 259 | <actionGroup name="duplicateSmallContentType">
|
263 | 260 | <arguments>
|
264 |
| - <argument name="contentType" defaultValue=""/> |
| 261 | + <argument name="section"/> |
265 | 262 | <argument name="targetIndex" defaultValue="1" type="string"/>
|
266 |
| - <argument name="expectedIndex" defaultValue="2" type="string"/> |
267 | 263 | </arguments>
|
268 |
| - <waitForElementVisible selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, targetIndex)}}" stepKey="waitForContentTypeInStageVisible"/> |
269 |
| - <click selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, targetIndex)}}" stepKey="clickContentTypeStage"/> |
| 264 | + <waitForElement selector="{{section.all}}" stepKey="waitForAllContentTypes"/> |
| 265 | + <executeJS function="return document.querySelectorAll('{{section.all}}').length+1" stepKey="expectedContentTypeCount"/> |
| 266 | + <waitForElementVisible selector="{{section.openOptionsMenu(targetIndex)}}" stepKey="waitForContentTypeVisible"/> |
| 267 | + <click selector="{{section.openOptionsMenu(targetIndex)}}" stepKey="clickContentType"/> |
270 | 268 | <waitForPageLoad stepKey="waitForPageLoad1"/>
|
271 |
| - <waitForElementVisible selector="{{PageBuilderActionsSection.contentTypeOptionsMenuByIndex(contentType.role, targetIndex)}}" stepKey="waitForOptionsMenu"/> |
272 |
| - <click selector="{{PageBuilderActionsSection.contentTypeDuplicate(contentType.role, targetIndex)}}" stepKey="clickDuplicateContentType"/> |
| 269 | + <waitForElementVisible selector="{{section.optionsMenu(targetIndex)}}" stepKey="waitForOptionsMenu"/> |
| 270 | + <click selector="{{section.optionsMenuButton(targetIndex, 'duplicate')}}" stepKey="clickDuplicate"/> |
273 | 271 | <waitForPageLoad stepKey="waitForPageLoad2"/>
|
274 |
| - <waitForElementVisible selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, expectedIndex)}}" stepKey="waitForDuplicateContentType"/> |
| 272 | + <executeJS function="return document.querySelectorAll('{{section.all}}').length" stepKey="resultingContentTypeCount"/> |
| 273 | + <assertEquals stepKey="assertContentTypeCount"> |
| 274 | + <actualResult type="variable">$resultingContentTypeCount</actualResult> |
| 275 | + <expectedResult type="variable">$expectedContentTypeCount</expectedResult> |
| 276 | + </assertEquals> |
275 | 277 | </actionGroup>
|
276 | 278 | <actionGroup name="openPageBuilderOptionsByIndex">
|
277 | 279 | <arguments>
|
|
284 | 286 | <moveMouseOver selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeNumber)}}" x="{{offsetXCoordinate}}" y="{{offsetYCoordinate}}" stepKey="onMouseOverContentTypeStage"/>
|
285 | 287 | <waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentTypeEditByIndex(contentType.role, contentTypeNumber)}}" stepKey="waitForOptions" />
|
286 | 288 | </actionGroup>
|
| 289 | + <actionGroup name="openPageBuilderOptionsMenuSmallByIndex"> |
| 290 | + <arguments> |
| 291 | + <argument name="section"/> |
| 292 | + <argument name="targetIndex" defaultValue="1" type="string"/> |
| 293 | + </arguments> |
| 294 | + <waitForElementVisible time="20" selector="{{section.openOptionsMenu(targetIndex)}}" stepKey="waitForContentType"/> |
| 295 | + <click selector="{{section.openOptionsMenu(targetIndex)}}" stepKey="clickContentType"/> |
| 296 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 297 | + <waitForElementVisible time="10" selector="{{section.optionsMenu(targetIndex)}}" stepKey="waitForOptionsMenu"/> |
| 298 | + </actionGroup> |
287 | 299 | <actionGroup name="removeEmptyContentTypeFromStage">
|
288 | 300 | <!-- Remove a content type which is in it's default state -->
|
289 | 301 | <arguments>
|
|
316 | 328 | </actionGroup>
|
317 | 329 | <actionGroup name="removeContentTypeFromStageSmallByIndex">
|
318 | 330 | <arguments>
|
319 |
| - <argument name="contentType" defaultValue=""/> |
320 |
| - <argument name="contentTypeIndex" defaultValue="2" type="string"/> |
| 331 | + <argument name="section"/> |
| 332 | + <argument name="targetIndex" defaultValue="1" type="string"/> |
321 | 333 | </arguments>
|
322 |
| - <waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForButtonElement"/> |
323 |
| - <click selector="{{PageBuilderActionsSection.contentTypeInStageByIndex(contentType.role, contentTypeIndex)}}" stepKey="clickButtonElement"/> |
| 334 | + <waitForElementVisible time="20" selector="{{section.openOptionsMenu(targetIndex)}}" stepKey="waitForContentType"/> |
| 335 | + <click selector="{{section.openOptionsMenu(targetIndex)}}" stepKey="clickContentType"/> |
324 | 336 | <waitForPageLoad stepKey="waitForPageLoad"/>
|
325 |
| - <waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentTypeOptionsMenuByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForOptions"/> |
326 |
| - <waitForElementVisible time="10" selector="{{PageBuilderActionsSection.contentTypeRemoveByIndex(contentType.role, contentTypeIndex)}}" stepKey="waitForRemoveButton"/> |
327 |
| - <click selector="{{PageBuilderActionsSection.contentTypeRemoveByIndex(contentType.role, contentTypeIndex)}}" stepKey="clickRemoveContentType"/> |
| 337 | + <waitForElementVisible time="10" selector="{{section.optionsMenu(targetIndex)}}" stepKey="waitForOptionsMenu"/> |
| 338 | + <waitForElementVisible time="10" selector="{{section.optionsMenuButton(targetIndex, 'remove')}}" stepKey="waitForRemoveButton"/> |
| 339 | + <click selector="{{section.optionsMenuButton(targetIndex, 'remove')}}" stepKey="clickRemoveButton"/> |
328 | 340 | <waitForPageLoad stepKey="waitForPageLoad2"/>
|
329 | 341 | </actionGroup>
|
330 | 342 | <actionGroup name="confirmRemovalModal">
|
|
835 | 847 | <argument name="group"/>
|
836 | 848 | </arguments>
|
837 | 849 | <waitForElementVisible selector="{{PageBuilderActionsSection.panelGroup(group.section)}}" stepKey="waitForGroupVisible"/>
|
838 |
| - <conditionalClick selector="{{PageBuilderActionsSection.panelGroup(group.section)}}" dependentSelector="{{PageBuilderActionsSection.panelGroupActive(group.name)}}" visible="false" stepKey="expandGroup"/> |
| 850 | + <conditionalClick selector="{{PageBuilderActionsSection.panelGroup(group.section)}}" dependentSelector="{{PageBuilderActionsSection.panelGroupActive(group.section)}}" visible="false" stepKey="expandGroup"/> |
839 | 851 | <waitForElementVisible selector="{{PageBuilderActionsSection.panelGroupActive(group.section)}}" stepKey="waitForGroupExpanded"/>
|
840 | 852 | </actionGroup>
|
841 | 853 | <actionGroup name="navigateToStoreFront">
|
|
0 commit comments