Skip to content

Commit bdadf7b

Browse files
committed
ACQE-8835: Validate price on frontend product search and product details pages.
- Removed the created action group, added an existing action group to set catalog price scope, and removed reindex and cache flush in the test file.
1 parent 19bfad9 commit bdadf7b

File tree

2 files changed

+7
-44
lines changed

2 files changed

+7
-44
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSetCatalogPriceScopeCliActionGroup.xml

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

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontValidatePriceTest.xml

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<features value="Catalog"/>
1313
<stories value="Validate Price in frontend product search and product details pages"/>
1414
<title value="Product price validation"/>
15-
<description value=" This test case verifies price in frontend product search and product details pages based on catalog price scope"/>
15+
<description value="This test case verifies price in frontend product search and product details pages based on catalog price scope"/>
1616
<severity value="MAJOR"/>
1717
<testCaseId value="AC-3183"/>
1818
<group value="catalog"/>
@@ -56,23 +56,15 @@
5656
</before>
5757
<after>
5858
<!-- Logout from customer, delete product, customer, website -->
59+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
5960
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
6061
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
6162
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
6263
<argument name="websiteName" value="{{customWebsite.name}}"/>
6364
</actionGroup>
6465
</after>
6566
<!-- Step-1: Set catalog price scope to website -->
66-
<actionGroup ref="AdminSetCatalogPriceScopeCliActionGroup" stepKey="setScopeWebsite">
67-
<argument name="scopeValue" value="1" />
68-
</actionGroup>
69-
<!-- Step 2: Reindex and cache clear -->
70-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindex">
71-
<argument name="indices" value=""/>
72-
</actionGroup>
73-
<actionGroup ref="CliCacheFlushActionGroup" stepKey="cleanCache">
74-
<argument name="tags" value=""/>
75-
</actionGroup>
67+
<actionGroup ref="AdminSetCatalogPriceToWebsiteActionGroup" stepKey="setPriceScopeWebsite"/>
7668
<!-- Step 3: Open created product and assign to website-->
7769
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openProductEdit">
7870
<argument name="productId" value="$createProduct.id$"/>
@@ -85,7 +77,7 @@
8577
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openTheProductEdit">
8678
<argument name="productId" value="$createProduct.id$"/>
8779
</actionGroup>
88-
<actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="SwitchDefaultStoreView">
80+
<actionGroup ref="SwitchToTheNewStoreViewActionGroup" stepKey="switchDefaultStoreView">
8981
<argument name="storeViewName" value="'Default Store View'"/>
9082
</actionGroup>
9183
<waitForElementVisible selector="{{AdminProductFormSection.productPrice}}" stepKey="waitForProductPriceField"/>
@@ -115,22 +107,13 @@
115107
<argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/>
116108
</actionGroup>
117109
<waitForText userInput="$200.00" selector="{{StorefrontProductInfoMainSection.price}}" stepKey="seeWebsiteScopeProductPrice"/>
118-
<!-- Step 7: Set catalog price scope to website -->
119-
<actionGroup ref="AdminSetCatalogPriceScopeCliActionGroup" stepKey="setScopeGlobal">
120-
<argument name="scopeValue" value="0" />
121-
</actionGroup>
122-
<!-- Step 8: Reindex and cache clear -->
123-
<actionGroup ref="CliIndexerReindexActionGroup" stepKey="reindexing">
124-
<argument name="indices" value=""/>
125-
</actionGroup>
126-
<actionGroup ref="CliCacheFlushActionGroup" stepKey="cacheClean">
127-
<argument name="tags" value=""/>
128-
</actionGroup>
110+
<!-- Step 7: Set catalog price scope to website -->
111+
<actionGroup ref="AdminSetDefaultCatalogPriceActionGroup" stepKey="setScopeGlobal"/>
129112
<!--Step 9: Login as customer to storefront and verify global scope product price is displayed in catalog search results page and product details page -->
130113
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="searchByProductName">
131114
<argument name="phrase" value="$createProduct.name$"/>
132115
</actionGroup>
133-
<waitForPageLoad stepKey="waitSearchResult" />
116+
<waitForPageLoad stepKey="waitSearchResult"/>
134117
<waitForText selector="{{StorefrontCategoryMainSection.productPrice}}" userInput="$100.00" stepKey="seeGlobalPrice"/>
135118
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openTheProductPage">
136119
<argument name="productUrl" value="$createProduct.custom_attributes[url_key]$"/>

0 commit comments

Comments
 (0)