|
16 | 16 | <description value="Sales rules filtering on category should apply to all products, including complex products."/>
|
17 | 17 | <severity value="CRITICAL"/>
|
18 | 18 | <testCaseId value="MAGETWO-70192"/>
|
19 |
| - <group value="CatalogRule"/> |
| 19 | + <group value="catalogRule"/> |
20 | 20 | </annotations>
|
21 | 21 | <before>
|
22 | 22 | <!-- Create two Categories: CAT1 and CAT2 -->
|
23 |
| - <createData entity="SimpleSubCategory" stepKey="createCategory"/> |
| 23 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
24 | 24 | <createData entity="SimpleSubCategory" stepKey="createCategory2"/>
|
25 | 25 | <!--Create config1 and config2-->
|
26 | 26 | <actionGroup ref="AdminCreateApiConfigurableProductWithHiddenChildActionGroup" stepKey="createConfigurableProduct1">
|
|
71 | 71 | <deleteData createDataKey="createConfigChildProduct2CreateConfigurableProduct2" stepKey="deleteConfigChildProduct4"/>
|
72 | 72 | <deleteData createDataKey="createConfigProductAttributeCreateConfigurableProduct2" stepKey="deleteConfigProductAttribute2"/>
|
73 | 73 | <!--Delete Cart Price Rule -->
|
74 |
| - <actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteCartPriceRule"> |
75 |
| - <argument name="ruleName" value="{{ApiSalesRule.name}}"/> |
76 |
| - </actionGroup> |
| 74 | + <deleteData createDataKey="createCartPriceRule" stepKey="deleteCartPriceRule"/> |
77 | 75 | <actionGroup ref="logout" stepKey="logout"/>
|
78 | 76 | </after>
|
79 | 77 | <!-- 1: Create a cart price rule applying to CAT1 with discount -->
|
80 |
| - <amOnPage url="{{AdminCartPriceRulesPage.url}}" stepKey="amOnCartPriceGridPage"/> |
81 |
| - <click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/> |
82 |
| - <fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{ApiSalesRule.name}}" stepKey="fillRuleName"/> |
83 |
| - <selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="Main Website" stepKey="selectWebsite"/> |
84 |
| - <actionGroup ref="selectNotLoggedInCustomerGroup" stepKey="chooseNotLoggedInCustomerGroup"/> |
85 |
| - <!-- Open the Actions Tab--> |
86 |
| - <click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickOnActionTab"/> |
87 |
| - <fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="50" stepKey="fillDiscountAmount"/> |
88 |
| - <selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="Fixed amount discount" stepKey="selectActionType"/> |
89 |
| - <click selector="{{AdminCartPriceRulesFormSection.condition('ALL')}}" stepKey="clickToChooseOption2"/> |
90 |
| - <selectOption selector="{{AdminCartPriceRulesFormSection.actionsAggregator}}" userInput="ANY" stepKey="selectCondition"/> |
91 |
| - <click selector="{{AdminCartPriceRulesFormSection.condition('TRUE')}}" stepKey="clickToChooseOption3"/> |
92 |
| - <selectOption selector="{{AdminCartPriceRulesFormSection.actionsValue}}" userInput="FALSE" stepKey="selectCondition2"/> |
93 |
| - <click selector="{{AdminCartPriceRulesFormSection.conditions}}" stepKey="selectActionConditions"/> |
94 |
| - <waitForPageLoad stepKey="waitForDropDownOpened"/> |
95 |
| - <selectOption selector="{{AdminCartPriceRulesFormSection.childAttribute}}" userInput="Category" stepKey="selectAttribute"/> |
96 |
| - <waitForPageLoad stepKey="waitForOperatorOpened"/> |
97 |
| - <click selector="{{AdminCartPriceRulesFormSection.condition('...')}}" stepKey="clickToChooseOption1"/> |
98 |
| - <fillField selector="{{AdminCartPriceRulesFormSection.actionValue}}" userInput="$$createCategory.id$$" stepKey="fillActionValue"/> |
99 |
| - <click selector="{{AdminCartPriceRulesFormSection.applyAction}}" stepKey="applyAction"/> |
100 |
| - <click selector="{{AdminCartPriceRulesFormSection.save}}" stepKey="clickSaveButton"/> |
101 |
| - <see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/> |
| 78 | + <createData entity="SalesRuleNoCouponWithFixedDiscount" stepKey="createCartPriceRule"/> |
| 79 | + <amOnPage url="{{AdminCartPriceRuleEditPage.url($$createCartPriceRule.rule_id$$)}}" stepKey="goToCartPriceRuleEditPage"/> |
| 80 | + <actionGroup ref="SetConditionForActionsInCartPriceRuleActionGroup" stepKey="setConditionForActionsInCartPriceRuleActionGroup"> |
| 81 | + <argument name="actionValue" value="$$createCategory.id$$"/> |
| 82 | + </actionGroup> |
102 | 83 | <!-- 2: Go to frontend and add an item from both CAT1 and CAT2 to your cart -->
|
103 | 84 | <amOnPage url="{{StorefrontHomePage.url}}" stepKey="goToFrontend"/>
|
104 | 85 | <!-- 3: Open configurable product 1 and add all his child products to cart -->
|
|
0 commit comments