AdminAddOptionsToAttributeActionGroup.xml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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="addOptionsToAttributeActionGroup">
  11. <arguments>
  12. <argument name="option1" defaultValue="colorProductAttribute2"/>
  13. <argument name="option2" defaultValue="colorDefaultProductAttribute1"/>
  14. <argument name="option3" defaultValue="colorProductAttribute3"/>
  15. <argument name="option4" defaultValue="colorProductAttribute1"/>
  16. <argument name="option5" defaultValue="colorDefaultProductAttribute2"/>
  17. </arguments>
  18. <!--Add option 1 to attribute-->
  19. <click selector="{{AdminNewAttributePanel.addOption}}" stepKey="clickAddOption1"/>
  20. <waitForElementVisible selector="{{AdminNewAttributePanel.isDefault('1')}}" time="30" stepKey="waitForOptionRow1" after="clickAddOption1"/>
  21. <fillField selector="{{AdminNewAttributePanel.optionAdminValue('0')}}" userInput="{{option1.name}}" stepKey="fillAdminLabel1" after="waitForOptionRow1"/>
  22. <!--Add option 2 to attribute-->
  23. <click selector="{{AdminNewAttributePanel.addOption}}" stepKey="clickAddOption2" after="fillAdminLabel1"/>
  24. <waitForElementVisible selector="{{AdminNewAttributePanel.isDefault('2')}}" time="30" stepKey="waitForOptionRow2" after="clickAddOption2"/>
  25. <fillField selector="{{AdminNewAttributePanel.optionAdminValue('1')}}" userInput="{{option2.name}}" stepKey="fillAdminLabel2" after="waitForOptionRow2"/>
  26. <!--Add option 3 to attribute-->
  27. <click selector="{{AdminNewAttributePanel.addOption}}" stepKey="clickAddOption3" after="fillAdminLabel2"/>
  28. <waitForElementVisible selector="{{AdminNewAttributePanel.isDefault('3')}}" time="30" stepKey="waitForOptionRow3" after="clickAddOption3"/>
  29. <fillField selector="{{AdminNewAttributePanel.optionAdminValue('2')}}" userInput="{{option3.name}}" stepKey="fillAdminLabel3" after="waitForOptionRow3"/>
  30. <!--Add option 4 to attribute-->
  31. <click selector="{{AdminNewAttributePanel.addOption}}" stepKey="clickAddOption4" after="fillAdminLabel3"/>
  32. <waitForElementVisible selector="{{AdminNewAttributePanel.isDefault('4')}}" time="30" stepKey="waitForOptionRow4" after="clickAddOption4"/>
  33. <fillField selector="{{AdminNewAttributePanel.optionAdminValue('3')}}" userInput="{{option4.name}}" stepKey="fillAdminLabel4" after="waitForOptionRow4"/>
  34. <!--Add option 5 to attribute-->
  35. <click selector="{{AdminNewAttributePanel.addOption}}" stepKey="clickAddOption5" after="fillAdminLabel4"/>
  36. <waitForElementVisible selector="{{AdminNewAttributePanel.isDefault('5')}}" time="30" stepKey="waitForOptionRow5" after="clickAddOption5"/>
  37. <fillField selector="{{AdminNewAttributePanel.optionAdminValue('4')}}" userInput="{{option5.name}}" stepKey="fillAdminLabel5" after="waitForOptionRow5"/>
  38. <!--Save attribute-->
  39. <click selector="{{AdminNewAttributePanel.saveAttribute}}" stepKey="clickSaveAttribute" after="fillAdminLabel5"/>
  40. <waitForPageLoad stepKey="waitForSavingAttribute"/>
  41. <see userInput="You saved the product attribute." stepKey="seeSuccessMessage"/>
  42. </actionGroup>
  43. </actionGroups>