|
| 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 | + |
| 9 | +<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> |
| 11 | + <actionGroup name="AdminAddOptionsToAttributeWithDefaultLayeredNavigationActionGroup"> |
| 12 | + <annotations> |
| 13 | + <description>Adds 3 provided Options to a new Attribute on the Configurable Product creation/edit page. Selected default first option. Set "Use in Layered Navigation" to "Yes".</description> |
| 14 | + </annotations> |
| 15 | + <arguments> |
| 16 | + <argument name="label" defaultValue="colorProductAttribute" /> |
| 17 | + <argument name="option1" defaultValue="colorProductAttribute1"/> |
| 18 | + <argument name="option2" defaultValue="colorProductAttribute2"/> |
| 19 | + <argument name="option3" defaultValue="colorProductAttribute3"/> |
| 20 | + </arguments> |
| 21 | + |
| 22 | + <click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickOnCreateConfigurations"/> |
| 23 | + <click selector="{{AdminCreateProductConfigurationsPanel.createNewAttribute}}" stepKey="clickOnNewAttribute"/> |
| 24 | + <waitForPageLoad stepKey="waitForIFrame"/> |
| 25 | + <switchToIFrame selector="{{AdminNewAttributePanel.newAttributeIFrame}}" stepKey="switchToNewAttributeIFrame"/> |
| 26 | + <fillField selector="{{AdminNewAttributePanel.defaultLabel}}" userInput="{{label.default_label}}" stepKey="fillDefaultLabel"/> |
| 27 | + |
| 28 | + <!--Add option 1 to attribute--> |
| 29 | + <click selector="{{AdminNewAttributePanel.addOption}}" stepKey="clickAddOption1"/> |
| 30 | + <waitForElementVisible selector="{{AdminNewAttributePanel.isDefault('1')}}" time="30" stepKey="waitForOptionRow1" after="clickAddOption1"/> |
| 31 | + <fillField selector="{{AdminNewAttributePanel.optionAdminValue('0')}}" userInput="{{option1.name}}" stepKey="fillAdminLabel1" after="waitForOptionRow1"/> |
| 32 | + <click selector="{{AdminNewAttributePanel.isDefault('1')}}" stepKey="selectDefault" after="fillAdminLabel1"/> |
| 33 | + |
| 34 | + <!--Add option 2 to attribute--> |
| 35 | + <click selector="{{AdminNewAttributePanel.addOption}}" stepKey="clickAddOption2" after="selectDefault"/> |
| 36 | + <waitForElementVisible selector="{{AdminNewAttributePanel.isDefault('2')}}" time="30" stepKey="waitForOptionRow2" after="clickAddOption2"/> |
| 37 | + <fillField selector="{{AdminNewAttributePanel.optionAdminValue('1')}}" userInput="{{option2.name}}" stepKey="fillAdminLabel2" after="waitForOptionRow2"/> |
| 38 | + |
| 39 | + <!--Add option 3 to attribute--> |
| 40 | + <click selector="{{AdminNewAttributePanel.addOption}}" stepKey="clickAddOption3" after="fillAdminLabel2"/> |
| 41 | + <waitForElementVisible selector="{{AdminNewAttributePanel.isDefault('3')}}" time="30" stepKey="waitForOptionRow3" after="clickAddOption3"/> |
| 42 | + <fillField selector="{{AdminNewAttributePanel.optionAdminValue('2')}}" userInput="{{option3.name}}" stepKey="fillAdminLabel3" after="waitForOptionRow3"/> |
| 43 | + |
| 44 | + <!-- Set Use In Layered Navigation --> |
| 45 | + <click selector="{{AdminNewAttributePanel.storefrontPropertiesTab}}" stepKey="goToStorefrontPropertiesTab" after="fillAdminLabel3"/> |
| 46 | + <waitForElementVisible selector="{{AdminNewAttributePanel.storefrontPropertiesTitle}}" stepKey="waitTabLoad" after="goToStorefrontPropertiesTab"/> |
| 47 | + <selectOption selector="{{AdminNewAttributePanel.useInLayeredNavigation}}" stepKey="selectUseInLayer" userInput="Filterable (with results)" after="waitTabLoad"/> |
| 48 | + |
| 49 | + <!--Save attribute--> |
| 50 | + <click selector="{{AdminNewAttributePanel.saveAttribute}}" stepKey="clickSaveAttribute"/> |
| 51 | + <waitForPageLoad stepKey="waitForSavingAttribute"/> |
| 52 | + </actionGroup> |
| 53 | +</actionGroups> |
0 commit comments