Skip to content

Commit 4f35a2a

Browse files
Merge branch 'ACQE-6317' into ACQE-6355_mainline_PR_deployment
2 parents f4ede8b + dd87858 commit 4f35a2a

File tree

2 files changed

+133
-0
lines changed

2 files changed

+133
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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="AdminAuthorizeAnOrderActionGroup">
12+
<annotations>
13+
<description>Authorize the processing order on the Admin orders view page. Validates that the provided Order Status is present and correct.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="orderStatus" type="string" defaultValue="Processing"/>
17+
</arguments>
18+
<waitForElementClickable selector="{{AdminOrderDetailsMainActionsSection.authorize}}" stepKey="waitForAuthorizeButtonToBeClickable"/>
19+
<click selector="{{AdminOrderDetailsMainActionsSection.authorize}}" stepKey="clickAuthorizeButton"/>
20+
<waitForText selector="{{AdminConfirmationModalSection.message}}" userInput="Are you sure you want to authorize full order amount?" stepKey="seeConfirmationMessage"/>
21+
<waitForElementClickable selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForOkayButtonToAppear"/>
22+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmOrder"/>
23+
<waitForText selector="{{AdminMessagesSection.success}}" userInput="Payment authorization has been successfully created." stepKey="seeAuthorizedSuccessMessage"/>
24+
<waitForText selector="{{AdminOrderDetailsInformationSection.orderStatus}}" userInput="{{orderStatus}}" stepKey="seeOrderStatus"/>
25+
</actionGroup>
26+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
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="EnablePaypalExpressCheckoutandValidateTransferShippingOptionsWorksWithPayPalSmartButtonFlowTest">
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-4462"/>
17+
<group value="3rd_party_integration"/>
18+
<group value="pr_exclude" />
19+
</annotations>
20+
<before>
21+
<createData entity="SimpleProduct" stepKey="simpleProduct"/>
22+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
23+
<magentoCLI command="config:set {{StorefrontPaypalExpressOrderPaymentActionOptionConfigData.path}} {{StorefrontPaypalExpressOrderPaymentActionOptionConfigData.value}}" stepKey="setPaymentActionOrder"/>
24+
<magentoCLI command="config:set {{StorefrontPaypalEnableTransferCartLineConfigData.path}} {{StorefrontPaypalEnableTransferCartLineConfigData.value}}" stepKey="enableTransferCartLine"/>
25+
<magentoCLI command="config:set {{StorefrontPaypalEnableTransferShippingOptionConfigData.path}} {{StorefrontPaypalEnableTransferShippingOptionConfigData.value}}" stepKey="enableTransferShippingOption"/>
26+
<magentoCLI command="config:set {{StorefrontPaypalDisableSkipOrderReviewStepConfigData.path}} {{StorefrontPaypalDisableSkipOrderReviewStepConfigData.value}}" stepKey="disableSkipOrderReview"/>
27+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
28+
<actionGroup ref="AdminPayPalExpressCheckoutEnableActionGroup" stepKey="configPayPalExpress">
29+
<argument name="credentials" value="SamplePaypalExpressConfig2"/>
30+
</actionGroup>
31+
</before>
32+
33+
<after>
34+
<magentoCLI command="config:set {{StorefrontPaypalExpressAuthorizationPaymentActionOptionConfigData.path}} {{StorefrontPaypalExpressAuthorizationPaymentActionOptionConfigData.value}}" stepKey="setPaymentActionBackToAuthorization"/>
35+
<magentoCLI command="config:set {{StorefrontPaypalDisableTransferCartLineConfigData.path}} {{StorefrontPaypalDisableTransferCartLineConfigData.value}}" stepKey="disableTransferCartLine"/>
36+
<magentoCLI command="config:set {{StorefrontPaypalDisableTransferShippingOptionConfigData.path}} {{StorefrontPaypalDisableTransferShippingOptionConfigData.value}}" stepKey="disableTransferShippingOption"/>
37+
<magentoCLI command="config:set {{StorefrontPaypalEnableSkipOrderReviewStepConfigData.path}} {{StorefrontPaypalEnableSkipOrderReviewStepConfigData.value}}" stepKey="enableSkipOrderReview"/>
38+
39+
<magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/>
40+
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
41+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
42+
43+
<actionGroup ref="AdminOrdersPageOpenActionGroup" stepKey="navigateToSalesOrderPage"/>
44+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clickOnButtonToRemoveFiltersIfPresent"/>
45+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
46+
</after>
47+
48+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
49+
<argument name="indices" value=""/>
50+
</actionGroup>
51+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanCache">
52+
<argument name="tags" value="config full_page"/>
53+
</actionGroup>
54+
55+
<!--Go to storefront and add product to cart -->
56+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
57+
<argument name="Customer" value="$createCustomer$" />
58+
</actionGroup>
59+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="goToProductOnStorefront">
60+
<argument name="product" value="$$simpleProduct$$"/>
61+
</actionGroup>
62+
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addTheProductToCart">
63+
<argument name="productName" value="$simpleProduct.name$"/>
64+
</actionGroup>
65+
<actionGroup ref="OpenStoreFrontCheckoutShippingPageActionGroup" stepKey="goToCheckoutPage"/>
66+
<actionGroup ref="StorefrontSetShippingMethodActionGroup" stepKey="selectFlatRate">
67+
<argument name="shippingMethodName" value="Flat Rate"/>
68+
</actionGroup>
69+
<!-- Go to Order review -->
70+
<actionGroup ref="StorefrontCheckoutClickNextOnShippingStepActionGroup" stepKey="goToCheckoutPaymentPage"/>
71+
<waitForElementClickable selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('PayPal Express Checkout')}}" stepKey="waitForPayPalExpressCheckoutIsPresent"/>
72+
<click selector="{{StorefrontCheckoutPaymentMethodSection.checkPaymentMethodByName('PayPal Express Checkout')}}" stepKey="clickPayPalExpressCheckout"/>
73+
<waitForPageLoad stepKey="waitForPaypalExpressCheckoutToBeLoaded"/>
74+
<!-- Click on Paypal paypal button-->
75+
<actionGroup ref="SwitchToPayPalGroupBtnActionGroup" stepKey="clickPayPalBtn"/>
76+
<!--Login to Paypal in-context-->
77+
<actionGroup ref="StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup" stepKey="loginToPayPal"/>
78+
79+
<!--Click PayPal button and go back to Magento site-->
80+
<actionGroup ref="StorefrontPaypalSwitchBackToMagentoFromCheckoutPageActionGroup" stepKey="goBackToMagentoSite"/>
81+
<actionGroup ref="StorefrontSelectShippingMethodOnOrderReviewPageActionGroup" stepKey="selectShippingMethod"/>
82+
83+
<!--SubmitOrder-->
84+
<actionGroup ref="StorefrontPlaceOrderOnOrderReviewPageActionGroup" stepKey="clickPlaceOrderBtn"/>
85+
86+
<!-- I see order successful Page instead of Order Review Page -->
87+
<actionGroup ref="AssertStorefrontCheckoutSuccessActionGroup" stepKey="assertCheckoutSuccess"/>
88+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
89+
90+
<!--Go to Admin and check order information-->
91+
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGrid">
92+
<argument name="orderId" value="$grabOrderNumber"/>
93+
</actionGroup>
94+
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
95+
<actionGroup ref="AdminOrderViewCheckStatusActionGroup" stepKey="seeAdminOrderStatus">
96+
<argument name="status" value="Processing"/>
97+
</actionGroup>
98+
<!--Authorize the order-->
99+
<actionGroup ref="AdminAuthorizeAnOrderActionGroup" stepKey="authorizeTheOrder"/>
100+
<!--Create Invoice for this Order-->
101+
<actionGroup ref="StartCreateInvoiceFromOrderPageActionGroup" stepKey="createInvoice"/>
102+
<actionGroup ref="SubmitInvoiceActionGroup" stepKey="submitInvoice"/>
103+
104+
<!--Open created Invoice-->
105+
<actionGroup ref="AdminOpenInvoiceFromOrderPageActionGroup" stepKey="openInvoiceFromOrder"/>
106+
</test>
107+
</tests>

0 commit comments

Comments
 (0)