Skip to content

Commit 6cf7df6

Browse files
“Pavan-bj” “Pavan-bj” 
authored andcommitted
ACQE-6573 : [AC-3928] Transfer Cart Line Items should work with flow of PayPal Smart Button
1 parent 7cabfb4 commit 6cf7df6

File tree

2 files changed

+82
-0
lines changed

2 files changed

+82
-0
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
9+
<test name="StorefrontCheckPayPalSmartButtonWithTransferCartLineItemTest">
10+
<annotations>
11+
<features value="PayPal"/>
12+
<stories value="Payment methods"/>
13+
<title value="Enable Paypal Express Checkout with Transfer Cart Line Item and PalPal Smart Button Flow."/>
14+
<description value="Enable Paypal Express Checkout with Transfer Cart Line item and PalPal Smart Button Flow."/>
15+
<severity value="MAJOR"/>
16+
<testCaseId value="AC-3928"/>
17+
<group value="3rd_party_integration"/>
18+
<!-- <group value="paypalExpress"/>-->
19+
<!-- <group value="pr_exclude" />-->
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
<!-- New Customer -->
24+
<createData entity="Simple_US_Customer" stepKey="createCustomer">
25+
<field key="firstname">John1</field>
26+
<field key="lastname">Doe1</field>
27+
</createData>
28+
<createData entity="SimpleProduct2" stepKey="simpleProduct">
29+
<field key="price">1</field>
30+
</createData>
31+
<actionGroup ref="AdminPayPalExpressCheckoutEnableActionGroup" stepKey="ConfigPayPalExpress">
32+
<argument name="credentials" value="SamplePaypalExpressConfig2"/>
33+
</actionGroup>
34+
</before>
35+
<after>
36+
<magentoCLI command="config:set paypal/general/merchant_country US" stepKey="setMerchantCountry"/>
37+
<magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/>
38+
<magentoCLI command="config:set payment/wps_express/active 0" stepKey="disableWPSExpress"/>
39+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer" />
40+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
41+
<deleteData createDataKey="simpleProduct" stepKey="deleteSimpleProduct"/>
42+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
43+
</after>
44+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="signUpNewUser">
45+
<argument name="Customer" value="$$createCustomer$$"/>
46+
</actionGroup>
47+
<actionGroup ref="AddSimpleProductToCartActionGroup" stepKey="addSimpleProductToCart">
48+
<argument name="product" value="$simpleProduct$"/>
49+
</actionGroup>
50+
<!--Go to cart page-->
51+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="gotoCart"/>
52+
<!-- Click on Paypal paypal button-->
53+
<actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtn">
54+
<argument name="elementNumber" value="1"/>
55+
</actionGroup>
56+
<!--Login to Paypal in-context-->
57+
<actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="LoginToPayPal"/>
58+
<!--Transfer Cart Line and Shipping Method assertion-->
59+
<actionGroup ref="PayPalAssertTransferLineAndShippingMethodNotExistActionGroup" stepKey="assertPayPalSettings"/>
60+
<!--Click PayPal button and go back to Magento site-->
61+
<actionGroup ref="StorefrontPaypalSwitchBackToMagentoFromCheckoutPageActionGroup" stepKey="goBackToMagentoSite"/>
62+
<actionGroup ref="StorefrontSelectShippingMethodOnOrderReviewPageActionGroup" stepKey="selectShippingMethod"/>
63+
<actionGroup ref="StorefrontPlaceOrderOnOrderReviewPageActionGroup" stepKey="clickPlaceOrderBtn"/>
64+
<!-- I see order successful Page instead of Order Review Page -->
65+
<actionGroup ref="AssertStorefrontCheckoutSuccessActionGroup" stepKey="assertCheckoutSuccess"/>
66+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
67+
<!--Go to Admin and check order information-->
68+
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGrid">
69+
<argument name="orderId" value="$grabOrderNumber"/>
70+
</actionGroup>
71+
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
72+
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="seeAdminOrderStatus">
73+
<argument name="status" value="Processing"/>
74+
</actionGroup>
75+
<!--Open Invoice-->
76+
<waitForElementClickable selector="{{AdminOrderDetailsOrderViewSection.invoices}}" stepKey="waitForInvoicesTabClickable" />
77+
<click selector="{{AdminOrderDetailsOrderViewSection.invoices}}" stepKey="openInvoicesTab"/>
78+
<!--Check Invoice Section -->
79+
<waitForElementVisible selector="{{AdminOrderDetailsMainActionsSection.invoiceTabContent1}}" stepKey="waitForInvoiceSectionContentToBeAppeared"/>
80+
</test>
81+
</tests>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
<element name="authorize" type="button" selector="#order_authorize"/>
3030
<element name="ok" type="button" selector=".//*[@data-role='action']"/>
3131
<element name="void" type="button" selector="#void_payment span"/>
32+
<element name="invoiceTabContent1" type="text" selector="#sales_order_view_tabs_order_invoices_content > div > div.admin__data-grid-wrap > table > tbody > tr > td"/>
3233
</section>
3334
</sections>

0 commit comments

Comments
 (0)