|
| 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 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 9 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="CheckoutWithPayPalPayFlowProTest"> |
| 11 | + <annotations> |
| 12 | + <features value="PayPal"/> |
| 13 | + <stories value="Payment methods"/> |
| 14 | + <title value="Checkout with paypal payflow pro "/> |
| 15 | + <description value="Configure PayPal PayFlow Pro and Place an order"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="AC-11515"/> |
| 18 | + <group value="paypalPayflowProWithOutValut"/> |
| 19 | + <group value="3rd_party_integration" /> |
| 20 | + <group value="pr_exclude" /> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <!--Create a customer--> |
| 24 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 25 | + <!-- Create simple product--> |
| 26 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct1"/> |
| 27 | + <!-- Login to admin--> |
| 28 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 29 | + </before> |
| 30 | + <after> |
| 31 | + <!-- Delete product and customer--> |
| 32 | + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct"/> |
| 33 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer" /> |
| 34 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 35 | + <!-- Logout--> |
| 36 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 37 | + </after> |
| 38 | + <!-- Login as Customer --> |
| 39 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> |
| 40 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 41 | + </actionGroup> |
| 42 | + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct1.custom_attributes[url_key]$$)}}" stepKey="goToStorefront"/> |
| 43 | + <!-- Add product 1 to cart --> |
| 44 | + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"> |
| 45 | + <argument name="productName" value="$createSimpleProduct1.name$"/> |
| 46 | + </actionGroup> |
| 47 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> |
| 48 | + <!-- Select shipping --> |
| 49 | + <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatrate"> |
| 50 | + <argument name="shippingMethodName" value="Flat Rate"/> |
| 51 | + </actionGroup> |
| 52 | + <!-- Go to Order review --> |
| 53 | + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage"/> |
| 54 | + <!-- Checkout select Credit Card (Payflow Pro) and place order--> |
| 55 | + <waitForPageLoad stepKey="waitForPaymentPageLoad"/> |
| 56 | + <conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Pro)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Check / Money order')}}" visible="true" stepKey="selectCheckmoPaymentMethod"/> |
| 57 | + <waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/> |
| 58 | + <!--Fill Card Data and place an order--> |
| 59 | + <actionGroup ref="StorefrontPaypalFillCardDataActionGroup" stepKey="fillCardDataPaypal"> |
| 60 | + <argument name="cardData" value="VisaDefaultCard"/> |
| 61 | + </actionGroup> |
| 62 | + <waitForPageLoad stepKey="waitForFillCardData"/> |
| 63 | + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/> |
| 64 | + <!-- Grab order number--> |
| 65 | + <waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="waitForOderNumber"/> |
| 66 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> |
| 67 | + </test> |
| 68 | +</tests> |
0 commit comments