Skip to content

Commit 5d2a304

Browse files
Merge branch 'ACQE-5771_1' into ACQE-6650_mainline_PR_deployment
2 parents 7349906 + 983a9e3 commit 5d2a304

11 files changed

+280
-0
lines changed

app/code/Magento/Customer/Test/Mftf/Data/AddressData.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,4 +528,18 @@
528528
<data key="default_shipping">Yes</data>
529529
<requiredEntity type="region">RegionCA</requiredEntity>
530530
</entity>
531+
<entity name="US_Address_California_Madison">
532+
<data key="firstname">John</data>
533+
<data key="lastname">Doe</data>
534+
<data key="company">Magento</data>
535+
<array key="street">
536+
<item>4145 Madison Ave</item>
537+
</array>
538+
<data key="city">Culver City</data>
539+
<data key="country_id">US</data>
540+
<data key="country">United States</data>
541+
<data key="state">California</data>
542+
<data key="postcode">90232</data>
543+
<data key="telephone">555-55-555-55</data>
544+
</entity>
531545
</entities>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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="AdminDisablePayPalPayFlowLinkActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Configuration' page for 'Payment Methods'. Disables PayPal payflow link solution. Clicks on Save.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="countryCode" type="string" defaultValue="us"/>
17+
</arguments>
18+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
19+
<waitForPageLoad stepKey="waitForPageLoad1"/>
20+
<scrollTo selector="{{AdminPayPalPayFlowLinkConfigSection.paymentGateway(countryCode)}}" stepKey="scrollToConfigure"/>
21+
<waitForElementVisible selector="{{AdminPayPalPayFlowLinkConfigSection.configureBtn(countryCode)}}" stepKey="waitForPayPalPayFlowPaymentConfigureBtn"/>
22+
<conditionalClick selector ="{{AdminPayPalPayFlowLinkConfigSection.configureBtn(countryCode)}}" dependentSelector="{{AdminPayPalPayFlowLinkConfigSection.configureBtn(countryCode)}}" visible="true" stepKey="clickPayPalPayFlowPaymentConfigureBtn"/>
23+
<waitForElementClickable selector ="{{AdminPayPalPayFlowLinkConfigSection.enableSolution(countryCode)}}" stepKey="waitForSolutionFieldToBeClickable"/>
24+
<selectOption selector ="{{AdminPayPalPayFlowLinkConfigSection.enableSolution(countryCode)}}" userInput="No" stepKey="disableSolution"/>
25+
<waitForElementClickable selector ="{{AdminConfigSection.saveButton}}" stepKey="waitForSaveConfigToBeVisible"/>
26+
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
27+
<waitForPageLoad stepKey="waitForSaving"/>
28+
</actionGroup>
29+
</actionGroups>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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="AdminEnablePayPalPayFlowLinkActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Configuration' page for 'Payment Methods'. Fills in the provided Sample PayPal Payflow link credentials and other details. Clicks on Save.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="credentials" defaultValue="SamplePaypalPaymentsFlowLinkConfig"/>
17+
<argument name="countryCode" type="string" defaultValue="us"/>
18+
</arguments>
19+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
20+
<waitForPageLoad stepKey="waitForConfigPageLoad"/>
21+
<conditionalClick selector="{{OtherPayPalPaymentsConfigSection.expandTab1(countryCode)}}" dependentSelector="{{OtherPayPalPaymentsConfigSection.expandedTab(countryCode)}}" visible="false" stepKey="clickOtherPayPalPaymentsSection"/>
22+
<conditionalClick selector ="{{OtherPayPalPaymentsConfigSection.expandTabNew(countryCode)}}" dependentSelector="{{OtherPayPalPaymentsConfigSection.expandedTabNew(countryCode)}}" visible="false" stepKey="expandPaypalPaymentGatewaysConfigButton"/>
23+
<scrollTo selector="{{AdminPayPalPayFlowLinkConfigSection.paymentGateway(countryCode)}}" stepKey="scrollToConfigure"/>
24+
<conditionalClick selector ="{{AdminPayPalPayFlowLinkConfigSection.configureBtn(countryCode)}}" dependentSelector="{{AdminPayPalPayFlowLinkConfigSection.configureBtn(countryCode)}}" visible="true" stepKey="clickPayPalPayflowPaymentConfigureBtn"/>
25+
<waitForElementVisible selector ="{{AdminPayPalPayFlowLinkConfigSection.partner(countryCode)}}" stepKey="waitForPartnerFieldToBeVisible"/>
26+
<fillField selector ="{{AdminPayPalPayFlowLinkConfigSection.partner(countryCode)}}" userInput="{{credentials.paypal_paymentsflowlink_partner}}" stepKey="inputPartner"/>
27+
<waitForElementVisible selector ="{{AdminPayPalPayFlowLinkConfigSection.user(countryCode)}}" stepKey="waitForUserFieldToBeVisible"/>
28+
<fillField selector ="{{AdminPayPalPayFlowLinkConfigSection.user(countryCode)}}" userInput="{{credentials.paypal_paymentsflowlink_user}}" stepKey="inputUser"/>
29+
<waitForElementVisible selector ="{{AdminPayPalPayFlowLinkConfigSection.vendor(countryCode)}}" stepKey="waitForvendorFieldToBeVisible"/>
30+
<fillField selector ="{{AdminPayPalPayFlowLinkConfigSection.vendor(countryCode)}}" userInput="{{credentials.paypal_paymentsflowlink_vendor}}" stepKey="inputVendor"/>
31+
<waitForElementVisible selector ="{{AdminPayPalPayFlowLinkConfigSection.password(countryCode)}}" stepKey="waitForpasswordFieldToBeVisible"/>
32+
<fillField selector ="{{AdminPayPalPayFlowLinkConfigSection.password(countryCode)}}" userInput="{{credentials.paypal_paymentsflowlink_password}}" stepKey="inputPassword"/>
33+
<waitForElementClickable selector ="{{AdminPayPalPayFlowLinkConfigSection.testMode(countryCode)}}" stepKey="waitFortestModeFieldToBeClickable"/>
34+
<selectOption selector="{{AdminPayPalPayFlowLinkConfigSection.testMode(countryCode)}}" userInput="Yes" stepKey="enableTestMode"/>
35+
<waitForElementClickable selector ="{{AdminPayPalPayFlowLinkConfigSection.enableSolution(countryCode)}}" stepKey="waitForSolutionFieldToBeClickable"/>
36+
<selectOption selector ="{{AdminPayPalPayFlowLinkConfigSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/>
37+
<waitForElementClickable selector ="{{AdminConfigSection.saveButton}}" stepKey="waitForSaveConfigToBeVisible"/>
38+
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
39+
<waitForPageLoad stepKey="waitForSaving"/>
40+
<waitForText selector="{{AdminMessagesSection.success}}" userInput="You saved the configuration." stepKey="seeSuccess"/>
41+
</actionGroup>
42+
</actionGroups>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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="AssertStorefrontOrderDetailsOnPayPalPageActionGroup">
11+
<annotations>
12+
<description>On PayPal page asserts order amount and shipping details .</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="subtotalAmount" type="string" defaultValue="$10.00"/>
16+
<argument name="shippingAmount" type="string" defaultValue="$5.00"/>
17+
<argument name="totalAmount" type="string" defaultValue="$15.00"/>
18+
<argument name="shippingAddress" type="string" defaultValue="4145 Madison Ave, Culver City, CA 90232"/>
19+
</arguments>
20+
<waitForElementClickable selector="{{PayPalPaymentSection.orderTotalOnPaypalCheckout}}" stepKey="waitForAmountButtonToBeClickable"/>
21+
<click selector="{{PayPalPaymentSection.orderTotalOnPaypalCheckout}}" stepKey="clickAmountToOpen"/>
22+
<waitForElementVisible selector="{{PayPalPaymentSection.subtotal(subtotalAmount)}}" stepKey="assertSubtotal"/>
23+
<waitForElementVisible selector="{{PayPalPaymentSection.shipping(shippingAmount)}}" stepKey="assertShipping"/>
24+
<waitForText selector="{{PayPalPaymentSection.total}}" userInput="{{totalAmount}}" stepKey="assertTotal"/>
25+
<waitForElementClickable selector="{{PayPalPaymentSection.close}}" stepKey="waitForCLoseButtonToBeClickable"/>
26+
<click selector="{{PayPalPaymentSection.close}}" stepKey="clickCloseButton"/>
27+
<waitForText selector="{{PayPalPaymentSection.shippingAddress}}" userInput="{{shippingAddress}}" stepKey="assertShippingAddress"/>
28+
</actionGroup>
29+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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="StorefrontLoginToPayPalExpressCheckoutPayFlowEditionActionGroup">
11+
<annotations>
12+
<description>On Storefront Login To PayPal Express Checkout Payflow Edition .</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="credentials" defaultValue="_CREDS"/>
16+
</arguments>
17+
<!--Check in-context-->
18+
<switchToNextTab stepKey="switchToInContentTab"/>
19+
<waitForPageLoad stepKey="waitForPayPalPageToLoad"/>
20+
<waitForElementVisible selector="{{PayPalPaymentSection.email}}" stepKey="waitForEmailField" />
21+
<fillField selector="{{PayPalPaymentSection.email}}" userInput="{{credentials.magento/PAYPAL_LOGIN}}" stepKey="fillEmail"/>
22+
<waitForElementVisible selector="{{PayPalPaymentSection.password}}" stepKey="waitForPasswordFieldToBeVisible" />
23+
<fillField selector="{{PayPalPaymentSection.password}}" userInput="{{credentials.magento/PAYPAL_PWD}}" stepKey="fillPassword"/>
24+
<waitForElementClickable selector="{{PayPalPaymentSection.loginBtn}}" stepKey="waitForLoginField"/>
25+
<click selector="{{PayPalPaymentSection.loginBtn}}" stepKey="login"/>
26+
<waitForPageLoad stepKey="waitForDetailsPageToOpen"/>
27+
</actionGroup>
28+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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="StorefrontSelectPayPalExpressCheckoutPayFlowEditionActionGroup">
11+
<annotations>
12+
<description>Select PayPal Express Checkout PayFlow Edition On Payments page.</description>
13+
</annotations>
14+
15+
<waitForElementClickable selector="{{CheckoutPaymentSection.PayPalExpressCheckoutPayFlowEdition}}" stepKey="waitForPayPalRadioButton"/>
16+
<click selector="{{CheckoutPaymentSection.PayPalExpressCheckoutPayFlowEdition}}" stepKey="selectPayPalExpressCheckoutPayFlowEdition"/>
17+
<waitForElementClickable selector="{{CheckoutPaymentSection.continueButton}}" stepKey="waitForContinueButtonToBeVisible"/>
18+
<click selector="{{CheckoutPaymentSection.continueButton}}" stepKey="clickContinueButton"/>
19+
<waitForPageLoad stepKey="waitForPayPalPageToOpen"/>
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,13 @@
229229
<data key="paypal_paymentspro_vendor">MksGLTest</data>
230230
<data key="paypal_paymentspro_password">Abcd@123</data>
231231
</entity>
232+
<entity name="SamplePaypalPaymentsFlowLinkConfig" type="paypal_payment_flow_Link_config">
233+
<data key="paypal_paymentsflowlink_businessacct">us_m2_biz@ebay.com</data>
234+
<data key="paypal_paymentsflowlink_partner">PayPal</data>
235+
<data key="paypal_paymentsflowlink_user">mpilink</data>
236+
<data key="paypal_paymentsflowlink_vendor">mpilink</data>
237+
<data key="paypal_paymentsflowlink_password">1234_1234L!</data>
238+
</entity>
232239
<entity name="validCreditCard" type="data">
233240
<data key="cardNumber">4111111111111111</data>
234241
<data key="month">12</data>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
10+
<section name="AdminPayPalPayFlowLinkConfigSection">
11+
<element name="configureBtn" type="button" selector="//button[@id='payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us-head']" parameterized="true"/>
12+
<element name="partner" type="text" selector="#payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us_payflow_link_required_payflow_link_payflow_link_partner" parameterized="true"/>
13+
<element name="user" type="text" selector="#payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us_payflow_link_required_payflow_link_payflow_link_user" parameterized="true"/>
14+
<element name="vendor" type="text" selector="#payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us_payflow_link_required_payflow_link_payflow_link_vendor" parameterized="true"/>
15+
<element name="password" type="text" selector="#payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us_payflow_link_required_payflow_link_payflow_link_pwd" parameterized="true"/>
16+
<element name="testMode" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us_payflow_link_required_payflow_link_payflow_link_sandbox_flag" parameterized="true"/>
17+
<element name="enableSolution" type="button" selector="#payment_{{countryCode}}_paypal_payment_gateways_payflow_link_us_payflow_link_required_enable_payflow_link" parameterized="true"/>
18+
<element name="paymentGateway" type="button" selector="//a[@id='payment_{{countryCode}}_paypal_payment_gateways-head'] " parameterized="true"/>
19+
</section>
20+
</sections>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
<element name="smartButtonPayPalFrame" type="iframe" selector=".component-frame" timeout="10"/>
1515
<element name="PayPalPaymentRadio" type="radio" selector="input#paypal_express.radio" timeout="30"/>
1616
<element name="PayPalBtn" type="radio" selector=".paypal-button.paypal-button-number-0" timeout="30"/>
17+
<element name="PayPalExpressCheckoutPayFlowEdition" type="radio" selector="input#payflow_express.radio"/>
18+
<element name="continueButton" type="button" selector="//div[@class='payment-method _active']//button[@class='action primary checkout']/span[text()='Continue to PayPal']"/>
1719
<element name="PayPalPayflowLinkRadio" type="radio" selector="input#payflow_link.radio" timeout="30"/>
1820
<element name="cntinuebtn" type="button" selector="//button[@data-role='review-save']/span[text()='Continue']" timeout="10"/>
1921
<element name="selectCheckoutWithPaypalBtn" type="button" selector="//input[@name ='submit.x']" timeout="10"/>

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<element name="paypalCart" type="text" selector="#transactionCart"/>
2727
<element name="productNamePosition" type="text" selector=".itemName"/>
2828
<element name="orderTotalOnPaypalCheckout" type="text" selector="//div[@id='cart']//span[contains(text(),'$')]"/>
29+
<element name="subtotal" type="text" selector="//div[@data-testid='line-item-subtotal']//span[contains(text(),'{{subtotal}}')]" parameterized="true"/>
30+
<element name="shipping" type="text" selector="//div[@data-testid='line-item-shipping']//span[contains(text(),'{{shippingAmount}}')]" parameterized="true"/>
31+
<element name="total" type="text" selector="//span[@data-testid='cart-sheet-total']"/>
32+
<element name="shippingAddress" type="text" selector="//div[@data-testid='shipping-address']/p[@data-testid='ship-to-address']"/>
33+
<element name="close" type="button" selector="//button[@aria-label='Close']"/>
2934
<element name="paypalPopupButton1" type="button" selector="//button[text()='Pay with Debit or Credit Card']"/>
3035
<element name="paypalPopupButton2" type="button" selector="//button[text()='Create an Account']"/>
3136
<element name="changeShippingAddressButton" type="button" selector="#change-shipping"/>

0 commit comments

Comments
 (0)