Skip to content

Commit 36dd132

Browse files
committed
ACQE-6562:Default configuration for Paypal Pay Later Message on Product Page
Correction OnAdding an ActionGroup For Code Reusuability
1 parent 1f0559e commit 36dd132

File tree

3 files changed

+36
-23
lines changed

3 files changed

+36
-23
lines changed

app/code/Magento/Paypal/Test/Mftf/ActionGroup/EnablePaypalPaylaterConfigurationActionGroup.xml renamed to app/code/Magento/Paypal/Test/Mftf/ActionGroup/CheckValuesForAdminProductConfigActionGroup.xml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,13 @@
66
-->
77
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
88
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
9-
<actionGroup name="EnablePaypalPaylaterConfigurationActionGroup" >
9+
<actionGroup name="CheckValuesForAdminProductConfigActionGroup">
1010
<annotations>
11-
<description>Enable Paypal Paylater Solution For Paypal Express Checkout</description>
11+
<description>Check the default Dropdown Values Available in Admin Cart Page.</description>
1212
</annotations>
1313
<arguments>
1414
<argument name="countryCode" type="string" defaultValue="us"/>
1515
</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"/>
2116
<!--Verify Default Option was Selected correctly-->
2217
<seeOptionIsSelected selector="{{PayPalProductPageConfigSection.position(countryCode)}}" userInput="Header (center)" stepKey="seeSelectedPosition"/>
2318
<seeOptionIsSelected selector="{{PayPalProductPageConfigSection.styleLayout(countryCode)}}" userInput="Text" stepKey="seeSelectedStyleLayout"/>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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="PaylaterProductPageConfigActionGroup" >
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+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
17+
<waitForElementClickable selector="{{PayPalExpressCheckoutConfigSection.configureBtn('us')}}" stepKey="waitForConfigureButtonClickable"/>
18+
<click selector="{{PayPalExpressCheckoutConfigSection.configureBtn('us')}}" stepKey="configureButtonClicked"/>
19+
<selectOption selector ="{{PayPalExpressCheckoutConfigSection.enablePayLater('us')}}" userInput="Yes" stepKey="enablePaylaterExp"/>
20+
<waitForPageLoad stepKey="waitForAdvisePageLoad"/>
21+
<click selector="{{PayPalExpressCheckoutConfigSection.payLaterConfigDropDown('us')}}" stepKey="advertisePaylater"/>
22+
<waitForPageLoad stepKey="waitForAdvisePaylaterDropdown"/>
23+
<selectOption selector ="{{PayPalExpressCheckoutConfigSection.enablePayLaterIn(countryCode)}}" userInput="Yes" stepKey="enablePaypalLater"/>
24+
<waitForElementClickable selector="{{PayPalProductPageConfigSection.expandCatalogProductPage(countryCode)}}" stepKey="waitForCheckoutCartPageClickable"/>
25+
<click selector="{{PayPalProductPageConfigSection.expandCatalogProductPage(countryCode)}}" stepKey="clickCheckoutCart"/>
26+
<selectOption selector ="{{PayPalProductPageConfigSection.display(countryCode)}}" userInput="Yes" stepKey="enableDisplayforPaylaterCartPage"/>
27+
</actionGroup>
28+
</actionGroups>

app/code/Magento/Paypal/Test/Mftf/Test/AdminConfigForPaylaterProductPageTest.xml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,14 @@
2424
</before>
2525
<after>
2626
<magentoCLI command="config:set payment/paypal_express/active 0" stepKey="disablePayPalExpress"/>
27+
<magentoCLI command="cache:flush" stepKey="cleanCache"/>
2728
<actionGroup ref="AdminLogoutActionGroup" stepKey="amOnLogoutPage"/>
2829
</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>
30+
<!--Enable Pay Later in Admin Product Page -->
31+
<actionGroup ref="PaylaterProductPageConfigActionGroup" stepKey="enablePaypalPaylaterSolution"/>
32+
<!--Check default values selected in dropdown -->
33+
<actionGroup ref="CheckValuesForAdminProductConfigActionGroup" stepKey="verifyDefaultValues"/>
3934
<!--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>
35+
<actionGroup ref="AdminSaveConfigActionGroup" stepKey="saveAdminConfiguration"/>
4636
</test>
4737
</tests>

0 commit comments

Comments
 (0)