|
| 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="AdminCreatePartialCaptureForSalesOrderPlacedWithPaypalPayflowProTest"> |
| 11 | + <annotations> |
| 12 | + <features value="PayPal"/> |
| 13 | + <stories value="Payment methods"/> |
| 14 | + <title value="Create partial Capture for Order Placed with PayPal Payflow Pro"/> |
| 15 | + <description value="Create partial Capture for a Paypal Payflow Pro Order and and verify the transaction status after submit the Invoice."/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="AC-4795"/> |
| 18 | + <group value="paypalPayflowProWithOutVault"/> |
| 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="_defaultCategory" stepKey="createCategory"/> |
| 27 | + <createData entity="SimpleProduct" stepKey="createSimpleProduct"> |
| 28 | + <field key="quantity">5</field> |
| 29 | + <requiredEntity createDataKey="createCategory"/> |
| 30 | + </createData> |
| 31 | + <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexConfig"> |
| 32 | + <argument name="indices" value=""/> |
| 33 | + </actionGroup> |
| 34 | + <actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCacheConfig"> |
| 35 | + <argument name="tags" value="config full_page"/> |
| 36 | + </actionGroup> |
| 37 | + <!-- Login to admin--> |
| 38 | + <actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> |
| 39 | + </before> |
| 40 | + <after> |
| 41 | + <!-- Delete product and customer--> |
| 42 | + <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/> |
| 43 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 44 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 45 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> |
| 46 | + <!-- Logout--> |
| 47 | + <actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/> |
| 48 | + </after> |
| 49 | + <!-- Login as Customer --> |
| 50 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin"> |
| 51 | + <argument name="Customer" value="$$createCustomer$$"/> |
| 52 | + </actionGroup> |
| 53 | + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="amOnSimpleProductPage"/> |
| 54 | + <actionGroup ref="StorefrontAddCategoryProductToCartWithQuantityNewActionGroup" stepKey="addToCartFromStorefrontProductPage1"> |
| 55 | + <argument name="product" value="$$createSimpleProduct$$"/> |
| 56 | + <argument name="quantity" value="5"/> |
| 57 | + </actionGroup> |
| 58 | + <actionGroup ref="StorefrontGoToCheckoutFromMinicartNewActionGroup" stepKey="goToCheckoutFromMinicart"/> |
| 59 | + <!-- Select shipping --> |
| 60 | + <actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatrate"> |
| 61 | + <argument name="shippingMethodName" value="Flat Rate"/> |
| 62 | + </actionGroup> |
| 63 | + <!-- Go to Order review --> |
| 64 | + <actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage"/> |
| 65 | + <!-- Checkout select Credit Card (Payflow Pro) and place order--> |
| 66 | + <waitForPageLoad stepKey="waitForPaymentPageLoad"/> |
| 67 | + <conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Pro)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Check / Money order')}}" visible="true" stepKey="selectCheckmoPaymentMethod"/> |
| 68 | + <waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/> |
| 69 | + <!--Fill Card Data and place an order--> |
| 70 | + <actionGroup ref="StorefrontPaypalFillCardDataActionGroup" stepKey="fillCardDataPaypal"> |
| 71 | + <argument name="cardData" value="VisaDefaultCard"/> |
| 72 | + </actionGroup> |
| 73 | + <waitForPageLoad stepKey="waitForFillCardData"/> |
| 74 | + <actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/> |
| 75 | + <!-- Grab order number--> |
| 76 | + <waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="waitForOderNumber"/> |
| 77 | + <grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/> |
| 78 | + <!--Go to Admin and check order information--> |
| 79 | + <actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGrid"> |
| 80 | + <argument name="orderId" value="$grabOrderNumber"/> |
| 81 | + </actionGroup> |
| 82 | + <actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/> |
| 83 | + <!-- Check status --> |
| 84 | + <actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="seeAdminOrderStatus"> |
| 85 | + <argument name="status" value="Processing"/> |
| 86 | + </actionGroup> |
| 87 | + <!-- Go to invoice tab and fill data --> |
| 88 | + <actionGroup ref="AdminClickInvoiceButtonOrderViewActionGroup" stepKey="clickInvoiceAction"/> |
| 89 | + <fillField selector="{{AdminOrderInvoiceViewSection.invoiceQty}}" userInput="2" stepKey="fillInvoiceQuantity"/> |
| 90 | + <waitForPageLoad stepKey="wait"/> |
| 91 | + <click selector="{{AdminOrderInvoiceViewSection.updateInvoiceBtn}}" stepKey="clickUpdateQtyInvoiceBtn"/> |
| 92 | + <actionGroup ref="AdminInvoiceClickSubmitActionGroup" stepKey="clickSubmitInvoice"/> |
| 93 | + <!-- Assert invoice with shipment success message --> |
| 94 | + <waitForText selector="{{AdminOrderDetailsMessagesSection.successMessage}}" userInput="The invoice has been created." stepKey="seeSuccessMessage"/> |
| 95 | + <actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="checkOrderStatus"> |
| 96 | + <argument name="status" value="Processing"/> |
| 97 | + </actionGroup> |
| 98 | + <waitForElementVisible selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="waitForLastTransactionIDFieldToBeAppearedAfterSubmittingInvoice"/> |
| 99 | + <grabTextFrom selector="{{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey="grabLastTransactionIDForCaptured"/> |
| 100 | + <!--Open the comment history tab and assert the comment--> |
| 101 | + <actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistoryAfterSubmittingInvoice"/> |
| 102 | + <waitForText selector="{{AdminOrderCommentsTabSection.orderCommentsWithType('Captured amount')}}" userInput="Captured amount of $271.00 online. Transaction ID: "{$grabLastTransactionIDForCaptured}"" stepKey="seeOrderHistoryNotesAfterSubmittingInvoice"/> |
| 103 | + <waitForElementClickable selector="{{StorefrontOrderInvoicesSection.invoiceTab1}}" stepKey="waitForInvoiceTabToBeClicked"/> |
| 104 | + <actionGroup ref="AdminAssertInvoiceGrandTotalDetailsActionGroup" stepKey="clickOnInvoiceSectionFromOrdersPage"/> |
| 105 | + <actionGroup ref="AdminAssertTransitionTypeStatusNewActionGroup" stepKey="assertTransactionTypeStatusForAuthorization"> |
| 106 | + <argument name="transactionType" value="authorization"/> |
| 107 | + <argument name="transitionTypeStatus" value="No"/> |
| 108 | + </actionGroup> |
| 109 | + <actionGroup ref="AdminAssertTransitionTypeStatusNewActionGroup" stepKey="assertTransactionTypeStatusForCapture"> |
| 110 | + <argument name="transactionType" value="capture"/> |
| 111 | + <argument name="transitionTypeStatus" value="No"/> |
| 112 | + </actionGroup> |
| 113 | + </test> |
| 114 | +</tests> |
0 commit comments