|
| 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="AdminCompleteOrderPaidWithPayPalStandardTest"> |
| 11 | + <annotations> |
| 12 | + <features value="PayPal"/> |
| 13 | + <stories value="Payment methods"/> |
| 14 | + <title value="Complete a Sales Order Paid with PayPal Payments Standard"/> |
| 15 | + <description value="Complete order paid with PayPalStandard"/> |
| 16 | + <severity value="CRITICAL"/> |
| 17 | + <testCaseId value="AC-5320"/> |
| 18 | + <group value="paypalStandard"/> |
| 19 | + <group value="3rd_party_integration" /> |
| 20 | + <group value="pr_exclude" /> |
| 21 | + </annotations> |
| 22 | + <before> |
| 23 | + <!-- Login to admin--> |
| 24 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 25 | + <!-- Simple product is created --> |
| 26 | + <createData entity="simpleProductWithoutCategory" stepKey="createProduct"> |
| 27 | + <field key="price">140.98</field> |
| 28 | + </createData> |
| 29 | + <!-- US Customer is created --> |
| 30 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 31 | + </before> |
| 32 | + <after> |
| 33 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 34 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 35 | + <!-- Logout--> |
| 36 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 37 | + </after> |
| 38 | + <!-- Navigate to StoreFront --> |
| 39 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/> |
| 40 | + <!-- Add product to cart --> |
| 41 | + <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart"> |
| 42 | + <argument name="product" value="$$createProduct$$"/> |
| 43 | + </actionGroup> |
| 44 | + <actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckout"/> |
| 45 | + <!--Fill Shipping Address--> |
| 46 | + <actionGroup ref="FillGuestCheckoutShippingAddressFormActionGroup" stepKey="fillShippingAddress"/> |
| 47 | + <selectOption selector="{{CheckoutCartSummarySection.stateProvince}}" userInput="Texas" stepKey="fillState"/> |
| 48 | + <waitForPageLoad stepKey="waitForShippingPageToLoad"/> |
| 49 | + <!-- Click Next button --> |
| 50 | + <actionGroup ref="StorefrontGuestCheckoutProceedToPaymentStepActionGroup" stepKey="clickNext"/> |
| 51 | + <!-- Click on PayPal payment radio button and click on continue btn --> |
| 52 | + <actionGroup ref="AdminSelectPaypalStandardPaymentInPaymentPageActionGroup" stepKey="selectPaypalStandardPaymentAndClickOnContinuebtn"/> |
| 53 | + <!-- Login to Paypal in-context and verify order total on paypal page--> |
| 54 | + <actionGroup ref="StorefrontLoginToPayPalStandardPaymentActionGroup" stepKey="loginToPayPal"/> |
| 55 | + <actionGroup ref="StorefrontPaypalSwitchBackToMagentoFromCheckoutPageActionGroup" stepKey="confirmPaymentAndGoBackToMagento"/> |
| 56 | + <waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="waitForOrderNumberToBeGrabbed"/> |
| 57 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/> |
| 58 | + <!--Go to Admin and check order information--> |
| 59 | + <actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGrid"> |
| 60 | + <argument name="orderId" value="$grabOrderNumber"/> |
| 61 | + </actionGroup> |
| 62 | + <actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/> |
| 63 | + <!-- Check status --> |
| 64 | + <actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="seeAdminOrderStatus"> |
| 65 | + <argument name="status" value="Processing"/> |
| 66 | + </actionGroup> |
| 67 | + <!-- Create Shipment --> |
| 68 | + <actionGroup ref="AdminCreateShipmentFromOrderPage" stepKey="createNewShipment"> |
| 69 | + <argument name="Title" value="Title"/> |
| 70 | + <argument name="Number" value="99"/> |
| 71 | + <argument name="Qty" value="1"/> |
| 72 | + <argument name="Comment" value="comments for shipment"/> |
| 73 | + </actionGroup> |
| 74 | + <!--Create Invoice for this Order--> |
| 75 | + <actionGroup ref="StartCreateInvoiceFromOrderPageActionGroup" stepKey="createInvoice"/> |
| 76 | + <actionGroup ref="SubmitInvoiceActionGroup" stepKey="submitInvoice"/> |
| 77 | + <actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistory"/> |
| 78 | + <waitForText selector="{{AdminOrderCommentsTabSection.orderComment}}" userInput="Authorized amount of $145.98." stepKey="seeOrderHistoryNotes"/> |
| 79 | + </test> |
| 80 | +</tests> |
0 commit comments