Skip to content

Commit 3b734d1

Browse files
Merge branch 'ACQE-6496' into ACQE-6650_mainline_PR_deployment
2 parents 5d2a304 + 0f0ba2c commit 3b734d1

7 files changed

+217
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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="AdminEnablePaypalStandardPaylaterActionGroup">
10+
<annotations>
11+
<description>Enable Paypal Paylater Solution For Paypal Standard</description>
12+
</annotations>
13+
<arguments>
14+
<argument name="countryCode" type="string" defaultValue="us"/>
15+
</arguments>
16+
<click selector="{{AdminPaypalStandardConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalConfigureBtn"/>
17+
<selectOption selector="{{AdminPaypalStandardConfigSection.enablePaylaterExperience(countryCode)}}" userInput="Yes" stepKey="EnablePaylaterExperience"/>
18+
<waitForPageLoad stepKey="waitForAdvisepaylaterdropdown"/>
19+
<waitForElementClickable selector="{{AdminPaypalStandardConfigSection.advisePaylater(countryCode)}}" stepKey="waitForAdvisepaylaterClickable"/>
20+
<click selector="{{AdminPaypalStandardConfigSection.advisePaylater(countryCode)}}" stepKey="clickAdvisePaylater"/>
21+
<selectOption selector="{{AdminPaypalStandardConfigSection.enablePaypalPaylater(countryCode)}}" userInput="Yes" stepKey="EnablePaypallater"/>
22+
<waitForElementClickable selector="{{AdminPaypalStandardConfigSection.expandCategoryPage(countryCode)}}" stepKey="waitForcategorypageClickable"/>
23+
<click selector="{{AdminPaypalStandardConfigSection.expandCategoryPage(countryCode)}}" stepKey="clickCategoryPage"/>
24+
<selectOption selector ="{{AdminPaypalStandardConfigSection.display(countryCode)}}" userInput="Yes" stepKey="enableDisplayforPaylaterCategory"/>
25+
</actionGroup>
26+
</actionGroups>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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="AdminPayPalStandardEnableActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Configuration' page for 'Payment Methods'. Fills in the provided Sample PayPal credentials and other details. Clicks on Save.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="credentials" defaultValue="SamplePaypalExpressConfig2"/>
17+
<argument name="countryCode" type="string" defaultValue="us"/>
18+
</arguments>
19+
<amOnPage url="{{AdminConfigPaymentMethodsPage.url}}" stepKey="navigateToPaymentConfigurationPage"/>
20+
<waitForPageLoad stepKey="waitForConfigPageLoad"/>
21+
<waitForElementVisible selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" stepKey="waitForOtherPayPalPaymentsSection"/>
22+
<conditionalClick selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" dependentSelector="{{OtherPayPalPaymentsConfigSection.expandedTab(countryCode)}}" visible="false" stepKey="expandOtherPaypalConfigButton"/>
23+
<scrollTo selector="{{AdminPaypalStandardConfigSection.configureBtn(countryCode)}}" x="0" y="-80" stepKey="scrollToConfigure"/>
24+
<waitForElementClickable selector="{{AdminPaypalStandardConfigSection.configureBtn(countryCode)}}" stepKey="waitForPayPalStandardConfigureBtn" />
25+
<click selector="{{AdminPaypalStandardConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalStandardConfigureBtn"/>
26+
<waitForElementVisible selector="{{AdminPaypalStandardConfigSection.email(countryCode)}}" stepKey="waitForEmailTab"/>
27+
<fillField selector ="{{AdminPaypalStandardConfigSection.email(countryCode)}}" userInput="{{credentials.paypal_express_email}}" stepKey="inputEmailAssociatedWithPayPalMerchantAccount"/>
28+
<selectOption selector ="{{AdminPaypalStandardConfigSection.apiMethod(countryCode)}}" userInput="API Signature" stepKey="inputAPIAuthenticationMethods"/>
29+
<fillField selector ="{{AdminPaypalStandardConfigSection.username(countryCode)}}" userInput="{{credentials.paypal_express_api_username}}" stepKey="inputAPIUsername"/>
30+
<fillField selector ="{{AdminPaypalStandardConfigSection.password(countryCode)}}" userInput="{{credentials.paypal_express_api_password}}" stepKey="inputAPIPassword"/>
31+
<fillField selector ="{{AdminPaypalStandardConfigSection.signature(countryCode)}}" userInput="{{credentials.paypal_express_api_signature}}" stepKey="inputAPISignature"/>
32+
<selectOption selector ="{{AdminPaypalStandardConfigSection.sandboxMode(countryCode)}}" userInput="Yes" stepKey="enableSandboxMode"/>
33+
<selectOption selector="{{AdminPaypalStandardConfigSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/>
34+
<waitForElementClickable selector="{{AdminConfigSection.saveButton}}" stepKey="waitForConfigureBtn" />
35+
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
36+
<waitForPageLoad stepKey="waitForPageLoad2"/>
37+
</actionGroup>
38+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="AssertAdminPaypalStandardPaylaterDefaultValuesCartPageActionGroup">
10+
<annotations>
11+
<description>Validate the Default Dropdown values In Paylater</description>
12+
</annotations>
13+
<arguments>
14+
<argument name="countryCode" type="string" defaultValue="us"/>
15+
</arguments>
16+
<seeOptionIsSelected selector="{{AdminPaypalStandardConfigSection.position(countryCode)}}" userInput="Header (center)" stepKey="seeSelectedPosition"/>
17+
<seeOptionIsSelected selector="{{AdminPaypalStandardConfigSection.styleLayout(countryCode)}}" userInput="Flex" stepKey="seeSelectedStylelayout"/>
18+
<seeOptionIsSelected selector="{{AdminPaypalStandardConfigSection.ratio(countryCode)}}" userInput="20x1" stepKey="seeSelectedRatio"/>
19+
<seeOptionIsSelected selector="{{AdminPaypalStandardConfigSection.color(countryCode)}}" userInput="Blue" stepKey="seeSelectedColor"/>
20+
<waitForElementClickable selector="{{AdminConfigSection.saveButton}}" stepKey="waitForConfiguBtn" />
21+
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfiguration"/>
22+
</actionGroup>
23+
</actionGroups>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AssertStorefrontPaypalPaylaterActionGroup">
11+
<annotations>
12+
<description>Goes to the 'Storefront Category' page for 'Paylater Message'. </description>
13+
</annotations>
14+
<waitForElementClickable selector="{{AdminPaypalStandardConfigSection.categoryClick}}" stepKey="waitForCategryToClickable"/>
15+
<click selector ="{{AdminPaypalStandardConfigSection.categoryClick}}" stepKey="clickCatagoryeButton"/>
16+
<waitForPageLoad stepKey="waitForCategrypageTobeLoaded"/>
17+
<waitForElementVisible selector="{{AdminPaypalStandardConfigSection.payPalFrame}}" stepKey="waitForElement"/>
18+
<switchToIFrame selector="{{AdminPaypalStandardConfigSection.payPalFrame}}" stepKey="switchToBuyNowPaylaterIFrame"/>
19+
<waitForElementVisible selector="{{AdminPaypalStandardConfigSection.paypalPaylaterMessage}}" stepKey="verifyBuyNowPaylaterMessage"/>
20+
<switchToIFrame stepKey="switchBackToMainPaypalFrame"/>
21+
</actionGroup>
22+
</actionGroups>

app/code/Magento/Paypal/Test/Mftf/Data/PaypalData.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,14 @@
196196
<entity name="DisablePaypalPayflowProVault" type="payflowpro_cc_vault_active">
197197
<data key="value">0</data>
198198
</entity>
199+
<entity name="EnablePaypalPayStandard">
200+
<data key="path">payment/wps_express/active</data>
201+
<data key="value">1</data>
202+
</entity>
203+
<entity name="DisablePaypalPayStandard">
204+
<data key="path">payment/wps_express/active</data>
205+
<data key="value">0</data>
206+
</entity>
199207
<entity name="Visa3DSecureCard" type="data">
200208
<data key="cardNumber">4000000000000002</data>
201209
<data key="month">12</data>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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="AdminPaypalStandardConfigSection">
11+
<element name="configureBtn" type="button" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express-head" parameterized="true"/>
12+
<element name="email" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_express_checkout_required_express_checkout_business_account" parameterized="true"/>
13+
<element name="apiMethod" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_express_checkout_required_express_checkout_api_authentication" parameterized="true"/>
14+
<element name="username" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_express_checkout_required_express_checkout_api_username" parameterized="true"/>
15+
<element name="password" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_express_checkout_required_express_checkout_api_password" parameterized="true"/>
16+
<element name="signature" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_express_checkout_required_express_checkout_api_signature" parameterized="true"/>
17+
<element name="sandboxMode" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_express_checkout_required_express_checkout_sandbox_flag" parameterized="true"/>
18+
<element name="enableSolution" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_enable_express_checkout" parameterized="true"/>
19+
<element name="enablePaylaterExperience" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_enable_paypal_paylater_experience" parameterized="true"/>
20+
<element name="expandCategoryPage" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_advertise_paylater_settings_paylater_categorypage-head" parameterized="true"/>
21+
<element name="advisePaylater" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_advertise_paylater-head" parameterized="true"/>
22+
<element name="enablePaypalPaylater" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_advertise_paylater_paylater_enabled" parameterized="true"/>
23+
<element name="display" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_advertise_paylater_settings_paylater_categorypage_paylater_categorypage_display" parameterized="true"/>
24+
<element name="position" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_advertise_paylater_settings_paylater_categorypage_paylater_categorypage_position" parameterized="true"/>
25+
<element name="styleLayout" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_advertise_paylater_settings_paylater_categorypage_paylater_categorypage_stylelayout" parameterized="true"/>
26+
<element name="ratio" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_advertise_paylater_settings_paylater_categorypage_paylater_categorypage_ratio" parameterized="true"/>
27+
<element name="color" type="input" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express_express_checkout_required_advertise_paylater_settings_paylater_categorypage_paylater_categorypage_color" parameterized="true"/>
28+
<element name="categoryClick" type="button" selector="//span[contains(text(), 'SimpleSubCategory')]"/>
29+
<element name="payPalFrame" type="iframe" selector="//iframe[contains(@id, 'jsx-iframe')]"/>
30+
<element name="paypalPaylaterMessage" type="input" selector="//span[text()='Buy now, pay later.']"/>
31+
</section>
32+
</sections>
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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="AdminConfigPaymentsStandardTest">
11+
<annotations>
12+
<features value="PayPal"/>
13+
<stories value="Payment methods"/>
14+
<title value="Configuration for paypal pay later on Category Page"/>
15+
<description value="Paypal Pay Later Message should display on Admin Category Page configuration"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="AC-5639"/>
18+
<group value="3rd_party_integration"/>
19+
<group value="pr_exclude"/>
20+
</annotations>
21+
<before>
22+
<createData entity="SimpleSubCategory" stepKey="simpleCategory"/>
23+
<createData entity="SimpleProduct" stepKey="simpleProduct">
24+
<requiredEntity createDataKey="simpleCategory"/>
25+
</createData>
26+
<!-- Login -->
27+
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
28+
<!--Config PayPal Standard-->
29+
<actionGroup ref="AdminPayPalStandardEnableActionGroup" stepKey="ConfigPayPalStandard"/>
30+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanFullPageCache">
31+
<argument name="tags" value="config full_page"/>
32+
</actionGroup>
33+
</before>
34+
<after>
35+
<deleteData createDataKey="simpleProduct" stepKey="deleteProduct"/>
36+
<deleteData createDataKey="simpleCategory" stepKey="deleteCategory"/>
37+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
38+
</after>
39+
<actionGroup ref="AdminEnablePaypalStandardPaylaterActionGroup" stepKey="enablePaypalStandard"/>
40+
<actionGroup ref="AssertAdminPaypalStandardPaylaterDefaultValuesCartPageActionGroup" stepKey="verifyPaylaterDropdownValues"/>
41+
<!-- Reindex and cache flush -->
42+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
43+
<argument name="indices" value=""/>
44+
</actionGroup>
45+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanMagentoCache">
46+
<argument name="tags" value="config full_page"/>
47+
</actionGroup>
48+
<!--Navigate to Storefront-->
49+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/>
50+
<actionGroup ref="AssertStorefrontPaypalPaylaterActionGroup" stepKey="verifyPaylaterInStorefrontCategoryPage"/>
51+
<!--Disable Paypal Standard-->
52+
<magentoCLI command="config:set {{DisablePaypalPayStandard.path}} {{DisablePaypalPayStandard.value}}" stepKey="disablePayPalStandard"/>
53+
<!-- Reindex and cache flush -->
54+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex1">
55+
<argument name="indices" value=""/>
56+
</actionGroup>
57+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanMagentoCache1">
58+
<argument name="tags" value="config full_page"/>
59+
</actionGroup>
60+
<!--Validate Paylater Message On Storefront Category Page-->
61+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFrontPage"/>
62+
<waitForPageLoad stepKey="waitForItemPage"/>
63+
<waitForElementClickable selector="{{AdminPaypalStandardConfigSection.categoryClick}}" stepKey="waitForCategoryToBeClickable"/>
64+
<click selector ="{{AdminPaypalStandardConfigSection.categoryClick}}" stepKey="clickCatagoryTab"/>
65+
<waitForPageLoad stepKey="waitForCategoryPageTobeLoaded"/>
66+
<waitForElementNotVisible selector="{{AdminPaypalStandardConfigSection.paypalPaylaterMessage}}" stepKey="verifyPaylaterMessageToBeDisappeared"/>
67+
</test>
68+
</tests>

0 commit comments

Comments
 (0)