Skip to content

Commit 1f0559e

Browse files
committed
ACQE-6562:Default configuration for Paypal Pay Later Message on Product Page
New Automation Test Added For AdminConfigForPaylaterProductPageTest
1 parent 995a05c commit 1f0559e

File tree

3 files changed

+96
-0
lines changed

3 files changed

+96
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
8+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
9+
<actionGroup name="EnablePaypalPaylaterConfigurationActionGroup" >
10+
<annotations>
11+
<description>Enable Paypal Paylater Solution For Paypal Express Checkout</description>
12+
</annotations>
13+
<arguments>
14+
<argument name="countryCode" type="string" defaultValue="us"/>
15+
</arguments>
16+
<waitForPageLoad stepKey="waitForAdvisePaylaterDropdown"/>
17+
<selectOption selector ="{{PayPalExpressCheckoutConfigSection.enablePayLaterIn(countryCode)}}" userInput="Yes" stepKey="enablePaypalLater"/>
18+
<waitForElementClickable selector="{{PayPalProductPageConfigSection.expandCatalogProductPage(countryCode)}}" stepKey="waitForCheckoutCartPageClickable"/>
19+
<click selector="{{PayPalProductPageConfigSection.expandCatalogProductPage(countryCode)}}" stepKey="clickCheckoutCart"/>
20+
<selectOption selector ="{{PayPalProductPageConfigSection.display(countryCode)}}" userInput="Yes" stepKey="enableDisplayforPaylaterCartPage"/>
21+
<!--Verify Default Option was Selected correctly-->
22+
<seeOptionIsSelected selector="{{PayPalProductPageConfigSection.position(countryCode)}}" userInput="Header (center)" stepKey="seeSelectedPosition"/>
23+
<seeOptionIsSelected selector="{{PayPalProductPageConfigSection.styleLayout(countryCode)}}" userInput="Text" stepKey="seeSelectedStyleLayout"/>
24+
<seeOptionIsSelected selector="{{PayPalProductPageConfigSection.logoType(countryCode)}}" userInput="Primary" stepKey="seeSelectedLogoType"/>
25+
<seeOptionIsSelected selector="{{PayPalProductPageConfigSection.logoPosition(countryCode)}}" userInput="Left" stepKey="seeSelectedLogoPosition"/>
26+
<seeOptionIsSelected selector="{{PayPalProductPageConfigSection.textColor(countryCode)}}" userInput="Black" stepKey="seeSelectedTextColor"/>
27+
<seeOptionIsSelected selector="{{PayPalProductPageConfigSection.textSize(countryCode)}}" userInput="12px" stepKey="seeSelectedTextSize"/>
28+
</actionGroup>
29+
</actionGroups>
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="PayPalProductPageConfigSection">
11+
<element name="expandCatalogProductPage" type="button" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_us_express_checkout_required_advertise_paylater_settings_paylater_productpage-head" parameterized="true"/>
12+
<element name="display" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_us_express_checkout_required_advertise_paylater_settings_paylater_productpage_paylater_productpage_display" parameterized="true"/>
13+
<element name="position" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_us_express_checkout_required_advertise_paylater_settings_paylater_productpage_paylater_productpage_position" parameterized="true"/>
14+
<element name="styleLayout" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_us_express_checkout_required_advertise_paylater_settings_paylater_productpage_paylater_productpage_stylelayout" parameterized="true" />
15+
<element name="logoType" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_us_express_checkout_required_advertise_paylater_settings_paylater_productpage_paylater_productpage_logotype" parameterized="true" />
16+
<element name="logoPosition" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_us_express_checkout_required_advertise_paylater_settings_paylater_productpage_paylater_productpage_logoposition" parameterized="true" />
17+
<element name="textColor" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_us_express_checkout_required_advertise_paylater_settings_paylater_productpage_paylater_productpage_textcolor" parameterized="true" />
18+
<element name="textSize" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_us_express_checkout_required_advertise_paylater_settings_paylater_productpage_paylater_productpage_textsize" parameterized="true" />
19+
</section>
20+
</sections>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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="AdminConfigForPaylaterProductPageTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Payment methods"/>
14+
<title value="Default configuration for Paypal Pay Later Message on Product Page"/>
15+
<description value="Paypal Pay Later Message should display on Catalog Product Page configuration"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="AC-5602"/>
18+
</annotations>
19+
<before>
20+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
21+
<actionGroup ref="AdminPayPalExpressCheckoutEnableActionGroup" stepKey="ConfigPayPalExpress">
22+
<argument name="credentials" value="SamplePaypalExpressConfig2"/>
23+
</actionGroup>
24+
</before>
25+
<after>
26+
<magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/>
27+
<actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
28+
</after>
29+
<!--Enable Paylater For Paypal Express Checkout -->
30+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
31+
<waitForElementClickable selector="{{PayPalExpressCheckoutConfigSection.configureBtn('us')}}" stepKey="waitForConfigureButtonClickable"/>
32+
<click selector="{{PayPalExpressCheckoutConfigSection.configureBtn('us')}}" stepKey="configureButtonClicked"/>
33+
<selectOption selector ="{{PayPalExpressCheckoutConfigSection.enablePayLater('us')}}" userInput="Yes" stepKey="enablePaylaterExp"/>
34+
<waitForPageLoad stepKey="waitForAdvisePageLoad"/>
35+
<click selector="{{PayPalExpressCheckoutConfigSection.payLaterConfigDropDown('us')}}" stepKey="advertisePaylater"/>
36+
<!--Enable Pay Later in Product Page and Check default values selected in dropdown -->
37+
<actionGroup ref="EnablePaypalPaylaterConfigurationActionGroup" stepKey="enablePaypalPaylaterSolution">
38+
</actionGroup>
39+
<!--Click on Save configure Button -->
40+
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveAdminConfiguration">
41+
</actionGroup>
42+
<!-- Cleanup Paypal configurations -->
43+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache">
44+
<argument name="tags" value="config full_page"/>
45+
</actionGroup>
46+
</test>
47+
</tests>

0 commit comments

Comments
 (0)