Skip to content

Commit 866b12c

Browse files
committed
ACQE-6434:Default configuration for Paypal pay later
New Automation testcase added for Paypal Pay Later on Admin Cart
1 parent 995a05c commit 866b12c

File tree

4 files changed

+102
-0
lines changed

4 files changed

+102
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="CheckValuesForAdminCartConfigActionGroup">
10+
<annotations>
11+
<description>Check the default Dropdown Values Available in Admin Cart Page.</description>
12+
</annotations>
13+
<selectOption selector ="{{PayPalCheckoutCartConfigSection.display('us')}}" userInput="Yes" stepKey="enableDisplayforPaylaterCartPage"/>
14+
<seeOptionIsSelected selector="{{PayPalCheckoutCartConfigSection.position('us')}}" userInput="Header (center)" stepKey="seeSelectedPosition"/>
15+
<seeOptionIsSelected selector="{{PayPalCheckoutCartConfigSection.styleLayout('us')}}" userInput="Text" stepKey="seeSelectedStyleLayout"/>
16+
<seeOptionIsSelected selector="{{PayPalCheckoutCartConfigSection.logoType('us')}}" userInput="Primary" stepKey="seeSelectedLogoType"/>
17+
<seeOptionIsSelected selector="{{PayPalCheckoutCartConfigSection.logoPosition('us')}}" userInput="Left" stepKey="seeSelectedLogoPosition"/>
18+
<seeOptionIsSelected selector="{{PayPalCheckoutCartConfigSection.textColor('us')}}" userInput="Black" stepKey="seeSelectedTextColor"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
<waitForPageLoad stepKey="waitForAdvisePaylaterDropdown"/>
14+
<selectOption selector ="{{PayPalExpressCheckoutConfigSection.enablePayLaterIn('us')}}" userInput="Yes" stepKey="enablePaypalLater"/>
15+
<waitForElementClickable selector="{{PayPalCheckoutCartConfigSection.expandCheckoutCartPage('us')}}" stepKey="waitForCheckoutCartPageClickable"/>
16+
<click selector="{{PayPalCheckoutCartConfigSection.expandCheckoutCartPage('us')}}" stepKey="clickCheckoutCart"/>
17+
</actionGroup>
18+
</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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
10+
<section name="PayPalCheckoutCartConfigSection">
11+
<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"/>
12+
<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"/>
13+
<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"/>
14+
<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" />
15+
<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" />
16+
<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" />
17+
<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" />
18+
</section>
19+
</sections>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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 Paypal pay later"/>
15+
<description value="Paypal Pay Later Message should display on Admin Cart Page configuration"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="AC-5644"/>
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+
<actionGroup ref="EnablePaypalPaylaterConfigurationActionGroup" stepKey="enablePaypalPaylaterSolution">
37+
</actionGroup>
38+
<!--Check default values selected in dropdown -->
39+
<actionGroup ref="CheckValuesForAdminCartConfigActionGroup" stepKey="checkValuesForAdminCartConfiguration">
40+
</actionGroup>
41+
<!--Click on Save configure Button -->
42+
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveAdminConfiguration">
43+
</actionGroup>
44+
</test>
45+
</tests>

0 commit comments

Comments
 (0)