|
22 | 22 | <before>
|
23 | 23 | <!-- Step 1: Simple product is created -->
|
24 | 24 | <createData entity="_defaultProduct" stepKey="createSimpleProduct"/>
|
| 25 | + <!-- Step 2: Create a cart price rule for $10 Fixed amount discount --> |
| 26 | + <createData entity="ActiveSalesRuleCoupon50" stepKey="createCartPriceRule"/> |
| 27 | + <createData entity="SimpleSalesRuleCoupon" stepKey="createCouponForCartPriceRule"> |
| 28 | + <requiredEntity createDataKey="createCartPriceRule"/> |
| 29 | + </createData> |
25 | 30 | <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
|
26 |
| - <!-- Step 2: Store>Configuration; Sales>Tax FPT Enable --> |
| 31 | + <!-- Step 3: Store>Configuration; Sales>Tax FPT Enable --> |
27 | 32 | <createData entity="WeeeConfigEnable" stepKey="enableFPT"/>
|
28 | 33 | <magentoCLI command="config:set tax/cart_display/price 3" stepKey="setPrice"/>
|
29 | 34 | <magentoCLI command="config:set tax/cart_display/subtotal 3" stepKey="setSubtotal"/>
|
30 |
| - <!-- Step 3: Fixed Product Tax attribute is created and added to default attribute set --> |
| 35 | + <!-- Step 4: Fixed Product Tax attribute is created and added to default attribute set --> |
31 | 36 | <createData entity="FPTProductAttribute" stepKey="createProductFPTAttribute"/>
|
32 | 37 | <createData entity="AddToDefaultSet" stepKey="addFPTToAttributeSet">
|
33 | 38 | <requiredEntity createDataKey="createProductFPTAttribute"/>
|
34 | 39 | </createData>
|
35 | 40 | <actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductEditPage">
|
36 | 41 | <argument name="productId" value="$$createSimpleProduct.id$$"/>
|
37 | 42 | </actionGroup>
|
38 |
| - <!-- Step 4: FPT United States/California/100 --> |
| 43 | + <!-- Step 5: FPT United States/California/100 --> |
39 | 44 | <actionGroup ref="AdminProductAddFPTValueActionGroup" stepKey="addFPTValue1">
|
40 | 45 | <argument name="FPTAttributeCode" value="$createProductFPTAttribute.attribute_code$"/>
|
41 | 46 | <argument name="stateForFPT" value="California"/>
|
|
48 | 53 | <after>
|
49 | 54 | <magentoCLI command="config:set tax/cart_display/price 1" stepKey="setPrice"/>
|
50 | 55 | <magentoCLI command="config:set tax/cart_display/subtotal 1" stepKey="setSubtotal"/>
|
| 56 | + <deleteData createDataKey="createCartPriceRule" stepKey="deleteSalesRule"/> |
51 | 57 | <deleteData createDataKey="createProductFPTAttribute" stepKey="deleteProductFPTAttribute"/>
|
52 | 58 | <createData entity="WeeeConfigDisable" stepKey="disableFPT"/>
|
53 | 59 | <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
|
54 | 60 | <actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
|
55 | 61 | <magentoCron groups="index" stepKey="reindexBrokenIndices"/>
|
56 | 62 | </after>
|
57 | 63 |
|
58 |
| - <!-- Step 5: Create a cart price rule for $10 Fixed amount discount --> |
59 |
| - <actionGroup ref="AdminOpenCartPriceRulesPageActionGroup" stepKey="amOnCartPriceList"/> |
60 |
| - <click selector="{{AdminCartPriceRulesSection.addNewRuleButton}}" stepKey="clickAddNewRule"/> |
61 |
| - <fillField selector="{{AdminCartPriceRulesFormSection.ruleName}}" userInput="{{_defaultCoupon.code}}" stepKey="fillRuleName"/> |
62 |
| - <selectOption selector="{{AdminCartPriceRulesFormSection.websites}}" userInput="Main Website" stepKey="selectWebsites"/> |
63 |
| - <selectOption selector="{{AdminCartPriceRulesFormSection.customerGroups}}" parameterArray="[{{'NOT LOGGED IN','General','Wholesale','Retailer'}}]" stepKey="selectSpecifiedCustomerGroups"/> |
| 64 | + <!-- Search and update cart price rule page --> |
| 65 | + <actionGroup ref="AdminOpenCartPriceRulesPageActionGroup" stepKey="goToCartPriceRulePage"/> |
| 66 | + <actionGroup ref="AdminFilterCartPriceRuleActionGroup" stepKey="filterCartPriceRule"> |
| 67 | + <argument name="ruleName" value="$$createCartPriceRule.name$$"/> |
| 68 | + </actionGroup> |
64 | 69 | <click selector="{{PriceRuleConditionsSection.conditionsTab}}" stepKey="expandConditions"/>
|
65 | 70 | <!-- Scroll down -->
|
66 | 71 | <scrollTo selector="{{PriceRuleConditionsSection.conditionsTab}}" stepKey="scrollToConditionsTab"/>
|
|
71 | 76 | <selectOption selector="{{PriceRuleConditionsSection.operatorByIndex('1', '1')}}" userInput="equals or less than" stepKey="fillOperator"/>
|
72 | 77 | <click selector="{{PriceRuleConditionsSection.ruleParamLink('1', '1', '2')}}" stepKey="startEditValue"/>
|
73 | 78 | <fillField selector="{{PriceRuleConditionsSection.valueByIndex('1', '1')}}" userInput="2000" stepKey="fillValue"/>
|
74 |
| - <click selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" stepKey="clickToExpandActions"/> |
75 |
| - <selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="Fixed amount discount" stepKey="selectActionType"/> |
76 |
| - <fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="10" stepKey="fillDiscountAmount"/> |
77 | 79 | <click selector="{{AdminCartPriceRulesFormSection.save}}" stepKey="clickSaveButton"/>
|
78 | 80 | <see selector="{{AdminCartPriceRulesSection.messages}}" userInput="You saved the rule." stepKey="seeSuccessMessage"/>
|
79 | 81 | <!-- Step 6: Add the product to the cart -->
|
|
0 commit comments