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 =" VoidASalesOrderPlacedWithPayPalPaymentsProTest" >
11
+ <annotations >
12
+ <features value =" PayPal" />
13
+ <stories value =" Paypal Payments Pro" />
14
+ <title value =" Void a Sales Order placed with PayPal Payments Pro" />
15
+ <description value =" Void a Sales Order placed with PayPal Payments Pro and validate message in trasaction tab from backend " />
16
+ <severity value =" MAJOR" />
17
+ <testCaseId value =" AC-5461" />
18
+ <group value =" paypalPaymentsPro" />
19
+
20
+ </annotations >
21
+ <before >
22
+ <createData entity =" SimpleProduct" stepKey =" createSimpleProduct" />
23
+ <actionGroup ref =" AdminLoginActionGroup" stepKey =" loginAsAdmin" />
24
+ <!-- <actionGroup ref="AdminConfigurePayPalPaymentsProActionGroup" stepKey="ConfigPayPalPaymentsPro">
25
+ <argument name="credentials" value="SamplePaypalPaymentsProConfig"/>
26
+ </actionGroup>-->
27
+ <actionGroup ref =" StorefrontOpenProductEntityPageActionGroup" stepKey =" goToProductOnStorefront2" >
28
+ <argument name =" product" value =" $$createSimpleProduct$$" />
29
+ </actionGroup >
30
+ <!-- Add product 1 to cart -->
31
+ <actionGroup ref =" AddToCartFromStorefrontProductPageActionGroup" stepKey =" addToCartFromStorefrontProductPage" >
32
+ <argument name =" productName" value =" $createSimpleProduct.name$" />
33
+ </actionGroup >
34
+ <actionGroup ref =" StorefrontCartPageOpenActionGroup" stepKey =" goToCheckoutCartPage" />
35
+ <actionGroup ref =" StorefrontClickProceedToCheckoutActionGroup" stepKey =" clickProceedToCheckout" />
36
+ <!-- Place order-->
37
+ <actionGroup ref =" GuestCheckoutFillingShippingSectionActionGroup" stepKey =" guestCheckoutFillingShipping" >
38
+ <argument name =" shippingMethod" value =" Flat Rate" />
39
+ </actionGroup >
40
+ <waitForElementVisible selector =" {{StorefrontPaypalCheckoutSection.creditCard}}" stepKey =" waitForCreditCardPaymentMethod" />
41
+ <actionGroup ref =" StorefrontCheckoutSelectPaypalPaymentMethodActionGroup" stepKey =" selectPaypalPaymentMethod" />
42
+ <waitForPageLoad stepKey =" waitForLoadingMaskAfterPaymentMethodSelection" />
43
+ <actionGroup ref =" StorefrontPaypalFillCardDataActionGroup" stepKey =" fillCardDataPaypal" >
44
+ <argument name =" cardData" value =" VisaDefaultCard" />
45
+ </actionGroup >
46
+ <actionGroup ref =" ClickPlaceOrderActionGroup" stepKey =" checkoutPlaceOrder" />
47
+ <waitForText selector =" {{CheckoutSuccessMainSection.successTitle}}" userInput =" Thank you for your purchase!" stepKey =" waitForLoadSuccessPage" />
48
+ </before >
49
+ <after >
50
+ <!-- <magentoCLI command="config:set payment/paypal_payment_pro/active 0" stepKey="disablePayPalExpress"/>
51
+ <actionGroup ref="CliCacheCleanActionGroup" stepKey="flushingCacheAfterCreatingCouponsAndCartPriceRule">
52
+ <argument name="tags" value="config full_page"/>
53
+ </actionGroup>
54
+ <actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
55
+ <argument name="indices" value=""/>
56
+ </actionGroup>-->
57
+ <actionGroup ref =" AdminOrdersPageOpenActionGroup" stepKey =" navigateToSalesOrderPage" />
58
+ <actionGroup ref =" AdminClearFiltersActionGroup" stepKey =" clickOnRemoveButtonToUnFiltersIfPresent" />
59
+ <deleteData createDataKey =" createSimpleProduct" stepKey =" deleteSimpleProduct" />
60
+ <actionGroup ref =" AdminLogoutActionGroup" stepKey =" logout" />
61
+ </after >
62
+ <grabTextFrom selector =" {{CheckoutSuccessMainSection.orderNumber}}" stepKey =" grabOrderNumber" />
63
+ <actionGroup ref =" OpenOrderByIdActionGroup" stepKey =" openOrder" >
64
+ <argument name =" orderId" value =" {$grabOrderNumber}" />
65
+ </actionGroup >
66
+ <actionGroup ref =" AdminVoidPendingOrderActionGroup" stepKey =" voidOrder" />
67
+ <actionGroup ref =" AdminOrderViewCheckStatusActionGroup" stepKey =" checkOrderStatus" >
68
+ <argument name =" status" value =" Processing" />
69
+ </actionGroup >
70
+ <waitForElementVisible selector =" {{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey =" waitForGrabLastTransactionID" />
71
+ <grabTextFrom selector =" {{AdminOrderDetailsInformationSection.paymentInformationField('Last Transaction ID')}}" stepKey =" grabLastTransactionID" />
72
+ <waitForElementVisible selector =" {{AdminOrderNotesSection.voidAuthorizationNotes('$grabLastTransactionID')}}" stepKey =" WaitForVoidAuthorizationNotesWithID" />
73
+ <grabTextFrom selector =" {{AdminOrderNotesSection.voidAuthorizationNotes('$grabLastTransactionID')}}" stepKey =" voidAuthorizationNotesWithID" />
74
+ <actionGroup ref =" AdminOpenOrderCommentsHistoryActionGroup" stepKey =" clickOnCommentsHistory" />
75
+ <waitForText selector =" {{AdminOrderCommentsTabSection.authorizationNotes('Voided')}}" userInput =" $voidAuthorizationNotesWithID" stepKey =" seeOrderHistoryNotes" />
76
+ <!-- Check the last transaction of the order-->
77
+ <actionGroup ref =" AdminViewTransactionsInOrderActionGroup" stepKey =" validateVoidTxn" />
78
+ <waitForText selector =" {{AdminTransactionsGridSection.isClosed}}" userInput =" Yes" stepKey =" seeIsClosedIsYes" />
79
+ <waitForElementClickable selector =" {{AdminProductFormActionSection.backButton}}" stepKey =" waitForPBackButtonToBeClicked" />
80
+ <click selector =" {{AdminProductFormActionSection.backButton}}" stepKey =" clickBackButton" />
81
+ <actionGroup ref =" AdminViewAuthorizationTransactionsInOrderActionGroup" stepKey =" validateAuthTxn" />
82
+ <waitForText selector =" {{AdminTransactionsGridSection.isClosed}}" userInput =" Yes" stepKey =" seeIsClosedIsYesForAuthorization" />
83
+ </test >
84
+ </tests >
0 commit comments