|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="ApplyGiftsCardsAndCouponCodesInWidgetIsShownOnOrderReviewPageForPayflowProTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Payments"/> |
| 14 | + <stories value="Payflow Pro"/> |
| 15 | + <title value="Apply gift cards and promo codes widget are shown on Order review page for Payflow Pro"/> |
| 16 | + <description value="As a guest, apply coupon and gift card while placing an order through paypal payflow pro"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="AC-5199"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <!--Create simple product--> |
| 22 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct1"/> |
| 23 | + <!--Create cart price rule and coupon--> |
| 24 | + <createData entity="ActiveSalesRuleForNotLoggedIn" stepKey="createCartPriceRule"/> |
| 25 | + <createData entity="SimpleSalesRuleCoupon" stepKey="createCouponForCartPriceRule"> |
| 26 | + <requiredEntity createDataKey="createCartPriceRule"/> |
| 27 | + </createData> |
| 28 | + <!--Create a customer--> |
| 29 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 30 | + <!--Login to admin site--> |
| 31 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 32 | + </before> |
| 33 | + <after> |
| 34 | + <!--Delete created product--> |
| 35 | + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct"/> |
| 36 | + <!--Delete created cart price rule--> |
| 37 | + <deleteData createDataKey="createCartPriceRule" stepKey="deleteCartPriceRule"/> |
| 38 | + <!--Delete created customer--> |
| 39 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 40 | + <!--Logout from admin site--> |
| 41 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 42 | + </after> |
| 43 | + <!--Go to storefront--> |
| 44 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/> |
| 45 | + <!--Open product1 and add it to cart--> |
| 46 | + <actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="gotToProductPage"> |
| 47 | + <argument name="product" value="$$createSimpleProduct1$$"/> |
| 48 | + </actionGroup> |
| 49 | + <actionGroup ref="StorefrontAddToTheCartActionGroup" stepKey="addProductToCart"> |
| 50 | + <argument name="product" value="$$createSimpleProduct1$$"/> |
| 51 | + </actionGroup> |
| 52 | + <!--Go to checkout page--> |
| 53 | + <actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckoutCartPage"/> |
| 54 | + <!--Fill Shipping Address--> |
| 55 | + <actionGroup ref="GuestCheckoutFillNewShippingAddressActionGroup" stepKey="fillShippingAddress"> |
| 56 | + <argument name="customer" value="$$createCustomer$$" /> |
| 57 | + <argument name="address" value="US_Address_TX"/> |
| 58 | + </actionGroup> |
| 59 | + <!-- Select shipping --> |
| 60 | + <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectShippingMethodAsFlatrate"> |
| 61 | + <argument name="shippingMethodName" value="Flat Rate"/> |
| 62 | + </actionGroup> |
| 63 | + <!-- Go to Order review --> |
| 64 | + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage"/> |
| 65 | + <waitForPageLoad stepKey="waitForLoadingMask"/> |
| 66 | + <waitForPageLoad stepKey="waitForPaymentPageLoad"/> |
| 67 | + <!-- Apply Discount Coupon to the Order --> |
| 68 | + <actionGroup ref="StorefrontApplyDiscountCodeActionGroup" stepKey="applyDiscountCoupon"> |
| 69 | + <argument name="discountCode" value="$createCouponForCartPriceRule.code$"/> |
| 70 | + </actionGroup> |
| 71 | + <!--Place an order--> |
| 72 | + <actionGroup ref="ClickPlaceOrderActionGroup" after="fillCardData" stepKey="clickOnPlaceOrder"/> |
| 73 | + </test> |
| 74 | +</tests> |
0 commit comments