|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> |
| 10 | + <actionGroup name="AdminDynamicSortAssignProductsToFirstAndLastPositionActionGroup"> |
| 11 | + <annotations> |
| 12 | + <description>Admin reassigns the display order of the products (in category backend) for storefront for EE and B2B</description> |
| 13 | + </annotations> |
| 14 | + <arguments> |
| 15 | + <argument name="product1" type="string"/> |
| 16 | + <argument name="product3" type="string"/> |
| 17 | + </arguments> |
| 18 | + <!-- Admin Scroll to the Products In Category tab and expand the tab if closed --> |
| 19 | + <scrollTo selector="{{AdminCategoryBasicFieldSection.expandCollapseProductsInCategorySection('closed','Products in Category')}}" stepKey="adminScrollToProductsInCategorySectionForIndexing"/> |
| 20 | + <conditionalClick selector="{{AdminCategoryBasicFieldSection.expandCollapseProductsInCategorySection('closed','Products in Category')}}" dependentSelector="{{AdminCategoryBasicFieldSection.expandCollapseProductsInCategorySection('closed','Products in Category')}}" visible="true" stepKey="adminExpandsProductsInCategorySectionForIndexing"/> |
| 21 | + <!-- Admin resets the positions for the products --> |
| 22 | + <waitForElementVisible selector="{{AdminCategoryBasicFieldSection.productPositionInCategory('product1')}}" stepKey="adminWaitsForPositionFieldToPopulate"/> |
| 23 | + <scrollTo selector="{{AdminCategoryBasicFieldSection.btnMoveProductToFirstPosition('product1')}}" stepKey="scrollToTheListedProduct"/> |
| 24 | + <click selector="{{AdminCategoryBasicFieldSection.btnMoveProductToFirstPosition('product1')}}" stepKey="adminMovesProductToFirstIndex"/> |
| 25 | + <click selector="{{AdminCategoryBasicFieldSection.btnMoveProductToLastPosition('product3')}}" stepKey="adminMovesProductToLastIndex"/> |
| 26 | + <!-- Admin Saves the category and validate the success message --> |
| 27 | + <click selector="{{AdminCategoryBasicFieldSection.saveCategory}}" stepKey="adminSavesTheCategory"/> |
| 28 | + <waitForText selector="{{AdminMessagesSection.success}}" userInput="You saved the category." stepKey="adminVerifiesSuccessMessagePostSavingTheCategory"/> |
| 29 | + </actionGroup> |
| 30 | +</actionGroups> |
0 commit comments