Skip to content

Commit 67da316

Browse files
shanthishanthi
authored andcommitted
ACQE-4207:Splitted from ACQE-4290
1 parent 83b7f30 commit 67da316

File tree

2 files changed

+78
-2
lines changed

2 files changed

+78
-2
lines changed

app/code/Magento/Paypal/Test/Mftf/ActionGroup/StorefrontLoginToPayPalPaymentAccountTwoStepActionGroup.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@
1919
<conditionalClick selector="{{PayPalPaymentSection.existingAccountLoginBtn}}" dependentSelector="{{PayPalPaymentSection.existingAccountLoginBtn}}" visible="true" stepKey="skipAccountCreationAndLogin"/>
2020
<waitForPageLoad stepKey="waitForLoginPageLoad"/>
2121
<waitForElement selector="{{PayPalPaymentSection.email}}" stepKey="waitForLoginForm" />
22-
<fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/paypal_sandbox_login_email}}" stepKey="fillEmail"/>
22+
<fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/PAYPAL_LOGIN}}" stepKey="fillEmail"/>
2323
<click selector="{{PayPalPaymentSection.nextButton}}" stepKey="clickNext"/>
2424
<waitForElementVisible selector="{{PayPalPaymentSection.password}}" stepKey="waitForPasswordField"/>
2525
<click selector="{{PayPalPaymentSection.password}}" stepKey="focusOnPasswordField"/>
26-
<fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/paypal_sandbox_login_password}}" stepKey="fillPassword"/>
26+
<fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/PAYPAL_PWD}}" stepKey="fillPassword"/>
2727
<click selector="{{PayPalPaymentSection.loginBtn}}" stepKey="login"/>
2828
<waitForPageLoad stepKey="wait"/>
2929
</actionGroup>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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="EnablePaypalExpressCheckoutAndSubmitAnOrderUsingPaypalExpressCheckoutTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Enable paypal express checkout and validate the customer checkout payment works with paypal express"/>
14+
<title value="Enable paypal express checkout and validate the customer checkout payment works with paypal express"/>
15+
<description value="Enable paypal express checkout and validate the customer checkout payment works with paypal express"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="AC-6951"/>
18+
</annotations>
19+
<before>
20+
<!--Enable free shipping method -->
21+
<magentoCLI command="config:set {{EnableFreeShippingConfigData.path}} {{EnableFreeShippingConfigData.value}}" stepKey="enableFreeShipping"/>
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 {{DisableFreeShippingConfigData.path}} {{DisableFreeShippingConfigData.value}}" stepKey="disableFreeShipping"/>
37+
<magentoCLI command="config:set paypal/general/merchant_country US" stepKey="setMerchantCountry"/>
38+
<magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/>
39+
<magentoCLI command="config:set payment/wps_express/active 0" stepKey="disableWPSExpress"/>
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+
<argument name="shippingMethod" value="Free - $0.00"/>
64+
</actionGroup>
65+
<actionGroup ref="StorefrontPlaceOrderOnOrderReviewPageActionGroup" stepKey="clickPlaceOrderBtn"/>
66+
<!-- I see order successful Page instead of Order Review Page -->
67+
<actionGroup ref="AssertStorefrontCheckoutSuccessActionGroup" stepKey="assertCheckoutSuccess"/>
68+
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
69+
<!--Go to Admin and check order information-->
70+
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderGrid">
71+
<argument name="orderId" value="$grabOrderNumber"/>
72+
</actionGroup>
73+
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
74+
<actionGroup ref="CancelPendingOrderActionGroup" stepKey="cancelOrder"/>
75+
</test>
76+
</tests>

0 commit comments

Comments
 (0)