|
| 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="AdminCreateCartPriceRuleWithCustomerSegmentActionGroup"> |
| 12 | + <annotations> |
| 13 | + <description> |
| 14 | + Clicks on the 'Actions' section on the Admin Cart Price Rule creation with customer segment action. |
| 15 | + </description> |
| 16 | + </annotations> |
| 17 | + <arguments> |
| 18 | + <argument name="rule" type="entity"/> |
| 19 | + </arguments> |
| 20 | + |
| 21 | + <fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{rule.name}}" stepKey="fillRuleName"/> |
| 22 | + <fillField selector="{{AdminCartPriceRulesFormSection.description}}" userInput="{{rule.description}}" stepKey="fillDescription"/> |
| 23 | + <selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="{{rule.websites}}" stepKey="selectWebsites"/> |
| 24 | + <selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" parameterArray="[{{rule.customerGroups}}]" stepKey="selectCustomerGroup"/> |
| 25 | + <selectOption selector="{{AdminCartPriceRulesFormSection.coupon}}" userInput="{{rule.coupon_type}}" stepKey="selectCouponType"/> |
| 26 | + |
| 27 | + <!-- Expand the conditions section and add required condition--> |
| 28 | + <scrollTo selector="{{AdminCartPriceRulesFormSection.conditionsHeader}}" stepKey="scrollToConditionsHeader"/> |
| 29 | + <conditionalClick selector="{{AdminCartPriceRulesFormSection.conditionsHeader}}" dependentSelector="{{AdminCartPriceRulesFormSection.conditionsHeader}}" visible="true" stepKey="clickToExpandConditions"/> |
| 30 | + <click selector="{{AdminCartPriceRulesFormSection.newCondition}}" stepKey="clickNewCondition"/> |
| 31 | + <waitForElementVisible selector="{{AdminCartPriceRulesFormSection.conditionSelect}}" time="240" stepKey="waitForSelectOptionVisible"/> |
| 32 | + <selectOption selector="{{AdminCartPriceRulesFormSection.conditionSelect}}" userInput="Customer Segment" stepKey="selectCondition1"/> |
| 33 | + <waitForPageLoad stepKey="waitForConditionLoad"/> |
| 34 | + <click selector="{{AdminCartPriceRulesFormSection.targetEllipsis}}" stepKey="clickEllipsis"/> |
| 35 | + <waitForPageLoad time="20" stepKey="waitForOperator"/> |
| 36 | + <click selector="{{AdminCartPriceRulesFormSection.openList}}" stepKey="openList"/> |
| 37 | + <waitForPageLoad time="60" stepKey="waitForGrid"/> |
| 38 | + |
| 39 | + <checkOption selector="{{AdminCartPriceRulesFormSection.selectAll}}" stepKey="checkAll"/> |
| 40 | + <waitForPageLoad stepKey="waitForChecking"/> |
| 41 | + <moveMouseOver selector="{{AdminCartPriceRulesFormSection.setSegment}}" stepKey="moveOnButton"/> |
| 42 | + <click selector="{{AdminCartPriceRulesFormSection.setSegment}}" stepKey="setCustomerSegment"/> |
| 43 | + <waitForPageLoad time="60" stepKey="waitForSelectCustomerSegment"/> |
| 44 | + <click selector="{{AdminMainActionsSection.saveAndContinue}}" stepKey="clickSaveButton"/> |
| 45 | + <see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/> |
| 46 | + </actionGroup> |
| 47 | +</actionGroups> |
0 commit comments