Skip to content

Commit 057e50b

Browse files
committed
ACQE-6496:Configuration for paypal pay later on Category Page
Renamed all files with prefix as Admin ot Storefront
1 parent 50705b2 commit 057e50b

8 files changed

+72
-74
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>

app/code/Magento/Paypal/Test/Mftf/ActionGroup/AdminPayPalStandardEnableActionGroup.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@
2020
<waitForPageLoad stepKey="waitForConfigPageLoad"/>
2121
<waitForElementVisible selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" stepKey="waitForOtherPayPalPaymentsSection"/>
2222
<conditionalClick selector="{{OtherPayPalPaymentsConfigSection.expandTab(countryCode)}}" dependentSelector="{{OtherPayPalPaymentsConfigSection.expandedTab(countryCode)}}" visible="false" stepKey="expandOtherPaypalConfigButton"/>
23-
<scrollTo selector="{{PayPalStandardConfigSection.configureBtn(countryCode)}}" x="0" y="-80" stepKey="scrollToConfigure"/>
24-
<waitForElementClickable selector="{{PayPalStandardConfigSection.configureBtn(countryCode)}}" stepKey="waitForPayPalStandardConfigureBtn" />
25-
<click selector="{{PayPalStandardConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalStandardConfigureBtn"/>
26-
<waitForElementVisible selector="{{PayPalStandardConfigSection.email(countryCode)}}" stepKey="waitForEmailTab"/>
27-
<fillField selector ="{{PayPalStandardConfigSection.email(countryCode)}}" userInput="{{credentials.paypal_express_email}}" stepKey="inputEmailAssociatedWithPayPalMerchantAccount"/>
28-
<selectOption selector ="{{PayPalStandardConfigSection.apiMethod(countryCode)}}" userInput="API Signature" stepKey="inputAPIAuthenticationMethods"/>
29-
<fillField selector ="{{PayPalStandardConfigSection.username(countryCode)}}" userInput="{{credentials.paypal_express_api_username}}" stepKey="inputAPIUsername"/>
30-
<fillField selector ="{{PayPalStandardConfigSection.password(countryCode)}}" userInput="{{credentials.paypal_express_api_password}}" stepKey="inputAPIPassword"/>
31-
<fillField selector ="{{PayPalStandardConfigSection.signature(countryCode)}}" userInput="{{credentials.paypal_express_api_signature}}" stepKey="inputAPISignature"/>
32-
<selectOption selector ="{{PayPalStandardConfigSection.sandboxMode(countryCode)}}" userInput="Yes" stepKey="enableSandboxMode"/>
33-
<selectOption selector="{{PayPalStandardConfigSection.enableSolution(countryCode)}}" userInput="Yes" stepKey="enableSolution"/>
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"/>
3434
<waitForElementClickable selector="{{AdminConfigSection.saveButton}}" stepKey="waitForConfigureBtn" />
3535
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfig"/>
3636
<waitForPageLoad stepKey="waitForPageLoad2"/>

app/code/Magento/Paypal/Test/Mftf/ActionGroup/ValidatePaylaterDropdownValuesActionGroup.xml renamed to app/code/Magento/Paypal/Test/Mftf/ActionGroup/AssertAdminPaypalStandardPaylaterDefaultValuesCartPageActionGroup.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@
44
* See COPYING.txt for license details.
55
*/
66
-->
7-
87
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
98
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10-
<actionGroup name="ValidatePaylaterDropdownValuesActionGroup">
9+
<actionGroup name="AssertAdminPaypalStandardPaylaterDefaultValuesCartPageActionGroup">
1110
<annotations>
1211
<description>Validate the Default Dropdown values In Paylater</description>
1312
</annotations>
1413
<arguments>
1514
<argument name="countryCode" type="string" defaultValue="us"/>
1615
</arguments>
17-
<seeOptionIsSelected selector="{{PayPalStandardConfigSection.position(countryCode)}}" userInput="Header (center)" stepKey="seeSelectedPosition"/>
18-
<seeOptionIsSelected selector="{{PayPalStandardConfigSection.styleLayout(countryCode)}}" userInput="Flex" stepKey="seeSelectedStylelayout"/>
19-
<seeOptionIsSelected selector="{{PayPalStandardConfigSection.ratio(countryCode)}}" userInput="20x1" stepKey="seeSelectedRatio"/>
20-
<seeOptionIsSelected selector="{{PayPalStandardConfigSection.color(countryCode)}}" userInput="Blue" stepKey="seeSelectedColor"/>
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"/>
2120
<waitForElementClickable selector="{{AdminConfigSection.saveButton}}" stepKey="waitForConfiguBtn" />
2221
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfiguration"/>
2322
</actionGroup>
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/ActionGroup/EnablePaylaterPaypalStandardActionGroup.xml

Lines changed: 0 additions & 27 deletions
This file was deleted.

app/code/Magento/Paypal/Test/Mftf/ActionGroup/ValidatePaylaterInStorefrontActionGroup.xml

Lines changed: 0 additions & 23 deletions
This file was deleted.

app/code/Magento/Paypal/Test/Mftf/Section/PayPalStandardConfigSection.xml renamed to app/code/Magento/Paypal/Test/Mftf/Section/AdminPaypalStandardConfigSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
10-
<section name="PayPalStandardConfigSection">
10+
<section name="AdminPaypalStandardConfigSection">
1111
<element name="configureBtn" type="button" selector="#payment_{{countryCode}}_paypal_group_all_in_one_wps_express-head" parameterized="true"/>
1212
<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"/>
1313
<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"/>

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<description value="Paypal Pay Later Message should display on Admin Category Page configuration"/>
1616
<severity value="CRITICAL"/>
1717
<testCaseId value="AC-5639"/>
18+
<group value="3rd_party_integration"/>
1819
</annotations>
1920
<before>
2021
<createData entity="SimpleSubCategory" stepKey="simpleCategory"/>
@@ -34,8 +35,8 @@
3435
<deleteData createDataKey="simpleCategory" stepKey="deleteCategory"/>
3536
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
3637
</after>
37-
<actionGroup ref="EnablePaylaterPaypalStandardActionGroup" stepKey="enablePaypalStandard"/>
38-
<actionGroup ref="ValidatePaylaterDropdownValuesActionGroup" stepKey="verifyPaylaterDropdownVales"/>
38+
<actionGroup ref="AdminEnablePaypalStandardPaylaterActionGroup" stepKey="enablePaypalStandard"/>
39+
<actionGroup ref="AssertAdminPaypalStandardPaylaterDefaultValuesCartPageActionGroup" stepKey="verifyPaylaterDropdownVales"/>
3940
<!-- Reindex and cache flush -->
4041
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
4142
<argument name="indices" value=""/>
@@ -45,7 +46,7 @@
4546
</actionGroup>
4647
<!--Navigate to Storefront-->
4748
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/>
48-
<actionGroup ref="ValidatePaylaterInStorefrontActionGroup" stepKey="verifyPaylaterInStorefrontCategoryPage"/>
49+
<actionGroup ref="AssertStorefrontPaypalPaylaterActionGroup" stepKey="verifyPaylaterInStorefrontCategoryPage"/>
4950
<!--Disable Paypal Standard-->
5051
<magentoCLI command="config:set {{DisablePaypalPayStandard.path}} {{DisablePaypalPayStandard.value}}" stepKey="disablePayPalStandard"/>
5152
<!-- Reindex and cache flush -->
@@ -58,10 +59,10 @@
5859
<!--Validate Paylater Message On Storefront Category Page-->
5960
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFrontPage"/>
6061
<waitForPageLoad stepKey="waitForItemPage"/>
61-
<waitForElementClickable selector="{{PayPalStandardConfigSection.categoryClick}}" stepKey="waitForCategoryToBeClickable"/>
62-
<click selector ="{{PayPalStandardConfigSection.categoryClick}}" stepKey="clickCatagoryTab"/>
62+
<waitForElementClickable selector="{{AdminPaypalStandardConfigSection.categoryClick}}" stepKey="waitForCategoryToBeClickable"/>
63+
<click selector ="{{AdminPaypalStandardConfigSection.categoryClick}}" stepKey="clickCatagoryTab"/>
6364
<waitForPageLoad stepKey="waitForCategoryPageTobeLoaded"/>
64-
<waitForElementNotVisible selector="{{PayPalStandardConfigSection.paypalPaylaterMessage}}" stepKey="verifyPaylaterMessageToBeDisappeared"/>
65+
<waitForElementNotVisible selector="{{AdminPaypalStandardConfigSection.paypalPaylaterMessage}}" stepKey="verifyPaylaterMessageToBeDisappeared"/>
6566
</test>
6667
</tests>
6768

0 commit comments

Comments
 (0)