Skip to content

Commit 5e7be74

Browse files
“Pavan-bj” “Pavan-bj” 
authored andcommitted
ACQE:6654-[AC-5144] Cancel a Sales Order placed with PayPal Payflow Pro
1 parent e81f28e commit 5e7be74

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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="CancelPaypalPayflowProOrderTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Payment methods"/>
14+
<title value="Cancel a Sales Order placed with PayPal Payflow Pro"/>
15+
<description value="Cancel a Sales Order placed with PayPal Payflow Pro"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="AC-5144"/>
18+
<group value="paypalPayflowPro"/>
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+
<!-- Simple product is created -->
26+
<createData entity="simpleProductWithoutCategory" stepKey="createProduct">
27+
<field key="price">140.98</field>
28+
</createData>
29+
<!-- Login to admin-->
30+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
31+
</before>
32+
<after>
33+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage"/>
34+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clickOnButtonToRemoveFiltersIfPresent"/>
35+
<!-- Delete product and customer-->
36+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
37+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer" />
38+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
39+
<!-- Logout-->
40+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
41+
</after>
42+
<!-- Navigate to StoreFront -->
43+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/>
44+
<!-- Add product to cart -->
45+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart">
46+
<argument name="product" value="$$createProduct$$"/>
47+
</actionGroup>
48+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckout"/>
49+
<!--Fill Shipping Address-->
50+
<actionGroup ref="FillGuestCheckoutShippingAddressFormActionGroup" stepKey="fillShippingAddress"/>
51+
<selectOption selector="{{CheckoutCartSummarySection.stateProvince}}" userInput="Texas" stepKey="fillState"/>
52+
<waitForPageLoad stepKey="waitForShippingPageToLoad"/>
53+
<!-- Click Next button -->
54+
<actionGroup ref="StorefrontGuestCheckoutProceedToPaymentStepActionGroup" stepKey="clickNext"/>
55+
<!-- Checkout select Credit Card (Payflow Pro) and place order-->
56+
<waitForPageLoad stepKey="waitForPaymentPageLoad"/>
57+
<conditionalClick selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Credit Card (Payflow Pro)')}}" dependentSelector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('Check / Money order')}}" visible="true" stepKey="selectCheckmoPaymentMethod"/>
58+
<waitForPageLoad stepKey="waitForLoadingMaskAfterPaymentMethodSelection"/>
59+
<!--Fill Card Data and place an order-->
60+
<actionGroup ref="StorefrontPaypalFillCardDataActionGroup" stepKey="fillCardDataPaypal">
61+
<argument name="cardData" value="VisaDefaultCard"/>
62+
</actionGroup>
63+
<waitForPageLoad stepKey="waitForFillCardData"/>
64+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="clickOnPlaceOrder"/>
65+
<!-- Grab order number-->
66+
<waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="waitForOrderNumberToBeGrabbed"/>
67+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/>
68+
<!--Go to Admin and check order information-->
69+
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGrid">
70+
<argument name="orderId" value="$grabOrderNumber"/>
71+
</actionGroup>
72+
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
73+
<!-- Cancel the Order -->
74+
<actionGroup ref="CancelPendingOrderActionGroup" stepKey="cancelOrder"/>
75+
<actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistory"/>
76+
<waitForText selector="{{AdminOrderCommentsTabSection.orderComments}}" userInput="Canceled order online Amount: $145.98." stepKey="seeOrderHistoryNotes"/>
77+
<!--Assert the authorization transaction is present in transaction grid-->
78+
<actionGroup ref="AdminAssertTransitionTypeStatusActionGroup" stepKey="assertTransactionTypeHasAuthorization">
79+
<argument name="transactionType" value="Authorization"/>
80+
</actionGroup>
81+
<!--Assert the authorization transaction is present in transaction grid-->
82+
<actionGroup ref="AdminAssertTransitionTypeStatusActionGroup" stepKey="assertTransactionTypeHasCapture">
83+
<argument name="transactionType" value="Void"/>
84+
</actionGroup>
85+
</test>
86+
</tests>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminAssertTransitionTypeStatusActionGroup" extends="AdminOpenTransactionsTabActionGroup">
12+
<annotations>
13+
<description>Click open Transactions Tab on the Order Details page and Check Transition Status</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="transitionTypeStatus" type="string" defaultValue="Yes"/>
17+
</arguments>
18+
<remove keyForRemoval="clickOnVoidTransaction"/>
19+
<remove keyForRemoval="clickFirstRow"/>
20+
<waitForText selector="{{AdminTransactionsGridSection.transitionStatus}}" userInput="{{transitionTypeStatus}}" stepKey="verifyTransitionTypeStatus" after="waitForFilterToLoad"/>
21+
</actionGroup>
22+
</actionGroups>

0 commit comments

Comments
 (0)