Skip to content

Commit fc0588d

Browse files
committed
ACQE-6496:Configuration for paypal pay later on Category page
Correction On Iframe Selecter in PayPalStandardConfigSection
1 parent 25c82a1 commit fc0588d

File tree

6 files changed

+39
-85
lines changed

6 files changed

+39
-85
lines changed

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

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@
2424
<seeOptionIsSelected selector="{{PayPalStandardConfigSection.styleLayout('us')}}" userInput="Flex" stepKey="seeSelectedStylelayout"/>
2525
<seeOptionIsSelected selector="{{PayPalStandardConfigSection.ratio('us')}}" userInput="20x1" stepKey="seeSelectedRatio"/>
2626
<seeOptionIsSelected selector="{{PayPalStandardConfigSection.color('us')}}" userInput="Blue" stepKey="seeSelectedColor"/>
27+
<waitForElementClickable selector="{{AdminConfigSection.saveButton}}" stepKey="waitForConfiguBtn" />
28+
<click selector="{{AdminConfigSection.saveButton}}" stepKey="saveConfiguration"/>
2729
</actionGroup>
2830
</actionGroups>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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="ValidatePaylaterInStorefrontActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Storefront Category' page for 'Paylater Message'. </description>
14+
</annotations>
15+
<arguments>
16+
<argument name="countryCode" type="string" defaultValue="us"/>
17+
</arguments>
18+
<waitForElementClickable selector="{{PayPalStandardConfigSection.categoryClick}}" stepKey="waitForCategryToClickable"/>
19+
<click selector ="{{PayPalStandardConfigSection.categoryClick}}" stepKey="clickCatagoryeButton"/>
20+
<waitForPageLoad stepKey="waitForCategrypageTobeLoaded"/>
21+
<waitForElementVisible selector="{{PayPalStandardConfigSection.payPalFrame}}" stepKey="waitForElement"/>
22+
<switchToIFrame selector="{{PayPalStandardConfigSection.payPalFrame}}" stepKey="switchToBuyNowPaylaterIFrame"/>
23+
<seeElement selector="{{PayPalStandardConfigSection.paypalPaylaterMessage}}" stepKey="verifyBuyNowPaylaterMessage"/>
24+
<switchToIFrame stepKey="switchBackToMainPaypalFrame"/>
25+
</actionGroup>
26+
</actionGroups>

app/code/Magento/Paypal/Test/Mftf/Section/PayPalStandardConfigSection.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<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"/>
2727
<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"/>
2828
<element name="categoryClick" type="button" selector="//span[contains(text(), 'SimpleSubCategory')]"/>
29-
<element name="payPaliFrame" type="iframe" selector="//iframe[contains(@name, 'zoid__paypal_message')]"/>
29+
<element name="payPalFrame" type="iframe" selector="//iframe[contains(@id, 'jsx-iframe')]"/>
3030
<element name="paypalPaylaterMessage" type="input" selector="//span[text()='Buy now, pay later.']"/>
3131
</section>
3232
</sections>

app/code/Magento/Paypal/Test/Mftf/Suite/ConfigPayPalStandardSuite.xml

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

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

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,20 @@
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="paypalStandard"/>
18+
1919
</annotations>
2020
<before>
2121
<createData entity="SimpleSubCategory" stepKey="simpleCategory"/>
2222
<createData entity="SimpleProduct" stepKey="simpleProduct">
2323
<requiredEntity createDataKey="simpleCategory"/>
2424
</createData>
25-
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
26-
<actionGroup ref="AdminPayPalStandardEnableActionGroup" stepKey="ConfigPaymentsStandard">
25+
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"/>
2732
</actionGroup>
2833
</before>
2934
<after>
@@ -38,17 +43,9 @@
3843
<magentoCLI command="cache:flush" stepKey="cleanCache"/>
3944
<!--Navigate to Storefront-->
4045
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToStoreFront"/>
41-
<waitForPageLoad stepKey="waitForProductPage"/>
42-
<waitForElementClickable selector="{{PayPalStandardConfigSection.categoryClick}}" stepKey="waitForCategryToClickable"/>
43-
<click selector ="{{PayPalStandardConfigSection.categoryClick}}" stepKey="clickCatagoryeButton"/>
44-
<waitForPageLoad stepKey="waitForCategrypageTobeLoaded"/>
45-
<waitForElementVisible selector="{{PayPalStandardConfigSection.payPaliFrame}}" stepKey="waitForElement"/>
46-
<switchToIFrame selector="{{PayPalStandardConfigSection.payPaliFrame}}" stepKey="switchToBuyNowPaylaterIFrame"/>
47-
<seeElement selector="{{PayPalStandardConfigSection.paypalPaylaterMessage}}" stepKey="verifyBuyNowPaylaterMessage"/>
48-
<switchToIFrame stepKey="switchBackToMainPaypalFrame"/>
46+
<actionGroup ref="ValidatePaylaterInStorefrontActionGroup" stepKey="verifyPaylaterInStorefrontCategoryPage"/>
4947
<!--Disable Paypal Standard-->
50-
<actionGroup ref="AdminPayPalStandardDisableActionGroup" stepKey="disablePaypalStandard">
51-
</actionGroup>
48+
<magentoCLI command="config:set {{DisablePaypalPayStandard.path}} {{DisablePaypalPayStandard.value}}" stepKey="disablePayPalStandard"/>
5249
<!-- Reindex and cache flush -->
5350
<magentoCLI command="indexer:reindex" stepKey="performReIndex"/>
5451
<magentoCLI command="cache:flush" stepKey="flushCache"/>

0 commit comments

Comments
 (0)