Skip to content

Commit 8a04fd6

Browse files
committed
MC-16375: Unable to pay with Braintree Paypal (Payment Action = Authorize and Capture) for Gift Card as Guest
- Added automated test script
1 parent f66a713 commit 8a04fd6

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="LoginToPayPalPaymentAccount">
11+
<arguments>
12+
<argument name="userName" type="string" defaultValue="{{Payer.buyerEmail}}"/>
13+
<argument name="password" type="string" defaultValue="{{Payer.buyerPassword}"/>
14+
</arguments>
15+
<fillField selector="{{PayPalPaymentSection.email}}" userInput="{{userName}}" stepKey="fillEmail"/>
16+
<click selector="{{PayPalPaymentSection.nextButton}}" stepKey="clickNext"/>
17+
<waitForElementVisible selector="{{PayPalPaymentSection.password}}" stepKey="waitForPasswordField"/>
18+
<fillField selector="{{PayPalPaymentSection.password}}" userInput="{{password}}" stepKey="fillPassword"/>
19+
<click selector="{{PayPalPaymentSection.loginBtn}}" stepKey="clickLogin"/>
20+
<waitForPageLoad stepKey="waitForLoginPageLoad"/>
21+
<click selector="{{PayPalPaymentSection.continueButton}}" stepKey="clickContinue"/>
22+
</actionGroup>
23+
</actionGroups>

app/code/Magento/Paypal/Test/Mftf/Section/PayPalExpressCheckoutConfigSection.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545
<element name="color" type="text" selector=".paypal-button-color-{{color}}" parameterized="true"/>
4646
</section>
4747
<section name="CheckoutPaymentSection">
48+
<element name="email" type="input" selector="#checkout-customer-email"/>
49+
<element name="payPalPaymentBraintree" type="radio" selector="#braintree_paypal"/>
50+
<element name="payPalFrame" type="iframe" selector="//iframe[contains(@class, 'zoid-component-frame zoid-visible')]" timeout="5"/>
4851
<element name="PayPalPaymentRadio" type="radio" selector="input#paypal_express.radio" timeout="30"/>
4952
<element name="PayPalBtn" type="radio" selector=".paypal-button.paypal-button-number-0" timeout="30"/>
5053
</section>
@@ -58,5 +61,7 @@
5861
<element name="cartIcon" type="text" selector="#transactionCart"/>
5962
<element name="itemName" type="text" selector="//span[@title='{{productName}}']" parameterized="true"/>
6063
<element name="PayPalSubmitBtn" type="text" selector="//input[@type='submit']"/>
64+
<element name="nextButton" type="button" selector="#btnNext"/>
65+
<element name="continueButton" type="button" selector=".continueButton"/>
6166
</section>
62-
</sections>
67+
</sections>

0 commit comments

Comments
 (0)