AdminCartPriceRuleActionGroup.xml 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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="selectNotLoggedInCustomerGroup">
  11. <!-- This actionGroup was created to be merged from B2B because B2B has a very different form control here -->
  12. <selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" userInput="NOT LOGGED IN" stepKey="selectCustomerGroup"/>
  13. </actionGroup>
  14. <actionGroup name="selectRetailerCustomerGroup">
  15. <!-- This actionGroup was created to be merged from B2B. Retailer Customer Group -->
  16. <selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" userInput="Retailer" stepKey="selectRetailerCustomerGroup"/>
  17. </actionGroup>
  18. <!--Set Subtotal condition for Customer Segment-->
  19. <actionGroup name="SetCartAttributeConditionForCartPriceRuleActionGroup">
  20. <arguments>
  21. <argument name="attributeName" type="string"/>
  22. <argument name="operatorType" defaultValue="is" type="string"/>
  23. <argument name="value" type="string"/>
  24. </arguments>
  25. <scrollTo selector="{{AdminCartPriceRulesFormSection.conditionsHeader}}" stepKey="scrollToActionTab"/>
  26. <conditionalClick selector="{{AdminCartPriceRulesFormSection.conditionsHeader}}" dependentSelector="{{AdminCartPriceRulesFormSection.conditionsHeaderOpen}}"
  27. visible="false" stepKey="openActionTab"/>
  28. <click selector="{{AdminCartPriceRulesFormSection.conditions}}" stepKey="applyRuleForConditions"/>
  29. <waitForPageLoad stepKey="waitForDropDownOpened"/>
  30. <selectOption selector="{{AdminCartPriceRulesFormSection.childAttribute}}" userInput="{{attributeName}}" stepKey="selectAttribute"/>
  31. <waitForPageLoad stepKey="waitForOperatorOpened"/>
  32. <click selector="{{AdminCartPriceRulesFormSection.condition('is')}}" stepKey="clickToChooseOption"/>
  33. <selectOption userInput="{{operatorType}}" selector="{{AdminCartPriceRulesFormSection.conditionsOperator}}" stepKey="setOperatorType"/>
  34. <click selector="{{AdminCartPriceRulesFormSection.condition('...')}}" stepKey="clickToChooseOption1"/>
  35. <fillField userInput="{{value}}" selector="{{AdminCartPriceRulesFormSection.conditionsValue}}" stepKey="fillActionValue"/>
  36. <click selector="{{AdminMainActionsSection.saveAndContinue}}" stepKey="clickSaveButton"/>
  37. <see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/>
  38. </actionGroup>
  39. </actionGroups>