Skip to content

Commit 52760bc

Browse files
Merge branch 'ACQE-6368' into ACQE-6779_mainline_PR_deployment
2 parents c3030f4 + d12e8b1 commit 52760bc

File tree

6 files changed

+149
-0
lines changed

6 files changed

+149
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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="StorefrontLoginToPayPalStandardActionGroup" extends="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup">
12+
<annotations>
13+
<description>Remove click next btn in the action group StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup</description>
14+
</annotations>
15+
<remove keyForRemoval="clickNext"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
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="AdminCreateRefundOrderPaidWithPayPalStandardTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Payment methods"/>
14+
<title value="Create Refund for Order Paid with PayPal Payments Standard"/>
15+
<description value="Create Refund for Order Paid with PayPal Payments Standard"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="AC-5410"/>
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_Customer" stepKey="createCustomer"/>
31+
</before>
32+
<after>
33+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
34+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
35+
<!-- Logout-->
36+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
37+
</after>
38+
<!-- Navigate to StoreFront -->
39+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/>
40+
<!-- Add product to cart -->
41+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addProductToCart">
42+
<argument name="product" value="$$createProduct$$"/>
43+
</actionGroup>
44+
<actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="goToCheckout"/>
45+
<!--Fill Shipping Address-->
46+
<actionGroup ref="FillGuestCheckoutShippingAddressFormActionGroup" stepKey="fillShippingAddress"/>
47+
<selectOption selector="{{CheckoutCartSummarySection.stateProvince}}" userInput="Texas" stepKey="fillState"/>
48+
<waitForPageLoad stepKey="waitForShippingPageToLoad"/>
49+
<!-- Click Next button -->
50+
<actionGroup ref="StorefrontGuestCheckoutProceedToPaymentStepActionGroup" stepKey="clickNext"/>
51+
<!-- Click on PayPal payment radio button and click on continue btn -->
52+
<actionGroup ref="AdminSelectPaypalStandardPaymentInPaymentPageActionGroup" stepKey="selectPaypalStandardPaymentAndClickOnContinuebtn"/>
53+
<!-- Login to Paypal in-context and verify order total on paypal page-->
54+
<actionGroup ref="StorefrontLoginToPayPalStandardActionGroup" stepKey="loginToPayPal"/>
55+
<actionGroup ref="StorefrontPaypalSwitchBackToMagentoFromCheckoutPageActionGroup" stepKey="confirmPaymentAndGoBackToMagento"/>
56+
<waitForElementVisible selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="waitForOrderNumberToBeGrabbed"/>
57+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber}}" stepKey="grabOrderNumber"/>
58+
<!-- Go to order page -->
59+
<actionGroup ref="OpenOrderByIdActionGroup" stepKey="openFirstOrderPage">
60+
<argument name="orderId" value="{$grabOrderNumber}"/>
61+
</actionGroup>
62+
<!--Create Invoice for this Order-->
63+
<actionGroup ref="StartCreateInvoiceFromOrderPageActionGroup" stepKey="createInvoice"/>
64+
<actionGroup ref="SubmitInvoiceActionGroup" stepKey="submitInvoice"/>
65+
<!-- Click 'Credit Memo'-->
66+
<actionGroup ref="AdminClickOkbtnToProceedWithRefundActionGroup" stepKey="fillCreditMemoRefund">
67+
<argument name="shippingRefund" value="5"/>
68+
</actionGroup>
69+
<scrollTo selector="{{AdminCreditMemoItemsSection.refundbtn}}" stepKey="scrollToItemsToRefund"/>
70+
<waitForElementVisible selector="{{AdminCreditMemoItemsSection.refundbtn}}" stepKey="waitForSuccesMessagea"/>
71+
<click selector="{{AdminCreditMemoItemsSection.refundbtn}}" stepKey="clickRefundOffline"/>
72+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccesMessage"/>
73+
<!-- Check order status -->
74+
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="seeAdminOrderStatus">
75+
<argument name="status" value="Closed"/>
76+
</actionGroup>
77+
<actionGroup ref="AdminOpenOrderCommentsHistoryActionGroup" stepKey="clickOnCommentsHistory"/>
78+
<waitForText selector="{{AdminOrderCommentsTabSection.orderComments}}" userInput="We refunded $145.98 offline." stepKey="seeOrderHistoryNotes"/>
79+
<!--Assert the authorization transaction is present in transaction grid-->
80+
<actionGroup ref="AdminAssertTransitionTypeStatusActionGroup" stepKey="assertTransactionTypeHasAuthorization">
81+
<argument name="transactionType" value="authorization"/>
82+
</actionGroup>
83+
<!--Assert the authorization transaction is present in transaction grid-->
84+
<actionGroup ref="AdminAssertTransitionTypeStatusActionGroup" stepKey="assertTransactionTypeHasCapture">
85+
<argument name="transactionType" value="capture"/>
86+
<argument name="transitionTypeStatus" value="No"/>
87+
</actionGroup>
88+
</test>
89+
</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>Admin assert transition type status under sales</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.transitionsStatus('is_closed')}}" userInput="{{transitionTypeStatus}}" stepKey="verifyTransitionTypeStatus" after="waitForFilterToLoad"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="AdminClickOkbtnToProceedWithRefundActionGroup" extends="AdminOpenAndFillCreditMemoRefundActionGroup">
12+
<annotations>
13+
<description>Admin Click Ok btn to proceed with refund</description>
14+
</annotations>
15+
<waitForElementClickable selector="{{AdminCreditMemoItemsSection.clickOkbtn}}" stepKey="waitForOkbtn" after="clickCreateCreditMemo"/>
16+
<click selector="{{AdminCreditMemoItemsSection.clickOkbtn}}" stepKey="clickOnOkbtnToProceedWithRefund" before="seeNewCreditMemoPage"/>
17+
</actionGroup>
18+
</actionGroups>

app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoItemsSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,7 @@
2525
<element name="nameColumn" type="text" selector=".order-creditmemo-tables .product-title"/>
2626
<element name="skuColumn" type="text" selector=".order-creditmemo-tables .product-sku-block"/>
2727
<element name="childItemQtyToRefund" type="input" selector=".order-creditmemo-tables tr:nth-child({{row}}) td .qty-input" parameterized="true"/>
28+
<element name="clickOkbtn" type="button" selector="//button[@class='action-primary action-accept']"/>
29+
<element name="refundbtn" type="button" selector="//button[@title='Refund Offline']"/>
2830
</section>
2931
</sections>

app/code/Magento/Sales/Test/Mftf/Section/AdminTransactionsGridSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
<element name="orderTxnTableSearchBtn" type="button" selector="#container button[title='Search']" />
1818
<element name="transactionData" type="text" selector="//th[text()='{{transactionData}}']/following-sibling::td" parameterized="true"/>
1919
<element name="transitionStatus" type="text" selector="//div[@class='admin__data-grid-wrap admin__data-grid-wrap-static']" />
20+
<element name="transitionsStatus" type="text" selector="//tr[@data-role='row']//td[@data-column='{{transactionStatus}}']" parameterized="true" />
2021
</section>
2122
</sections>

0 commit comments

Comments
 (0)