|
| 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="EditOrderFromAdminWithSavedWithinPayPalPayflowProCreditCardForRegisteredCustomerTest"> |
| 11 | + <annotations> |
| 12 | + <features value="PayPal"/> |
| 13 | + <stories value="Payment methods"/> |
| 14 | + <title value="Edit Order from Admin with saved within PayPal Payflow Pro credit card for Registered Customer"/> |
| 15 | + <description value="Edit Order from Admin with saved within PayPal Payflow Pro credit card for Registered Customer"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="AC-5107"/> |
| 18 | + <group value="paypal"/> |
| 19 | + <group value="payflowpro"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <!--Create a customer--> |
| 23 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 24 | + <!-- Create simple product--> |
| 25 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct1"/> |
| 26 | + <!-- Login to admin--> |
| 27 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 28 | + <!-- Configure Paypal payflowpro--> |
| 29 | + <actionGroup ref="AdminPayPalPayflowProWithValutActionGroup" stepKey="ConfigPayPalExpress"> |
| 30 | + <argument name="credentials" value="SamplePaypalPaymentsProConfig"/> |
| 31 | + </actionGroup> |
| 32 | + </before> |
| 33 | + <after> |
| 34 | + <!-- Disable payflowpro--> |
| 35 | + <createData entity="RollbackPaypalPayflowPro" stepKey="rollbackPaypalPayflowProConfig"/> |
| 36 | + <!-- Delete product and customer--> |
| 37 | + <deleteData createDataKey="createSimpleProduct1" stepKey="deleteSimpleProduct"/> |
| 38 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 39 | + <!-- Logout--> |
| 40 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 41 | + </after> |
| 42 | + <!-- Login as Customer --> |
| 43 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> |
| 44 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 45 | + </actionGroup> |
| 46 | + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct1.custom_attributes[url_key]$$)}}" stepKey="goToStorefront"/> |
| 47 | + <!-- Add product 1 to cart --> |
| 48 | + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"> |
| 49 | + <argument name="productName" value="$createSimpleProduct1.name$"/> |
| 50 | + </actionGroup> |
| 51 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="goToCheckoutFromMinicart"/> |
| 52 | + <!-- Select shipping --> |
| 53 | + <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatrate"> |
| 54 | + <argument name="shippingMethodName" value="Flat Rate"/> |
| 55 | + </actionGroup> |
| 56 | + <!-- Go to Order review --> |
| 57 | + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage"/> |
| 58 | + <!-- Checkout select Credit Card (Payflow Pro) and place order--> |
| 59 | + <waitForPageLoad stepKey="waitForLoadingMask"/> |
| 60 | + <waitForPageLoad stepKey="waitForPaymentPageLoad"/> |
| 61 | + <conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Pro)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Check / Money order')}}" visible="true" stepKey="selectCheckmoPaymentMethod"/> |
| 62 | + <waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/> |
| 63 | + <!--Fill Card Data and place an order--> |
| 64 | + <actionGroup ref="StorefrontPaypalFillCardDataActionGroup" stepKey="fillCardDataPaypal"> |
| 65 | + <argument name="cardData" value="VisaDefaultCard"/> |
| 66 | + </actionGroup> |
| 67 | + <waitForPageLoad stepKey="waitForFillCardData"/> |
| 68 | + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/> |
| 69 | + <!-- Grab order number--> |
| 70 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> |
| 71 | + <!--Navigate to admin order grid and filter the order--> |
| 72 | + <actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderById"> |
| 73 | + <argument name="orderId" value="$grabOrderNumber"/> |
| 74 | + </actionGroup> |
| 75 | + <actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/> |
| 76 | + <!-- Click on edit--> |
| 77 | + <actionGroup ref="AdminEditOrderActionGroup" stepKey="openOrderForEdit"> |
| 78 | + <argument name="orderId" value="$grabOrderNumber"/> |
| 79 | + </actionGroup> |
| 80 | + <!-- Select stored card and submit order--> |
| 81 | + <conditionalClick selector="{{AdminOrderFormPaymentSection.storedCard}}" dependentSelector="{{AdminOrderFormPaymentSection.checkMoneyOption}}" visible="true" stepKey="checkCheckMoneyOption"/> |
| 82 | + <click selector="{{OrdersGridSection.submitOrder}}" stepKey="submitOrder"/> |
| 83 | + <see stepKey="seeSuccessMessageForOrder" userInput="You created the order."/> |
| 84 | + <!-- Filter order--> |
| 85 | + <actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderByIdAgain"> |
| 86 | + <argument name="orderId" value="$grabOrderNumber"/> |
| 87 | + </actionGroup> |
| 88 | + <!--verify order status is canceled--> |
| 89 | + <click selector="{{AdminOrdersGridSection.secondRow}}" stepKey="clickSecondOrderRow"/> |
| 90 | + <waitForPageLoad stepKey="waitForOrderPageLoad"/> |
| 91 | + <see userInput="Canceled" selector="{{AdminOrderDetailsInformationSection.orderStatus}}" stepKey="seeOrderStatus"/> |
| 92 | + </test> |
| 93 | +</tests> |
0 commit comments