You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

39 lines
3.4 KiB

  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="AdminCreateCartPriceRuleActionsWithSubtotalActionGroup" extends="AdminCreateCartPriceRuleActionGroup">
  11. <annotations>
  12. <description>EXTENDS: AdminCreateCartPriceRuleActionGroup. Removes 'fillDiscountAmount'. Adds sub total conditions for free shipping to a Cart Price Rule.</description>
  13. </annotations>
  14. <arguments>
  15. <argument name="ruleName"/>
  16. </arguments>
  17. <remove keyForRemoval="fillDiscountAmount"/>
  18. <!-- Expand the conditions section -->
  19. <grabTextFrom selector="{{AdminCartPriceRulesFormSection.ruleName}}" after="fillRuleName" stepKey="getSubtotalRule"/>
  20. <click selector="{{AdminCartPriceRulesFormSection.conditionsHeader}}" stepKey="openConditionsSection" after="selectActionType"/>
  21. <click selector="{{AdminCartPriceRulesFormSection.addCondition('1')}}" after="openConditionsSection" stepKey="addFirstCondition"/>
  22. <selectOption selector="{{AdminCartPriceRulesFormSection.conditionSelect}}" userInput="{{ruleName.condition1}}" after="addFirstCondition" stepKey="selectCondition1"/>
  23. <waitForPageLoad after="selectCondition1" stepKey="waitForConditionLoad"/>
  24. <click selector="{{AdminCartPriceRulesFormSection.condition(ruleName.ruleToChange1)}}" after="waitForConditionLoad" stepKey="clickToChooseOption"/>
  25. <selectOption selector="{{AdminCartPriceRulesFormSection.conditionsOperator}}" userInput="{{ruleName.rule1}}" after="clickToChooseOption" stepKey="setOperatorType"/>
  26. <click selector="{{AdminCartPriceRulesFormSection.targetEllipsis}}" after="setOperatorType" stepKey="clickEllipsis"/>
  27. <fillField selector="{{AdminCartPriceRulesFormSection.ruleFieldByIndex('1--1')}}" userInput="{{ruleName.subtotal}}" after="clickEllipsis" stepKey="fillSubtotalParameter"/>
  28. <click selector="{{AdminCartPriceRulesFormSection.addNewCondition('1')}}" after="fillSubtotalParameter" stepKey="clickOnTheAddNewCondition"/>
  29. <selectOption selector="{{AdminCartPriceRulesFormSection.conditionSelectDropdown('1')}}" userInput="{{ruleName.condition2}}" after="clickOnTheAddNewCondition" stepKey="selectSecondCondition"/>
  30. <waitForPageLoad after="selectSecondCondition" stepKey="waitForConditionLoad2"/>
  31. <click selector="{{AdminCartPriceRulesFormSection.targetEllipsis}}" after="waitForConditionLoad2" stepKey="clickEllipsis2"/>
  32. <selectOption selector="{{AdminCartPriceRulesFormSection.ruleFieldByIndex('1--2')}}" userInput="{{ruleName.shippingMethod}}" after="clickEllipsis2" stepKey="selectShippingMethod"/>
  33. <click selector="{{AdminCartPriceRulesFormSection.applyToShippingAmount}}" after="selectShippingMethod" stepKey="clickApplyToShipping"/>
  34. <click selector="{{AdminCartPriceRulesFormSection.discardSubsequentRules}}" after="clickApplyToShipping" stepKey="clickDiscardSubsequentRules"/>
  35. <selectOption selector="{{AdminCartPriceRulesFormSection.freeShipping}}" userInput="{{ruleName.simple_free_shipping}}" after="clickDiscardSubsequentRules" stepKey="selectForMatchingItemsOnly"/>
  36. </actionGroup>
  37. </actionGroups>