|
| 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="AdminCancelledPaymentStandardOrderTest"> |
| 11 | + <annotations> |
| 12 | + <features value="PayPal"/> |
| 13 | + <stories value="Payment standard method"/> |
| 14 | + <title value="Complete a Sales Order Paid with PayPal Payments Standard"/> |
| 15 | + <description value="Complete order paid with PayPalStandard and cancelled in backend"/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="AC-4808"/> |
| 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_CA_Customer" stepKey="createCustomer"/> |
| 31 | + </before> |
| 32 | + <after> |
| 33 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 34 | + <!-- Customer Log Out --> |
| 35 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/> |
| 36 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 37 | + <!-- Logout--> |
| 38 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 39 | + </after> |
| 40 | + <!-- Navigate to StoreFront --> |
| 41 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/> |
| 42 | + <!-- Login as customer --> |
| 43 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="storefrontCustomerLogin"> |
| 44 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 45 | + </actionGroup> |
| 46 | + <!-- Add product to cart --> |
| 47 | + <actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart"> |
| 48 | + <argument name="product" value="$$createProduct$$"/> |
| 49 | + </actionGroup> |
| 50 | + <actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckout"/> |
| 51 | + <!-- Click Next button --> |
| 52 | + <actionGroup ref="StorefrontGuestCheckoutProceedToPaymentStepActionGroup" stepKey="clickNext"/> |
| 53 | + <!-- Click on PayPal payment radio button and click on continue btn --> |
| 54 | + <actionGroup ref="AdminSelectPaypalStandardPaymentInPaymentPageActionGroup" stepKey="selectPaypalStandardPaymentAndClickOnContinueButton"/> |
| 55 | + <!-- Login to PayPal in-context and verify order total on PayPal page--> |
| 56 | + <actionGroup ref="StorefrontLoginToPayPalStandardPaymentActionGroup" stepKey="loginToPayPal"/> |
| 57 | + <actionGroup ref="StorefrontPaypalSwitchBackToMagentoFromCheckoutPageActionGroup" stepKey="confirmPaymentAndGoBackToMagento"/> |
| 58 | + <waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="waitForOrderNumberToBeGrabbed"/> |
| 59 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> |
| 60 | + <!-- Go to order page --> |
| 61 | + <actionGroup ref="OpenOrderByIdActionGroup" stepKey="openOrderedPage"> |
| 62 | + <argument name="orderId" value="{$grabOrderNumber}"/> |
| 63 | + </actionGroup> |
| 64 | + <actionGroup ref="CancelPendingOrderActionGroup" stepKey="cancelPendingOption"> |
| 65 | + <argument name="orderStatus" value="Canceled"/> |
| 66 | + </actionGroup> |
| 67 | + <!--Grab the transaction id--> |
| 68 | + <waitForElementVisible selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="waitForTransactionIDFieldToBeAppeared"/> |
| 69 | + <grabTextFrom selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="grabTransactionID"/> |
| 70 | + <actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistory"/> |
| 71 | + <waitForText selector="{{AdminOrderCommentsTabSection.orderCommentsWithType('Canceled order')}}" userInput="Canceled order online Amount: $145.98. Transaction ID: "{$grabTransactionID}"" stepKey="seeOrderHistoryNotesAfterCancelingOrder"/> |
| 72 | + <actionGroup ref="AdminOpenTransactionsTabActionGroup" stepKey="openTransactionTypeHasAuthorization"> |
| 73 | + <argument name="transactionType" value="authorization"/> |
| 74 | + </actionGroup> |
| 75 | + <waitForText selector="{{AdminTransactionsGridSection.transactionData('Is Closed')}}" userInput="Yes" stepKey="seeIfClosedHeaderIsSetAsYesForAuthorization"/> |
| 76 | + <waitForElementClickable selector="{{AdminProductFormActionSection.backButton}}" stepKey="waitForBackButtonToBeClicked"/> |
| 77 | + <click selector="{{AdminProductFormActionSection.backButton}}" stepKey="clickBackButton"/> |
| 78 | + <actionGroup ref="AdminOpenTransactionsTabActionGroup" stepKey="openTransactionTypeHasVoid"> |
| 79 | + <argument name="transactionType" value="void"/> |
| 80 | + </actionGroup> |
| 81 | + <waitForText selector="{{AdminTransactionsGridSection.transactionData('Is Closed')}}" userInput="Yes" stepKey="seeIfClosedHeaderIsSetAsYesForVoid"/> |
| 82 | + </test> |
| 83 | +</tests> |
0 commit comments