|
17 | 17 | <testCaseId value="AC-6152"/> |
18 | 18 | </annotations> |
19 | 19 | <before> |
20 | | - <!-- Simple product is created and assigned to category --> |
21 | | - <createData entity="_defaultCategory" stepKey="createCategory"/> |
22 | | - <createData entity="SimpleProduct" stepKey="createProduct"> |
23 | | - <requiredEntity createDataKey="createCategory"/> |
24 | | - </createData> |
| 20 | + <!-- Simple product is created --> |
| 21 | + <createData entity="SimpleProduct" stepKey="createProduct"/> |
25 | 22 | <!-- US Customer is created --> |
26 | 23 | <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
27 | 24 | <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
28 | 25 | <!-- Delete all existing cart price rules --> |
29 | 26 | <actionGroup ref="AdminCartPriceRuleDeleteAllActionGroup" stepKey="deleteAllCartPriceRules"/> |
30 | 27 | <!-- Create new cart price rule --> |
31 | | - <actionGroup ref="AdminOpenNewCartPriceRuleFormPageActionGroup" stepKey="createCartPriceRule"/> |
32 | | - <actionGroup ref="AdminCartPriceRuleFillMainInfoActionGroup" stepKey="fillCartRulesMainInfoPage"> |
33 | | - <argument name="name" value="{{CatPriceRule.name}}"/> |
34 | | - <argument name="description" value="{{ApiSalesRule.description}}"/> |
35 | | - </actionGroup> |
36 | | - <!-- Add discount coupon --> |
37 | | - <actionGroup ref="AdminCartPriceRuleFillCouponInfoActionGroup" stepKey="fillCartPriceRuleCouponInfo"/> |
38 | | - <!-- Actions header configurations --> |
39 | | - <conditionalClick selector="{{AdminCartPriceRulesFormSection.actionsHeader}}" dependentSelector="{{AdminCartPriceRulesFormSection.actionsHeader}}" visible="true" stepKey="clickToExpandActions"/> |
40 | | - <selectOption selector="{{AdminCartPriceRulesFormSection.apply}}" userInput="Percent of product price discount" stepKey="selectActionType"/> |
41 | | - <fillField selector="{{AdminCartPriceRulesFormSection.discountAmount}}" userInput="20" stepKey="fillDiscountAmount"/> |
42 | | - <actionGroup ref="AdminCartPriceRuleSaveActionGroup" stepKey="saveCartPriceRule"/> |
43 | | - <!-- end of create cart price rule --> |
| 28 | + <createData entity="SalesRuleSpecificCouponWithPercentDiscount" stepKey="createCartPriceRule"/> |
| 29 | + <createData entity="SimpleSalesRuleCoupon" stepKey="createCouponForCartPriceRule"> |
| 30 | + <requiredEntity createDataKey="createCartPriceRule"/> |
| 31 | + </createData> |
44 | 32 | <!-- Configure Paypal Express Checkout --> |
45 | 33 | <actionGroup ref="AdminPayPalExpressCheckoutEnableActionGroup" stepKey="ConfigPayPalExpress"> |
46 | 34 | <argument name="credentials" value="SamplePaypalExpressConfig2"/> |
|
50 | 38 | <magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/> |
51 | 39 | <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
52 | 40 | <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
53 | | - <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
54 | 41 | <actionGroup ref="DeleteCartPriceRuleByName" stepKey="deleteCartPriceRule"> |
55 | 42 | <argument name="ruleName" value="{{CatPriceRule.name}}"/> |
56 | 43 | </actionGroup> |
|
74 | 61 | </actionGroup> |
75 | 62 | <!-- Apply Discount Coupon to the Order and assert order total --> |
76 | 63 | <actionGroup ref="StorefrontApplyDiscountCodeActionGroup" stepKey="applyDiscountCoupon"> |
77 | | - <argument name="discountCode" value="{{_defaultCoupon.code}}"/> |
| 64 | + <argument name="discountCode" value="$$createCouponForCartPriceRule.code$$"/> |
78 | 65 | </actionGroup> |
79 | 66 | <actionGroup ref="AssertStorefrontCheckoutPaymentSummaryTotalActionGroup" stepKey="assertSummaryTotalAfterCoupon"> |
80 | | - <argument name="orderTotal" value="$103.40"/> |
| 67 | + <argument name="orderTotal" value="$110.70"/> |
81 | 68 | </actionGroup> |
82 | 69 | <!-- Click on PayPal payment radio button --> |
83 | 70 | <waitForElementClickable selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="waitForPayPalRadioButton"/> |
84 | 71 | <click selector="{{CheckoutPaymentSection.PayPalPaymentRadio}}" stepKey="selectPaypalPayment"/> |
85 | 72 | <actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtn"/> |
86 | 73 | <!-- Login to Paypal in-context and verify order total on paypal page--> |
87 | 74 | <actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="loginToPayPal"/> |
88 | | - <waitForText selector="{{PayPalPaymentSection.orderTotalOnPaypalCheckout}}" userInput="$103.40" stepKey="verifyOrderTotalOnPaypalPage"/> |
| 75 | + <waitForText selector="{{PayPalPaymentSection.orderTotalOnPaypalCheckout}}" userInput="$110.70" stepKey="verifyOrderTotalOnPaypalPage"/> |
89 | 76 | <!-- Click PayPal button and go back to Magento site --> |
90 | 77 | <actionGroup ref="StorefrontPaypalSwitchBackToMagentoFromCheckoutPageActionGroup" stepKey="confirmPaymentAndGoBackToMagento"/> |
91 | 78 | <!-- I see order successful Page --> |
|
0 commit comments