Skip to content

Commit 9360ac8

Browse files
pavan“Pavan-bj”
authored andcommitted
ACQE-5689:Enable PayPal Pay Later Experience for all Merchant Locations
Configure Paypal pay later
1 parent 995a05c commit 9360ac8

File tree

6 files changed

+119
-2
lines changed

6 files changed

+119
-2
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="AdminEnablePayPalExpressCheckoutPayLaterActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Configuration' page for 'Payment Methods'. Enable pay later option.</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+
<click selector="{{PayPalExpressCheckoutConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalConfigureBtn"/>
21+
<selectOption selector="{{PayPalExpressCheckoutConfigSection.enablePayLater(countryCode)}}" userInput="Yes" stepKey="enablePayLater"/>
22+
<waitForText selector="{{PayPalExpressCheckoutConfigSection.verifyPaylaterText(countryCode)}}" userInput="Advertise PayPal Pay Later" stepKey="verifyAdvertisePayPalPayLaterText"/>
23+
<click selector="{{PayPalExpressCheckoutConfigSection.payLaterConfigDropDown(countryCode)}}" stepKey="clickPayLaterConfiguration" />
24+
<selectOption selector="{{PayPalExpressCheckoutConfigSection.enablePayLaterIn(countryCode)}}" userInput="Yes" stepKey="enablePayLaterIn"/>
25+
</actionGroup>
26+
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AdminSavePaymentConfigActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Configuration' page for 'Payment Methods'. Enable pay later option.</description>
14+
</annotations>
15+
<waitForElementClickable selector="{{AdminConfigSection.saveButton}}" stepKey="waitForSaveConfigbtn" />
16+
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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="AssertPaypalPayLaterComponentsActionGroup">
12+
<annotations>
13+
<description>Verify paylater components after enabling paypal paylater </description>
14+
</annotations>
15+
<arguments>
16+
<argument name="countryCode" type="string" defaultValue="us"/>
17+
</arguments>
18+
<waitForText selector="{{PayPalExpressCheckoutConfigSection.payLaterHomePage(countryCode)}}" userInput="Home Page" stepKey="verifyHomePageIsPresentUnderPayLater"/>
19+
<waitForText selector="{{PayPalExpressCheckoutConfigSection.payLaterCatalogPageConfigDropDown(countryCode)}}" userInput="Catalog Product Page" stepKey="verifyCatalogProductPageUnderPayLater"/>
20+
<waitForText selector="{{PayPalExpressCheckoutConfigSection.payLaterCheckoutCartPage(countryCode)}}" userInput="Checkout Cart Page" stepKey="verifyCheckoutCartPageUnderPayLater"/>
21+
<waitForText selector="{{PayPalExpressCheckoutConfigSection.payLaterCheckoutPaymentCheck(countryCode)}}" userInput="Checkout Payment Step" stepKey="verifyCheckoutPaymentStepUnderPayLater"/>
22+
<waitForText selector="{{PayPalExpressCheckoutConfigSection.payLaterCatalogCategoryPage(countryCode)}}" userInput="Catalog Category Page" stepKey="verifyCatalogCategoryPageUnderPayLater"/>
23+
</actionGroup>
24+
</actionGroups>

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
-->
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="PayPalExpressCheckoutConfigSection">
1111
<element name="configureBtn" type="button" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}-head" parameterized="true"/>
1212
<element name="email" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_express_checkout_required_express_checkout_business_account" parameterized="true"/>
@@ -22,6 +22,11 @@
2222
<element name="payLaterConfigDropDown" type="button" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater-head" parameterized="true"/>
2323
<element name="enablePayLaterIn" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater_paylater_enabled" parameterized="true" />
2424
<element name="payLaterCatalogPageConfigDropDown" type="button" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater_settings_paylater_productpage-head" parameterized="true" />
25+
<element name="verifyPaylaterText" type="text" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater-head" parameterized="true"/>
26+
<element name="payLaterHomePage" type="button" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater_settings_paylater_homepage-head" parameterized="true"/>
27+
<element name="payLaterCheckoutCartPage" type="button" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater_settings_paylater_cartpage-head" parameterized="true"/>
28+
<element name="payLaterCheckoutPaymentCheck" type="button" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater_settings_paylater_checkout_payment-head" parameterized="true"/>
29+
<element name="payLaterCatalogCategoryPage" type="button" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater_settings_paylater_categorypage-head" parameterized="true"/>
2530
<element name="display" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater_settings_paylater_productpage_paylater_productpage_display" parameterized="true"/>
2631
<element name="position" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater_settings_paylater_productpage_paylater_productpage_position" parameterized="true"/>
2732
<element name="advancePaypalSettings" type="button" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_settings_ec_settings_ec_advanced-head" parameterized="true" />
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="PayPalPayLaterExperienceForAllMerchantLocationsTest">
12+
<annotations>
13+
<features value="Paypal"/>
14+
<stories value="Payment methods"/>
15+
<title value="Enable PayPal Pay Later Experience for all Merchant Locations"/>
16+
<description value="PayPal Pay later is configured on Admin site for all PayPal Payment method which is applicable for all Merchant Locations"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="AC-5689"/>
19+
<group value="paypalExpress"/>
20+
<group value="3rd_party_integration" />
21+
<!-- <group value="pr_exclude" />-->
22+
</annotations>
23+
<before>
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
25+
</before>
26+
<after>
27+
<magentoCLI command="config:set paypal/general/merchant_country US" stepKey="setMerchantCountryDefault"/>
28+
<actionGroup ref="AdminPayPalExpressCheckoutPayLaterDisableActionGroup" stepKey="disablePayPalPayLater"/>
29+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
30+
</after>
31+
<actionGroup ref="AdminEnablePayPalExpressCheckoutPayLaterActionGroup" stepKey="enablePayPalPayLater"/>
32+
<actionGroup ref="AssertPaypalPayLaterComponentsActionGroup" stepKey="assertPaypalPAyLaterComponents"/>
33+
<actionGroup ref="AdminSavePaymentConfigActionGroup" stepKey="savePaymentConfig"/>
34+
<selectOption selector="{{PaymentsConfigSection.merchantCountry}}" userInput="United Kingdom" stepKey="setMerchantCountry"/>
35+
<actionGroup ref="AdminSavePaymentConfigActionGroup" stepKey="savePaymentConfiga"/>
36+
<actionGroup ref="AdminEnablePayPalExpressCheckoutPayLaterActionGroup" stepKey="enablePayPalPayLater1">
37+
<argument name="countryCode" value="gb"/>
38+
</actionGroup>
39+
<actionGroup ref="AssertPaypalPayLaterComponentsActionGroup" stepKey="assertPaypalPAyLaterComponents1">
40+
<argument name="countryCode" value="gb"/>
41+
</actionGroup>
42+
</test>
43+
</tests>

app/code/Magento/Tax/Test/Mftf/Data/TaxRuleData.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
<data key="calculate_subtotal">true</data>
135135
</entity>
136136
<entity name="TaxRule" type="taxRule">
137-
<data key="name" unique="suffix">TaxName</data>
137+
<data key="name" unique="suffix">TaxNameA</data>
138138
</entity>
139139
<entity name="TaxRuleZeroRate" type="taxRule">
140140
<data key="name" unique="suffix">TaxNameZeroRate</data>

0 commit comments

Comments
 (0)