Skip to content

Commit 2670a3b

Browse files
committed
ACQE-6317:EnablePaypalExpressCheckoutandValidateTransferShippingOptionsWorksWithPayPalSmartButtonFlow
1 parent 488c103 commit 2670a3b

File tree

1 file changed

+111
-0
lines changed

1 file changed

+111
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
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="EnablePaypalExpressCheckoutandValidateTransferShippingOptionsWorksWithPayPalSmartButtonFlow">
10+
<annotations>
11+
<features value="PayPal"/>
12+
<stories value="Payment methods"/>
13+
<title value="Enable Paypal Express Checkout with Transfer Shipping Options and PalPal Smart Button Flow."/>
14+
<description value="Enable Paypal Express Checkout with Transfer Shipping Options and PalPal Smart Button Flow."/>
15+
<severity value="MAJOR"/>
16+
<testCaseId value="AC-5206"/>
17+
<group value="3rd_party_integration"/>
18+
</annotations>
19+
<before>
20+
<createData entity="SimpleProduct" stepKey="simpleProduct"/>
21+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
22+
<magentoCLI command="config:set {{StorefrontPaypalExpressOrderPaymentActionOptionConfigData.path}} {{StorefrontPaypalExpressOrderPaymentActionOptionConfigData.value}}" stepKey="setPaymentActionOrder"/>
23+
<magentoCLI command="config:set {{StorefrontPaypalEnableTransferCartLineConfigData.path}} {{StorefrontPaypalEnableTransferCartLineConfigData.value}}" stepKey="enableTransferCartLine"/>
24+
<magentoCLI command="config:set {{StorefrontPaypalEnableTransferShippingOptionConfigData.path}} {{StorefrontPaypalEnableTransferShippingOptionConfigData.value}}" stepKey="enableTransferShippingOption"/>
25+
<magentoCLI command="config:set {{StorefrontPaypalDisableSkipOrderReviewStepConfigData.path}} {{StorefrontPaypalDisableSkipOrderReviewStepConfigData.value}}" stepKey="disableSkipOrderReview"/>
26+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
27+
<!-- Enable flat rate method -->
28+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
29+
<actionGroup ref="AdminPayPalExpressCheckoutEnableActionGroup" stepKey="configPayPalExpress">
30+
<argument name="credentials" value="SamplePaypalExpressConfig2"/>
31+
</actionGroup>
32+
</before>
33+
34+
<after>
35+
<!-- Disable flat rate method -->
36+
<magentoCLI command="config:set {{DisableFlatRateConfigData.path}} {{DisableFlatRateConfigData.value}}" stepKey="disableFlatRate"/>
37+
<magentoCLI command="config:set {{StorefrontPaypalExpressAuthorizationPaymentActionOptionConfigData.path}} {{StorefrontPaypalExpressAuthorizationPaymentActionOptionConfigData.value}}" stepKey="setPaymentActionBackToAuthorization"/>
38+
<magentoCLI command="config:set {{StorefrontPaypalDisableTransferCartLineConfigData.path}} {{StorefrontPaypalDisableTransferCartLineConfigData.value}}" stepKey="disableTransferCartLine"/>
39+
<magentoCLI command="config:set {{StorefrontPaypalDisableTransferShippingOptionConfigData.path}} {{StorefrontPaypalDisableTransferShippingOptionConfigData.value}}" stepKey="disableTransferShippingOption"/>
40+
<magentoCLI command="config:set {{StorefrontPaypalEnableSkipOrderReviewStepConfigData.path}} {{StorefrontPaypalEnableSkipOrderReviewStepConfigData.value}}" stepKey="enableSkipOrderReview"/>
41+
42+
<magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/>
43+
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
44+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
45+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage"/>
46+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clickOnButtonToRemoveFiltersIfPresent"/>
47+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
48+
</after>
49+
50+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
51+
<argument name="indices" value=""/>
52+
</actionGroup>
53+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
54+
<argument name="tags" value="config full_page"/>
55+
</actionGroup>
56+
57+
<!--Go to storefront and add product to cart -->
58+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
59+
<argument name="Customer" value="$createCustomer$" />
60+
</actionGroup>
61+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="goToProductOnStorefront">
62+
<argument name="product" value="$$simpleProduct$$"/>
63+
</actionGroup>
64+
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addTheProductToCart">
65+
<argument name="productName" value="$simpleProduct.name$"/>
66+
</actionGroup>
67+
<actionGroup ref="OpenStoreFrontCheckoutShippingPageActionGroup" stepKey="goToCheckoutPage"/>
68+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatRate">
69+
<argument name="shippingMethodName" value="Flat Rate"/>
70+
</actionGroup>
71+
<!-- Go to Order review -->
72+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage"/>
73+
<waitForElementClickable selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('PayPal Express Checkout')}}" stepKey="waitForPayPalExpressCheckoutIsPresent"/>
74+
<click selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('PayPal Express Checkout')}}" stepKey="clickPayPalExpressCheckout"/>
75+
<waitForPageLoad stepKey="waitForPaypalExpressCheckoutToBeLoaded"/>
76+
<!-- Click on Paypal paypal button-->
77+
<actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtn"/>
78+
<!--Login to Paypal in-context-->
79+
<actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="loginToPayPal"/>
80+
<!--Transfer Cart Line and Shipping Method assertion-->
81+
<actionGroup ref="PayPalAssertTransferLineAndShippingMethodActionGroup" stepKey="assertPayPalSettings">
82+
<argument name="productName" value="$$createProduct.name$$"/>
83+
</actionGroup>
84+
<!--Click PayPal button and go back to Magento site-->
85+
<actionGroup ref="StorefrontPaypalSwitchBackToMagentoActionGroup" stepKey="goBackToMagentoSite"/>
86+
87+
<actionGroup ref="StorefrontSelectShippingMethodOnOrderReviewPageActionGroup" stepKey="selectShippingMethod"/>
88+
89+
<!--SubmitOrder-->
90+
<actionGroup ref="StorefrontPlaceOrderOnOrderReviewPageActionGroup" stepKey="clickPlaceOrderBtn"/>
91+
92+
<!-- I see order successful Page instead of Order Review Page -->
93+
<actionGroup ref="AssertStorefrontCheckoutSuccessActionGroup" stepKey="assertCheckoutSuccess"/>
94+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
95+
96+
<!--Go to Admin and check order information-->
97+
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGrid">
98+
<argument name="orderId" value="$grabOrderNumber"/>
99+
</actionGroup>
100+
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
101+
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="seeAdminOrderStatus">
102+
<argument name="status" value="Processing"/>
103+
</actionGroup>
104+
105+
<!--Create Invoice for this Order-->
106+
<actionGroup ref="StartCreateInvoiceFromOrderPageActionGroup" stepKey="createInvoice"/>
107+
<actionGroup ref="SubmitInvoiceActionGroup" stepKey="submitInvoice"/>
108+
<!--Open created Invoice-->
109+
<actionGroup ref="AdminOpenInvoiceFromOrderPageActionGroup" stepKey="openInvoiceFromOrder"/>
110+
</test>
111+
</tests>

0 commit comments

Comments
 (0)