Skip to content

Commit b5de0ef

Browse files
ACQE-8575: Verify the price including and excluding tax of Recently Viewed Widget
- Replaced hardcoded values with data entities
1 parent 5b39117 commit b5de0ef

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright 2017 Adobe
4+
* Copyright 2017 Adobe
55
* All Rights Reserved.
66
*/
77
-->

app/code/Magento/Tax/Test/Mftf/Test/StorefrontVerifyRecentlyViewedWidgetTaxPricesTest.xml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
/**
4-
* Copyright 2025 Adobe
4+
* Copyright 2025 Adobe
55
* All Rights Reserved.
66
*/
77
-->
@@ -12,7 +12,7 @@
1212
<annotations>
1313
<features value="Tax"/>
1414
<stories value="Recently Viewed Widget Tax Price Display"/>
15-
<title value="Verify price including and excluding tax in Recently Viewed Widget"/>
15+
<title value="Display tax inclusive and exclusive prices in Recently Viewed Widget"/>
1616
<description value="Verify that Recently Viewed Widget displays correct prices including and excluding tax based on tax configuration"/>
1717
<severity value="AVERAGE"/>
1818
<testCaseId value="AC-8327"/>
@@ -75,7 +75,7 @@
7575
<magentoCLI command="config:set {{CustomDisplayProductPricesInCatalog.path}} {{CustomDisplayProductPricesInCatalog.value}}" stepKey="setPriceDisplayToBothPrices"/>
7676
</before>
7777
<after>
78-
<magentoCLI command="config:set tax/display/type 1" stepKey="resetTaxDisplayToDefault"/>
78+
<magentoCLI command="config:set {{DisplayProductPricesInCatalog.path}} {{DisplayProductPricesInCatalog.value}}" stepKey="resetTaxDisplayToDefault"/>
7979
<deleteData createDataKey="createSpriteYogaStrapsBundle" stepKey="deleteBundleProduct"/>
8080
<deleteData createDataKey="createYogaStrap6Foot" stepKey="deleteYogaStrap6Foot"/>
8181
<deleteData createDataKey="createYogaStrap8Foot" stepKey="deleteYogaStrap8Foot"/>
@@ -89,7 +89,7 @@
8989
<argument name="page_id" value="{{CmsHomePageContent.page_id}}"/>
9090
</actionGroup>
9191
<conditionalClick selector="{{CmsNewPagePageActionsSection.contentSectionName}}" dependentSelector="{{CmsNewPagePageActionsSection.showHideEditor}}" visible="false" stepKey="expandContentSectionIfNotVisibleToReset"/>
92-
<waitForPageLoad time="30" stepKey="waitForPageLoadContentSectionToReset"/>
92+
<waitForPageLoad stepKey="waitForPageLoadContentSectionToReset"/>
9393
<actionGroup ref="ClickEditWithPageBuilderButtonActionGroup" stepKey="clickEditWithPageBuilderButtonActionGroupToReset"/>
9494
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStageToReset">
9595
<argument name="contentType" value="PageBuilderHtmlContentType"/>
@@ -99,15 +99,14 @@
9999
</actionGroup>
100100
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsBlockAfterReset"/>
101101
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreenAfterReset"/>
102-
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPageAfterReset"/>
103102
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
104103
</after>
105104
<!-- Step 2:- Create "Recently Viewed Widget" and add it to the home page -->
106105
<actionGroup ref="AdminOpenCmsPageActionGroup" stepKey="navigateToEditHomePage">
107106
<argument name="page_id" value="{{CmsHomePageContent.page_id}}"/>
108107
</actionGroup>
109108
<conditionalClick selector="{{CmsNewPagePageActionsSection.contentSectionName}}" dependentSelector="{{CmsNewPagePageActionsSection.showHideEditor}}" visible="false" stepKey="expandContentSectionIfNotVisible"/>
110-
<waitForPageLoad time="30" stepKey="waitForPageLoadContentSection"/>
109+
<waitForPageLoad stepKey="waitForPageLoadContentSection"/>
111110
<actionGroup ref="ClickEditWithPageBuilderButtonActionGroup" stepKey="clickEditWithPageBuilderButtonActionGroup"/>
112111
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
113112
<argument name="contentType" value="PageBuilderHtmlContentType"/>
@@ -121,24 +120,23 @@
121120
</actionGroup>
122121
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsBlock"/>
123122
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen"/>
124-
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage"/>
123+
<actionGroup ref="AdminSaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage"/>
125124
<!-- 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 -->
126125
<conditionalClick selector="{{CmsNewPagePageActionsSection.contentSectionName}}" dependentSelector="{{CmsNewPagePageActionsSection.showHideEditor}}" visible="false" stepKey="expandContentSectionIfNotVisibleAgain"/>
127-
<waitForPageLoad time="30" stepKey="waitForPageLoadContentSectionAgain"/>
126+
<waitForPageLoad stepKey="waitForPageLoadContentSectionAgain"/>
128127
<actionGroup ref="ClickEditWithPageBuilderButtonActionGroup" stepKey="clickEditWithPageBuilderButtonActionGroupAgain"/>
129128
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStageAgain">
130129
<argument name="contentType" value="PageBuilderHtmlContentType"/>
131130
</actionGroup>
132131
<actionGroup ref="AdminInsertWidgetToCmsPageContentActionGroup" stepKey="insertCatalogProductsListWidget">
133-
<argument name="widgetType" value="Catalog Products List"/>
132+
<argument name="widgetType" value="{{CatalogProductsListWidget.type}}"/>
134133
</actionGroup>
135134
<actionGroup ref="AdminFillCatalogProductsListWidgetSkuActionGroup" stepKey="addSkuCondition">
136135
<argument name="sku" value="$$createSpriteYogaStrapsBundle.sku$$"/>
137136
</actionGroup>
138137
<actionGroup ref="AdminClickInsertWidgetActionGroup" stepKey="insertWidget"/>
139138
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsBlockAgain"/>
140139
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreenAgain"/>
141-
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPageAgain"/>
142140
<actionGroup ref="AdminSaveAndContinueEditCmsPageActionGroup" stepKey="saveHomePageAfterCatalogProductListWidgetCreation"/>
143141
<!-- Step 4:- Search for "Set of Sprite Yoga Straps" product (the sample grouped product) and add to the cart -->
144142
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
@@ -148,10 +146,10 @@
148146
<argument name="tags" value="full_page"/>
149147
</actionGroup>
150148
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomepage"/>
151-
<waitForElementVisible selector="{{StorefrontWidgetsSection.widgetProductsGrid}}" stepKey="waitForProductListWidget"/>
152-
<click selector="{{StorefrontWidgetsSection.widgetProductsGrid}} .product-item-link[title*='Set of Sprite Yoga Straps']" stepKey="clickOnBundleProductFromWidget"/>
149+
<waitForElementVisible selector="{{StorefrontCategoryProductSection.widgetProduct($$createSpriteYogaStrapsBundle.name$$)}}" stepKey="waitForProductListWidget"/>
150+
<click selector="{{StorefrontCategoryProductSection.widgetProduct($$createSpriteYogaStrapsBundle.name$$)}}" stepKey="clickOnBundleProductFromWidget"/>
153151
<actionGroup ref="StorefrontAddBundleProductFromProductToCartActionGroup" stepKey="addBundleProductToCart">
154-
<argument name="productName" value="Set of Sprite Yoga Straps"/>
152+
<argument name="productName" value="$$createSpriteYogaStrapsBundle.name$$"/>
155153
</actionGroup>
156154
<!-- 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) -->
157155
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.includingTaxPrice}}" stepKey="waitForIncludingTaxPrice"/>

0 commit comments

Comments
 (0)