Skip to content

Commit 9528b91

Browse files
Merge branch 'ACQE-8575' into ACQE-functional-deployment-version16
2 parents ee918f0 + 6da750f commit 9528b91

File tree

5 files changed

+212
-2
lines changed

5 files changed

+212
-2
lines changed
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 2025 Adobe
5+
* All Rights Reserved.
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="AdminSelectRecentlyViewedProductWidgetFromInsertWidgetSlideOutActionGroup" extends="AdminInsertRecentlyViewedWidgetActionGroup">
12+
<annotations>
13+
<description>Fills out the Widget Options form for the Recently Viewed Products widget from the Insert Widget slide out.</description>
14+
</annotations>
15+
<remove keyForRemoval="expandContentSectionIfNotVisible"/>
16+
<remove keyForRemoval="clickNextShowHideEditorIfVisible"/>
17+
<remove keyForRemoval="checkCMSContent"/>
18+
<remove keyForRemoval="clickNextSave"/>
19+
<remove keyForRemoval="waitForPageActionSave"/>
20+
<remove keyForRemoval="waitForSaveSuccess"/>
21+
</actionGroup>
22+
</actionGroups>

app/code/Magento/Cms/Test/Mftf/Data/CmsPageData.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,10 @@
119119
<data key="identifier" unique="suffix" >block</data>
120120
<data key="active">true</data>
121121
</entity>
122+
<entity name="PageBuilderHtmlCmsHomePageContent" type="pagebuilder_html_property">
123+
<data key="name">HTML</data>
124+
<data key="section">general</data>
125+
<data key="value">CMS homepage content goes here</data>
126+
<data key="fieldName">html</data>
127+
</entity>
122128
</entities>

app/code/Magento/Tax/Test/Mftf/Data/TaxRateData.xml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright © Magento, Inc. All rights reserved.
5-
* See COPYING.txt for license details.
4+
* Copyright 2017 Adobe
5+
* All Rights Reserved.
66
*/
77
-->
8+
89
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
910
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
1011
<!-- These Tax Rates Are Installed by Default with Magento -->
@@ -204,4 +205,12 @@
204205
<data key="tax_postcode">*</data>
205206
<data key="rate">20</data>
206207
</entity>
208+
<entity name="US_All_Rate_20" type="taxRate">
209+
<data key="code" unique="suffix">US All States 20%</data>
210+
<data key="tax_country_id">US</data>
211+
<data key="tax_region_id">0</data>
212+
<data key="tax_postcode">*</data>
213+
<data key="rate">20</data>
214+
<data key="zip_is_range">0</data>
215+
</entity>
207216
</entities>
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright 2025 Adobe
5+
* All Rights Reserved.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StorefrontVerifyRecentlyViewedWidgetTaxPricesTest">
12+
<annotations>
13+
<features value="Tax"/>
14+
<stories value="Recently Viewed Widget Tax Price Display"/>
15+
<title value="Display tax inclusive and exclusive prices in Recently Viewed Widget"/>
16+
<description value="Verify that Recently Viewed Widget displays correct prices including and excluding tax based on tax configuration"/>
17+
<severity value="AVERAGE"/>
18+
<testCaseId value="AC-8327"/>
19+
<group value="Tax"/>
20+
</annotations>
21+
<before>
22+
<!-- Pre-Condition 1:- Create Bundle Product -->
23+
<createData entity="_defaultCategory" stepKey="category"/>
24+
<createData entity="SimpleProduct2" stepKey="createYogaStrap6Foot">
25+
<field key="name">Sprite Yoga Strap 6 Foot</field>
26+
<field key="sku" unique="suffix">24-WG085</field>
27+
<field key="price">14.00</field>
28+
<requiredEntity createDataKey="category"/>
29+
</createData>
30+
<createData entity="SimpleProduct2" stepKey="createYogaStrap8Foot">
31+
<field key="name">Sprite Yoga Strap 8 Foot</field>
32+
<field key="sku" unique="suffix">24-WG086</field>
33+
<field key="price">17.00</field>
34+
<requiredEntity createDataKey="category"/>
35+
</createData>
36+
<createData entity="SimpleProduct2" stepKey="createYogaStrap10Foot">
37+
<field key="name">Sprite Yoga Strap 10 Foot</field>
38+
<field key="sku" unique="suffix">24-WG087</field>
39+
<field key="price">21.00</field>
40+
<requiredEntity createDataKey="category"/>
41+
</createData>
42+
<createData entity="ApiBundleProduct" stepKey="createSpriteYogaStrapsBundle">
43+
<field key="name">Set of Sprite Yoga Straps</field>
44+
<field key="sku" unique="suffix">24-WG085-bundle-dynamic</field>
45+
<field key="price">52.00</field>
46+
<requiredEntity createDataKey="category"/>
47+
</createData>
48+
<createData entity="MultipleSelectOption" stepKey="createBundleOption1">
49+
<requiredEntity createDataKey="createSpriteYogaStrapsBundle"/>
50+
<field key="title">Choose Your Yoga Straps</field>
51+
<field key="required">true</field>
52+
<field key="type">multi</field>
53+
</createData>
54+
<createData entity="ApiBundleLink" stepKey="linkYogaStrap6Foot">
55+
<requiredEntity createDataKey="createSpriteYogaStrapsBundle"/>
56+
<requiredEntity createDataKey="createBundleOption1"/>
57+
<requiredEntity createDataKey="createYogaStrap6Foot"/>
58+
<field key="qty">1</field>
59+
<field key="is_default">true</field>
60+
<field key="price_type">0</field>
61+
</createData>
62+
<createData entity="ApiBundleLink" stepKey="linkYogaStrap8Foot">
63+
<requiredEntity createDataKey="createSpriteYogaStrapsBundle"/>
64+
<requiredEntity createDataKey="createBundleOption1"/>
65+
<requiredEntity createDataKey="createYogaStrap8Foot"/>
66+
<field key="qty">1</field>
67+
<field key="is_default">false</field>
68+
<field key="price_type">0</field>
69+
</createData>
70+
<createData entity="ApiBundleLink" stepKey="linkYogaStrap10Foot">
71+
<requiredEntity createDataKey="createSpriteYogaStrapsBundle"/>
72+
<requiredEntity createDataKey="createBundleOption1"/>
73+
<requiredEntity createDataKey="createYogaStrap10Foot"/>
74+
<field key="qty">1</field>
75+
<field key="is_default">false</field>
76+
<field key="price_type">0</field>
77+
</createData>
78+
<!-- Pre-Condition 2:- Taxable Goods has Tax Class configured (20%) -->
79+
<createData entity="US_All_Rate_20" stepKey="createUSAllTaxRate20"/>
80+
<!-- Step 1:- Login as admin -->
81+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
82+
<actionGroup ref="AdminCreateTaxRuleActionGroup" stepKey="createDefaultTaxRule">
83+
<argument name="taxRate" value="$$createUSAllTaxRate20$$"/>
84+
<argument name="taxRule" value="defaultTaxRule"/>
85+
</actionGroup>
86+
<!-- Pre-Condition 3:- Price Display is set to show both prices including and excluding from Stores >> Configuration >> Sales >> Tax >> Price Display Settings. -->
87+
<magentoCLI command="config:set {{CustomDisplayProductPricesInCatalog.path}} {{CustomDisplayProductPricesInCatalog.value}}" stepKey="setPriceDisplayToBothPrices"/>
88+
</before>
89+
<after>
90+
<magentoCLI command="config:set {{DisplayProductPricesInCatalog.path}} {{DisplayProductPricesInCatalog.value}}" stepKey="resetTaxDisplayToDefault"/>
91+
<deleteData createDataKey="createSpriteYogaStrapsBundle" stepKey="deleteBundleProduct"/>
92+
<deleteData createDataKey="createYogaStrap6Foot" stepKey="deleteYogaStrap6Foot"/>
93+
<deleteData createDataKey="createYogaStrap8Foot" stepKey="deleteYogaStrap8Foot"/>
94+
<deleteData createDataKey="createYogaStrap10Foot" stepKey="deleteYogaStrap10Foot"/>
95+
<actionGroup ref="AdminDeleteTaxRule" stepKey="deleteTaxRule">
96+
<argument name="taxRuleCode" value="{{defaultTaxRule.code}}"/>
97+
</actionGroup>
98+
<deleteData createDataKey="createUSAllTaxRate20" stepKey="deleteTaxRate"/>
99+
<deleteData createDataKey="category" stepKey="deleteCategory"/>
100+
<actionGroup ref="AdminOpenCmsPageActionGroup" stepKey="navigateToEditHomePageToReset">
101+
<argument name="page_id" value="{{CmsHomePageContent.page_id}}"/>
102+
</actionGroup>
103+
<conditionalClick selector="{{CmsNewPagePageActionsSection.contentSectionName}}" dependentSelector="{{CmsNewPagePageActionsSection.showHideEditor}}" visible="false" stepKey="expandContentSectionIfNotVisibleToReset"/>
104+
<waitForPageLoad stepKey="waitForPageLoadContentSectionToReset"/>
105+
<actionGroup ref="ClickEditWithPageBuilderButtonActionGroup" stepKey="clickEditWithPageBuilderButtonActionGroupToReset"/>
106+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStageToReset">
107+
<argument name="contentType" value="PageBuilderHtmlContentType"/>
108+
</actionGroup>
109+
<actionGroup ref="fillSlideOutPanelTextArea" stepKey="clearRecentlyViewedWidgetsFromCMSContent">
110+
<argument name="property" value="PageBuilderHtmlCmsHomePageContent"/>
111+
</actionGroup>
112+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsBlockAfterReset"/>
113+
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreenAfterReset"/>
114+
<actionGroup ref="AdminSaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPageAfterReset"/>
115+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
116+
</after>
117+
<!-- Step 2:- Create "Recently Viewed Widget" and add it to the home page -->
118+
<actionGroup ref="AdminOpenCmsPageActionGroup" stepKey="navigateToEditHomePage">
119+
<argument name="page_id" value="{{CmsHomePageContent.page_id}}"/>
120+
</actionGroup>
121+
<conditionalClick selector="{{CmsNewPagePageActionsSection.contentSectionName}}" dependentSelector="{{CmsNewPagePageActionsSection.showHideEditor}}" visible="false" stepKey="expandContentSectionIfNotVisible"/>
122+
<waitForPageLoad stepKey="waitForPageLoadContentSection"/>
123+
<actionGroup ref="ClickEditWithPageBuilderButtonActionGroup" stepKey="clickEditWithPageBuilderButtonActionGroup"/>
124+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
125+
<argument name="contentType" value="PageBuilderHtmlContentType"/>
126+
</actionGroup>
127+
<actionGroup ref="AdminSelectRecentlyViewedProductWidgetFromInsertWidgetSlideOutActionGroup" stepKey="insertRecentlyViewedWidget">
128+
<argument name="attributeSelector1" value="show_attributes"/>
129+
<argument name="attributeSelector2" value="show_buttons"/>
130+
<argument name="productAttributeSection1" value="1"/>
131+
<argument name="productAttributeSection2" value="4"/>
132+
<argument name="buttonToShowSection2" value="3"/>
133+
</actionGroup>
134+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsBlock"/>
135+
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen"/>
136+
<actionGroup ref="AdminSaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage"/>
137+
<!-- Step 3:- Create "Catalog Product List Widget" and add it to the home page (for comparison), limit the visible SKU to created bundle product sku -->
138+
<conditionalClick selector="{{CmsNewPagePageActionsSection.contentSectionName}}" dependentSelector="{{CmsNewPagePageActionsSection.showHideEditor}}" visible="false" stepKey="expandContentSectionIfNotVisibleAgain"/>
139+
<waitForPageLoad stepKey="waitForPageLoadContentSectionAgain"/>
140+
<actionGroup ref="ClickEditWithPageBuilderButtonActionGroup" stepKey="clickEditWithPageBuilderButtonActionGroupAgain"/>
141+
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStageAgain">
142+
<argument name="contentType" value="PageBuilderHtmlContentType"/>
143+
</actionGroup>
144+
<actionGroup ref="AdminInsertWidgetToCmsPageContentActionGroup" stepKey="insertCatalogProductsListWidget">
145+
<argument name="widgetType" value="{{CatalogProductsListWidget.type}}"/>
146+
</actionGroup>
147+
<actionGroup ref="AdminFillCatalogProductsListWidgetSkuActionGroup" stepKey="addSkuCondition">
148+
<argument name="sku" value="$$createSpriteYogaStrapsBundle.sku$$"/>
149+
</actionGroup>
150+
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="insertWidget"/>
151+
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsBlockAgain"/>
152+
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreenAgain"/>
153+
<actionGroup ref="AdminSaveAndContinueEditCmsPageActionGroup" stepKey="saveHomePageAfterCatalogProductListWidgetCreation"/>
154+
<!-- Step 4:- Search for "Set of Sprite Yoga Straps" product (the sample grouped product) and add to the cart -->
155+
<actionGroup ref="CliCacheCleanActionGroup" stepKey="flushCache">
156+
<argument name="tags" value="full_page"/>
157+
</actionGroup>
158+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomepage"/>
159+
<waitForElementVisible selector="{{StorefrontCategoryProductSection.widgetProduct($$createSpriteYogaStrapsBundle.name$$)}}" stepKey="waitForProductListWidget"/>
160+
<click selector="{{StorefrontCategoryProductSection.widgetProduct($$createSpriteYogaStrapsBundle.name$$)}}" stepKey="clickOnBundleProductFromWidget"/>
161+
<actionGroup ref="StorefrontAddBundleProductFromProductToCartActionGroup" stepKey="addBundleProductToCart">
162+
<argument name="productName" value="$$createSpriteYogaStrapsBundle.name$$"/>
163+
</actionGroup>
164+
<!-- Step 4 Result:- Verify the price of the "Set of Sprite Yoga Straps" both including and excluding price should be displayed correctly.(including : 15.16 and excluding 14) -->
165+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.includingTaxPrice}}" stepKey="waitForIncludingTaxPrice"/>
166+
<waitForText selector="{{StorefrontProductInfoMainSection.includingTaxPrice}}" userInput="$16.80" stepKey="seeIncludingTaxPrice"/>
167+
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.excludingTaxPrice}}" stepKey="waitForExcludingTaxPrice"/>
168+
<waitForText selector="{{StorefrontProductInfoMainSection.excludingTaxPrice}}" userInput="$14.00" stepKey="seeExcludingTaxPrice"/>
169+
</test>
170+
</tests>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
AdminMenuSystem
22
AdminProductAddFPTValueActionGroup
3+
ClickEditWithPageBuilderButtonActionGroup
4+
fillSlideOutPanelTextArea
5+
saveEditPanelSettings

0 commit comments

Comments
 (0)