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
+ <!-- Set condition for Customer Segment-->
11
+ <actionGroup name =" SetCartAttributeConditionWithSegmentForCartPriceRuleActionGroup" >
12
+ <arguments >
13
+ <argument name =" attributeName" type =" string" />
14
+ <argument name =" value" type =" entity" />
15
+ </arguments >
16
+
17
+ <scrollTo selector =" {{AdminCartPriceRulesFormSection.conditionsHeader}}" stepKey =" scrollToActionTab" />
18
+ <conditionalClick selector =" {{AdminCartPriceRulesFormSection.conditionsHeader}}" dependentSelector =" {{AdminCartPriceRulesFormSection.conditionsHeaderOpen}}" visible =" false" stepKey =" openActionTab" />
19
+ <click selector =" {{AdminCartPriceRulesFormSection.conditions}}" stepKey =" applyRuleForConditions" />
20
+
21
+ <waitForPageLoad stepKey =" waitForDropDownOpened" />
22
+ <selectOption selector =" {{AdminCartPriceRulesFormSection.childAttribute}}" userInput =" {{attributeName}}" stepKey =" selectAttribute" />
23
+
24
+ <waitForPageLoad time =" 20" stepKey =" waitForOperator" />
25
+ <click selector =" {{AdminCartPriceRulesFormSection.condition('...')}}" stepKey =" clickToChooseOption1" />
26
+ <click selector =" {{AdminCartPriceRulesFormSection.openList}}" stepKey =" openList" />
27
+ <waitForPageLoad time =" 20" stepKey =" waitForGrid" />
28
+ <fillField selector =" {{AdminCartPriceRulesFormSection.searchSegmentName}}" userInput =" {{value.name}}" stepKey =" fillSegmentName" />
29
+ <click selector =" {{AdminCartPriceRulesFormSection.searchButton}}" stepKey =" clickButtonSearch" />
30
+
31
+ <waitForPageLoad stepKey =" waitForResults" />
32
+ <checkOption selector =" {{AdminCartPriceRulesFormSection.selectAll}}" stepKey =" checkAll" />
33
+ <waitForPageLoad stepKey =" waitForChecking" />
34
+ <moveMouseOver selector =" {{AdminCartPriceRulesFormSection.setSegment}}" stepKey =" moveOnButton" />
35
+ <click selector =" {{AdminCartPriceRulesFormSection.setSegment}}" stepKey =" setCustomerSegment" />
36
+ <click selector =" {{AdminMainActionsSection.saveAndContinue}}" stepKey =" clickSaveButton" />
37
+ <see selector =" {{AdminCartPriceRulesSection.messages}}" userInput =" You saved the rule." stepKey =" seeSuccessMessage" />
38
+ </actionGroup >
39
+ <actionGroup name =" SetCartAttributeConditionWhenMatchForCartPriceRuleActionGroup" extends =" SetCartAttributeConditionWithSegmentForCartPriceRuleActionGroup" >
40
+ <arguments >
41
+ <argument name =" operatorType" type =" string" defaultValue =" matches" />
42
+ </arguments >
43
+ <click selector =" {{AdminCartPriceRulesFormSection.condition('matches')}}" stepKey =" clickToChooseOption" after =" waitForOperator" />
44
+ <selectOption userInput =" {{operatorType}}" selector =" {{AdminCartPriceRulesFormSection.conditionsOperator}}" stepKey =" setOperatorType" after =" clickToChooseOption" />
45
+ </actionGroup >
46
+ </actionGroups >
0 commit comments