Skip to content

Commit 8f170fb

Browse files
committed
ACQE-6491:Default configuration for paypalpaylater
New Testcase Added
1 parent 6acfd6a commit 8f170fb

File tree

4 files changed

+115
-0
lines changed

4 files changed

+115
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
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="AdminEnablePaypalPaylaterConfigurationActionGroup" >
11+
<annotations>
12+
<description>Enable Paypal Paylater Solution For Paypal Express Checkout</description>
13+
</annotations>
14+
<waitForElementClickable selector="{{PayPalExpressCheckoutConfigSection.configureBtn('us')}}" stepKey="waitForConfigureButtonToClickable"/>
15+
<click selector="{{PayPalExpressCheckoutConfigSection.configureBtn('us')}}" stepKey="configureButtonClicked"/>
16+
<selectOption selector ="{{PayPalExpressCheckoutConfigSection.enablePayLater('us')}}" userInput="Yes" stepKey="enablepaylaterExp"/>
17+
<waitForPageLoad stepKey="waitForAdvisePageLoad"/>
18+
<waitForElementClickable selector="{{PayPalExpressCheckoutConfigSection.payLaterConfigDropDown('us')}}" stepKey="waitForPayLaterDropdownClickable"/>
19+
<click selector="{{PayPalExpressCheckoutConfigSection.payLaterConfigDropDown('us')}}" stepKey="advertisePaylateToClicked"/>
20+
<waitForPageLoad stepKey="waitForAdvisePaylaterDropdown"/>
21+
<selectOption selector ="{{PayPalExpressCheckoutConfigSection.enablePayLaterIn('us')}}" userInput="Yes" stepKey="enablePaypalLater"/>
22+
<waitForElementClickable selector="{{AdminConfigPaypalCartPagePaylaterSection.expandCheckoutCartPage('us')}}" stepKey="waitForCheckoutCartpageClickable"/>
23+
<click selector="{{AdminConfigPaypalCartPagePaylaterSection.expandCheckoutCartPage('us')}}" stepKey="clickCheckoutCart"/>
24+
<selectOption selector ="{{AdminConfigPaypalCartPagePaylaterSection.display('us')}}" userInput="Yes" stepKey="enableDisplayforPaylaterCartpage"/>
25+
<seeOptionIsSelected selector="{{AdminConfigPaypalCartPagePaylaterSection.position('us')}}" userInput="Header (center)" stepKey="seeSelectedPosition"/>
26+
<seeOptionIsSelected selector="{{AdminConfigPaypalCartPagePaylaterSection.styleLayout('us')}}" userInput="Text" stepKey="seeSelectedStyleLayout"/>
27+
<seeOptionIsSelected selector="{{AdminConfigPaypalCartPagePaylaterSection.logoType('us')}}" userInput="Primary" stepKey="seeSelectedLogoType"/>
28+
<seeOptionIsSelected selector="{{AdminConfigPaypalCartPagePaylaterSection.logoPosition('us')}}" userInput="Left" stepKey="seeSelectedLogoPosition"/>
29+
<seeOptionIsSelected selector="{{AdminConfigPaypalCartPagePaylaterSection.textColor('us')}}" userInput="Black" stepKey="seeSelectedTextColor"/>
30+
</actionGroup>
31+
</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+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminConfigPaypalCartPagePaylaterSection">
12+
<element name="expandCheckoutCartPage" type="button" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater_settings_paylater_cartpage-head" parameterized="true"/>
13+
<element name="display" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater_settings_paylater_cartpage_paylater_cartpage_display" parameterized="true"/>
14+
<element name="position" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater_settings_paylater_cartpage_paylater_cartpage_position" parameterized="true"/>
15+
<element name="styleLayout" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater_settings_paylater_cartpage_paylater_cartpage_stylelayout" parameterized="true" />
16+
<element name="logoType" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater_settings_paylater_cartpage_paylater_cartpage_logotype" parameterized="true" />
17+
<element name="logoPosition" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater_settings_paylater_cartpage_paylater_cartpage_logoposition" parameterized="true" />
18+
<element name="textColor" type="input" selector="#payment_{{countryCode}}_paypal_alternative_payment_methods_express_checkout_{{countryCode}}_express_checkout_required_advertise_paylater_settings_paylater_cartpage_paylater_cartpage_textcolor" parameterized="true" />
19+
</section>
20+
</sections>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
9+
<suite name="ConfigurePaypalPaylaterSuite">
10+
<before>
11+
<!-- Login -->
12+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
13+
<actionGroup ref="AdminPayPalExpressCheckoutEnableActionGroup" stepKey="ConfigPayPalExpress">
14+
<argument name="credentials" value="SamplePaypalExpressConfig2"/>
15+
</actionGroup>
16+
<!--Enable Paylater Solution On Admin Cart Page -->
17+
<actionGroup ref="AdminEnablePaypalPaylaterConfigurationActionGroup" stepKey="enablePaylaterOnAdminCartConfiguration">
18+
</actionGroup>
19+
<!--Click on Save configure Button -->
20+
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveAdminConfiguration">
21+
</actionGroup>
22+
</before>
23+
<after>
24+
<!-- Cleanup Paypal configurations -->
25+
<magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/>
26+
<actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
27+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache">
28+
<argument name="tags" value="config full_page"/>
29+
</actionGroup>
30+
</after>
31+
<include>
32+
<group name="paypalPayLater"/>
33+
</include>
34+
</suite>
35+
</suites>
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminConfigForPaypalPaylaterTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Payment methods"/>
14+
<title value="Default configuration for paypalpaylater"/>
15+
<description value="Paypal Pay Later Message should display on Admin Cart Page configuration"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="AC-5644"/>
18+
<group value="paypalPayLater"/>
19+
</annotations>
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
22+
</before>
23+
<after>
24+
<actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
25+
</after>
26+
<!-- Navigate to StoreFront -->
27+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/>
28+
</test>
29+
</tests>

0 commit comments

Comments
 (0)