Skip to content

Commit 50705b2

Browse files
committed
ACQE-6496:Configuration for paypal pay later on Category Page
Adding ValidatePaylaterDropdownValuesActionGroup and Using Reindex and Cache ActionGroup in AdminConfigPaymentsStandardTest
1 parent fbc625c commit 50705b2

File tree

4 files changed

+52
-22
lines changed

4 files changed

+52
-22
lines changed

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

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,21 @@
77

88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10-
<actionGroup name="EnablePaylaterPaypalStandardActionGroup" >
10+
<actionGroup name="EnablePaylaterPaypalStandardActionGroup">
1111
<annotations>
1212
<description>Enable Paypal Paylater Solution For Paypal Standard</description>
1313
</annotations>
14-
<click selector="{{PayPalStandardConfigSection.configureBtn('us')}}" stepKey="clickPayPalConfigureBtn"/>
15-
<selectOption selector="{{PayPalStandardConfigSection.enablePaylaterExperience('us')}}" userInput="Yes" stepKey="EnablePaylaterExperience"/>
14+
<arguments>
15+
<argument name="countryCode" type="string" defaultValue="us"/>
16+
</arguments>
17+
<click selector="{{PayPalStandardConfigSection.configureBtn(countryCode)}}" stepKey="clickPayPalConfigureBtn"/>
18+
<selectOption selector="{{PayPalStandardConfigSection.enablePaylaterExperience(countryCode)}}" userInput="Yes" stepKey="EnablePaylaterExperience"/>
1619
<waitForPageLoad stepKey="waitForAdvisepaylaterdropdown"/>
17-
<waitForElementClickable selector="{{PayPalStandardConfigSection.advisePaylater('us')}}" stepKey="waitForAdvisepaylaterClickable"/>
18-
<click selector="{{PayPalStandardConfigSection.advisePaylater('us')}}" stepKey="clickAdvisePaylater"/>
19-
<selectOption selector="{{PayPalStandardConfigSection.enablePaypalPaylater('us')}}" userInput="Yes" stepKey="EnablePaypallater"/>
20-
<waitForElementClickable selector="{{PayPalStandardConfigSection.expandCategoryPage('us')}}" stepKey="waitForcategorypageClickable"/>
21-
<click selector="{{PayPalStandardConfigSection.expandCategoryPage('us')}}" stepKey="clickCategoryPage"/>
22-
<selectOption selector ="{{PayPalStandardConfigSection.display('us')}}" userInput="Yes" stepKey="enableDisplayforPaylaterCategory"/>
23-
<seeOptionIsSelected selector="{{PayPalStandardConfigSection.position('us')}}" userInput="Header (center)" stepKey="seeSelectedPosition"/>
24-
<seeOptionIsSelected selector="{{PayPalStandardConfigSection.styleLayout('us')}}" userInput="Flex" stepKey="seeSelectedStylelayout"/>
25-
<seeOptionIsSelected selector="{{PayPalStandardConfigSection.ratio('us')}}" userInput="20x1" stepKey="seeSelectedRatio"/>
26-
<seeOptionIsSelected selector="{{PayPalStandardConfigSection.color('us')}}" userInput="Blue" stepKey="seeSelectedColor"/>
27-
<waitForElementClickable selector="{{AdminConfigSection.saveButton}}" stepKey="waitForConfiguBtn" />
28-
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfiguration"/>
20+
<waitForElementClickable selector="{{PayPalStandardConfigSection.advisePaylater(countryCode)}}" stepKey="waitForAdvisepaylaterClickable"/>
21+
<click selector="{{PayPalStandardConfigSection.advisePaylater(countryCode)}}" stepKey="clickAdvisePaylater"/>
22+
<selectOption selector="{{PayPalStandardConfigSection.enablePaypalPaylater(countryCode)}}" userInput="Yes" stepKey="EnablePaypallater"/>
23+
<waitForElementClickable selector="{{PayPalStandardConfigSection.expandCategoryPage(countryCode)}}" stepKey="waitForcategorypageClickable"/>
24+
<click selector="{{PayPalStandardConfigSection.expandCategoryPage(countryCode)}}" stepKey="clickCategoryPage"/>
25+
<selectOption selector ="{{PayPalStandardConfigSection.display(countryCode)}}" userInput="Yes" stepKey="enableDisplayforPaylaterCategory"/>
2926
</actionGroup>
3027
</actionGroups>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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="ValidatePaylaterDropdownValuesActionGroup">
11+
<annotations>
12+
<description>Validate the Default Dropdown values In Paylater</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="countryCode" type="string" defaultValue="us"/>
16+
</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"/>
21+
<waitForElementClickable selector="{{AdminConfigSection.saveButton}}" stepKey="waitForConfiguBtn" />
22+
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfiguration"/>
23+
</actionGroup>
24+
</actionGroups>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<waitForPageLoad stepKey="waitForCategrypageTobeLoaded"/>
1818
<waitForElementVisible selector="{{PayPalStandardConfigSection.payPalFrame}}" stepKey="waitForElement"/>
1919
<switchToIFrame selector="{{PayPalStandardConfigSection.payPalFrame}}" stepKey="switchToBuyNowPaylaterIFrame"/>
20-
<seeElement selector="{{PayPalStandardConfigSection.paypalPaylaterMessage}}" stepKey="verifyBuyNowPaylaterMessage"/>
20+
<waitForElementVisible selector="{{PayPalStandardConfigSection.paypalPaylaterMessage}}" stepKey="verifyBuyNowPaylaterMessage"/>
2121
<switchToIFrame stepKey="switchBackToMainPaypalFrame"/>
2222
</actionGroup>
2323
</actionGroups>

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

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<annotations>
1212
<features value="PayPal"/>
1313
<stories value="Payment methods"/>
14-
<title value="Configuration for paypal pay later on Category page"/>
14+
<title value="Configuration for paypal pay later on Category Page"/>
1515
<description value="Paypal Pay Later Message should display on Admin Category Page configuration"/>
1616
<severity value="CRITICAL"/>
1717
<testCaseId value="AC-5639"/>
@@ -35,24 +35,33 @@
3535
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
3636
</after>
3737
<actionGroup ref="EnablePaylaterPaypalStandardActionGroup" stepKey="enablePaypalStandard"/>
38+
<actionGroup ref="ValidatePaylaterDropdownValuesActionGroup" stepKey="verifyPaylaterDropdownVales"/>
3839
<!-- Reindex and cache flush -->
39-
<magentoCLI command="indexer:reindex" stepKey="performReindex"/>
40-
<magentoCLI command="cache:flush" stepKey="cleanCache"/>
40+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
41+
<argument name="indices" value=""/>
42+
</actionGroup>
43+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanMagentoCache">
44+
<argument name="tags" value="config full_page"/>
45+
</actionGroup>
4146
<!--Navigate to Storefront-->
4247
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/>
4348
<actionGroup ref="ValidatePaylaterInStorefrontActionGroup" stepKey="verifyPaylaterInStorefrontCategoryPage"/>
4449
<!--Disable Paypal Standard-->
4550
<magentoCLI command="config:set {{DisablePaypalPayStandard.path}} {{DisablePaypalPayStandard.value}}" stepKey="disablePayPalStandard"/>
4651
<!-- Reindex and cache flush -->
47-
<magentoCLI command="indexer:reindex" stepKey="performReIndex"/>
48-
<magentoCLI command="cache:flush" stepKey="flushCache"/>
52+
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex1">
53+
<argument name="indices" value=""/>
54+
</actionGroup>
55+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="cleanMagentoCache1">
56+
<argument name="tags" value="config full_page"/>
57+
</actionGroup>
4958
<!--Validate Paylater Message On Storefront Category Page-->
5059
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFrontPage"/>
5160
<waitForPageLoad stepKey="waitForItemPage"/>
5261
<waitForElementClickable selector="{{PayPalStandardConfigSection.categoryClick}}" stepKey="waitForCategoryToBeClickable"/>
5362
<click selector ="{{PayPalStandardConfigSection.categoryClick}}" stepKey="clickCatagoryTab"/>
5463
<waitForPageLoad stepKey="waitForCategoryPageTobeLoaded"/>
55-
<dontSeeElement selector="{{PayPalStandardConfigSection.paypalPaylaterMessage}}" stepKey="verifyPaylaterMessageToBeDisappeared"/>
64+
<waitForElementNotVisible selector="{{PayPalStandardConfigSection.paypalPaylaterMessage}}" stepKey="verifyPaylaterMessageToBeDisappeared"/>
5665
</test>
5766
</tests>
5867

0 commit comments

Comments
 (0)