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 =" AdminCreatePartialCaptureForOrderPaidWithPayPalPayflowProTest" extends =" StorefrontRegisteredCustomerCheckoutWithPayPalPayflowProCreditCardWithPaymentActionSaleAndVirtualQuoteAndVerifyTheOrderInBackendTest" >
11+ <annotations >
12+ <features value =" PayPal" />
13+ <stories value =" Paypal payflow Pro" />
14+ <title value =" Create partial capture for order paid with PayPal Payflow Pro" />
15+ <description value =" Admin creates partial capture for order paid with PayPal Payflow Pro and assert the transaction in transaction tab" />
16+ <severity value =" MAJOR" />
17+ <testCaseId value =" AC-5191" />
18+ </annotations >
19+ <before >
20+ <remove keyForRemoval =" createVirtualProduct" />
21+ <remove keyForRemoval =" setPaymentActionSale" />
22+ <remove keyForRemoval =" setPaymentActionSale" />
23+ <!-- Create product -->
24+ <createData entity =" SimpleProduct" stepKey =" createSimpleProduct" before =" loginAsAdmin" />
25+ <actionGroup ref =" CliIndexerReindexActionGroup" stepKey =" reindex" after =" loginAsAdmin" >
26+ <argument name =" indices" value =" " />
27+ </actionGroup >
28+ <actionGroup ref =" CliCacheCleanActionGroup" stepKey =" cleanCache" after =" reindex" >
29+ <argument name =" tags" value =" config full_page" />
30+ </actionGroup >
31+ </before >
32+ <after >
33+ <remove keyForRemoval =" deleteVirtualProduct" />
34+ <remove keyForRemoval =" setPaymentActionAuthorization" />
35+ <deleteData createDataKey =" createCustomer" stepKey =" deleteCustomer" />
36+ <deleteData createDataKey =" createSimpleProduct" stepKey =" deleteSimpleProduct" />
37+ <actionGroup ref =" AdminLogoutActionGroup" stepKey =" logout" />
38+ </after >
39+ <remove keyForRemoval =" goToProductOnStorefront" />
40+ <remove keyForRemoval =" addToCartFromStorefrontProductPage" />
41+ <remove keyForRemoval =" assertGrandTotal" />
42+ <remove keyForRemoval =" seeOrderHistoryNotes" />
43+ <remove keyForRemoval =" openTransactionTabOrdersPage" />
44+ <remove keyForRemoval =" getVoidTransaction" />
45+ <actionGroup ref =" StorefrontOpenProductEntityPageActionGroup" stepKey =" goToProductOnStorefront" >
46+ <argument name =" product" value =" $$createSimpleProduct$$" />
47+ </actionGroup >
48+ <fillField userInput =" 2" selector =" {{StorefrontProductPageSection.qtyInput}}" stepKey =" fillProductQty" after =" goToProductOnStorefront" />
49+ <!-- Add product to cart -->
50+ <actionGroup ref =" AddToCartFromStorefrontProductPageActionGroup" stepKey =" addProductToCartFromStorefrontProductPage" after =" fillProductQty" >
51+ <argument name =" productName" value =" $createSimpleProduct.name$" />
52+ </actionGroup >
53+ <actionGroup ref =" StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey =" goToCheckoutPaymentPage" after =" clickProceedToCheckout" />
54+ <!-- Click on invoice button and update qty and then submit invoice-->
55+ <actionGroup ref =" AdminClickInvoiceButtonOrderViewActionGroup" stepKey =" clickInvoiceButton" after =" openOrder" />
56+ <actionGroup ref =" AdminFillQtyToInvoiceOnCreateInvoicePageActionGroup" stepKey =" fillInvoiceQuantity" after =" clickInvoiceButton" >
57+ <argument name =" qty" value =" 1" />
58+ </actionGroup >
59+ <actionGroup ref =" AdminClickUpdateQtysButtonOnCreateInvoicePageActionGroup" stepKey =" clickUpdateQtyAfterUpdatingInvoiceBtn" after =" fillInvoiceQuantity" />
60+ <waitForPageLoad stepKey =" waitPageToBeLoaded" after =" clickUpdateQtyAfterUpdatingInvoiceBtn" />
61+ <seeOptionIsSelected userInput =" Capture Online" selector =" {{AdminInvoiceTotalSection.amount}}" stepKey =" seeOptionType" after =" waitPageToBeLoaded" />
62+ <actionGroup ref =" AdminInvoiceClickSubmitActionGroup" stepKey =" clickSubmitInvoice" after =" seeOptionType" />
63+ <waitForPageLoad time =" 60" stepKey =" waitForPageLoadSubmitInvoice" after =" clickSubmitInvoice" />
64+ <!-- Check order status and grab transaction id-->
65+ <actionGroup ref =" AdminOrderViewCheckStatusActionGroup" stepKey =" checkOrderStatus" before =" waitForTransactionIDFieldToBeAppeared" >
66+ <argument name =" status" value =" Processing" />
67+ </actionGroup >
68+ <waitForText selector =" {{AdminOrderCommentsTabSection.orderCommentsWithType('Captured')}}" userInput =" Captured amount of $133.00 online. Transaction ID: " {$grabTransactionID}" " stepKey =" seeOrderHistoryNotesAlongWithAmount" after =" clickOnCommentsHistory" />
69+ <!-- Assert Authorization Transaction-->
70+ <actionGroup ref =" AdminAssertTransactionTypeInTransactionTabActionGroup" stepKey =" assertAuthorizationTransactionType" after =" clickOnBackButton" >
71+ <argument name =" transactionType" value =" authorization" />
72+ </actionGroup >
73+ <waitForText selector =" {{AdminTransactionsGridSection.transactionData('Is Closed')}}" userInput =" No" stepKey =" seeIfClosedHeaderIsSetAsNoForAuthorization" after =" assertAuthorizationTransactionType" />
74+ <waitForElementClickable selector =" {{AdminProductFormActionSection.backButton}}" stepKey =" waitForBackButtonToBeClickedFromAuthorization" after =" seeIfClosedHeaderIsSetAsNoForAuthorization" />
75+ <click selector =" {{AdminProductFormActionSection.backButton}}" stepKey =" clickBackButtonFromAuthorization" after =" waitForBackButtonToBeClickedFromAuthorization" />
76+ <!-- Assert Capture Transaction-->
77+ <actionGroup ref =" AdminAssertTransactionTypeInTransactionTabActionGroup" after =" clickBackButtonFromAuthorization" stepKey =" assertCaptureTransactionType" >
78+ <argument name =" transactionType" value =" capture" />
79+ </actionGroup >
80+ <waitForText selector =" {{AdminTransactionsGridSection.transactionData('Is Closed')}}" userInput =" No" stepKey =" seeIfClosedHeaderIsSetAsNoForCapture" after =" assertCaptureTransactionType" />
81+ <waitForElementClickable selector =" {{AdminProductFormActionSection.backButton}}" stepKey =" waitForBackButtonToBeClickedFromCapture" after =" seeIfClosedHeaderIsSetAsNoForCapture" />
82+ <click selector =" {{AdminProductFormActionSection.backButton}}" stepKey =" clickBackButtonFromCapture" after =" waitForBackButtonToBeClickedFromCapture" />
83+ </test >
84+ </tests >
0 commit comments