Skip to content

Commit 4474d5a

Browse files
committed
MC-41853: Related Products are not showing the Correct MAP Price
1 parent 2b39e6c commit 4474d5a

File tree

2 files changed

+19
-32
lines changed

2 files changed

+19
-32
lines changed

app/code/Magento/Msrp/Test/Mftf/ActionGroup/StorefrontConfigurableProductCheckMapActionGroup.xml

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,18 @@
1313
<description>Check MAP of configurable product options on store-front.</description>
1414
</annotations>
1515
<arguments>
16-
<argument name="configProductUrlKey" type="string"/>
17-
<argument name="productMap1" type="string"/>
18-
<argument name="productMap2" type="string"/>
19-
<argument name="productAttributeOptionValue2" type="string"/>
20-
<argument name="productAttributeOptionValue1" type="string"/>
16+
<argument name="productMap" type="string"/>
17+
<argument name="productAttributeOptionValue" type="string"/>
2118
</arguments>
2219

23-
<!--Go to store front and check map for products-->
24-
<amOnPage url="{{StorefrontProductPage.url(configProductUrlKey)}}" stepKey="navigateToConfigProductPage"/>
25-
<waitForPageLoad stepKey="waitForLoadConfigProductPage"/>
26-
27-
<!--Check msrp for second child product-->
28-
<selectOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="{{productAttributeOptionValue2}}" stepKey="selectSecondOption"/>
20+
<!--Check msrp for configurable product option -->
21+
<selectOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="{{productAttributeOptionValue}}" stepKey="selectOption"/>
2922
<waitForElement selector="{{StorefrontProductInfoMainSection.mapPrice}}" stepKey="waitForLoad"/>
30-
<grabTextFrom selector="{{StorefrontProductInfoMainSection.mapPrice}}" stepKey="grabSecondProductMapPrice"/>
31-
<assertEquals stepKey="assertSecondProductMapPrice">
32-
<actualResult type="const">($grabSecondProductMapPrice)</actualResult>
33-
<expectedResult type="string">${{productMap2}}</expectedResult>
34-
</assertEquals>
35-
<seeElement selector="{{StorefrontProductInfoMainSection.clickForPriceLink}}" stepKey="checkClickForPriceLinkForSecondProduct"/>
36-
37-
<!--Check msrp for first child product-->
38-
<selectOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" userInput="{{productAttributeOptionValue1}}" stepKey="selectFirstOption"/>
39-
<waitForElement selector="{{StorefrontProductInfoMainSection.mapPrice}}" stepKey="waitForLoad1"/>
40-
<grabTextFrom selector="{{StorefrontProductInfoMainSection.mapPrice}}" stepKey="grabFirstProductMapPrice"/>
41-
<assertEquals stepKey="assertFirstProductMapPrice">
42-
<actualResult type="const">($grabFirstProductMapPrice)</actualResult>
43-
<expectedResult type="string">${{productMap1}}</expectedResult>
23+
<grabTextFrom selector="{{StorefrontProductInfoMainSection.mapPrice}}" stepKey="grabProductMapPrice"/>
24+
<assertEquals stepKey="assertProductMapPrice">
25+
<actualResult type="const">($grabProductMapPrice)</actualResult>
26+
<expectedResult type="string">${{productMap}}</expectedResult>
4427
</assertEquals>
45-
<seeElement selector="{{StorefrontProductInfoMainSection.clickForPriceLink}}" stepKey="checkClickForPriceLinkForFirstProduct"/>
28+
<seeElement selector="{{StorefrontProductInfoMainSection.clickForPriceLink}}" stepKey="checkClickForPriceLinkForProduct"/>
4629
</actionGroup>
4730
</actionGroups>

app/code/Magento/Msrp/Test/Mftf/Test/StorefrontConfigurableProductWithMapAndRelatedProductTest.xml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,16 +136,20 @@
136136
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButtonRelatedProduct"/>
137137

138138
<!--Go to store front and check msrp for products-->
139+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductPage">
140+
<argument name="productUrlKey" value="$$createConfigProduct.custom_attributes[url_key]$$"/>
141+
</actionGroup>
142+
<actionGroup ref="StorefrontConfigurableProductCheckMapActionGroup" stepKey="checkMapForConfigurableProductOption2">
143+
<argument name="productMap" value="{{SimpleProductMap2.price}}"/>
144+
<argument name="productAttributeOptionValue" value="$$getConfigAttributeOption2.value$$"/>
145+
</actionGroup>
139146
<actionGroup ref="StorefrontConfigurableProductCheckMapActionGroup" stepKey="checkMapForConfigurableProduct">
140-
<argument name="configProductUrlKey" value="$$createConfigProduct.custom_attributes[url_key]$$"/>
141-
<argument name="productMap1" value="{{SimpleProductMap1.price}}"/>
142-
<argument name="productAttributeOptionValue1" value="$$getConfigAttributeOption1.value$$"/>
143-
<argument name="productMap2" value="{{SimpleProductMap2.price}}"/>
144-
<argument name="productAttributeOptionValue2" value="$$getConfigAttributeOption2.value$$"/>
147+
<argument name="productMap" value="{{SimpleProductMap1.price}}"/>
148+
<argument name="productAttributeOptionValue" value="$$getConfigAttributeOption1.value$$"/>
145149
</actionGroup>
146150

147151
<!--Check related product map price -->
148-
<actionGroup ref="StorefrontAssertRelatedProductMapOnProductPageActionGroup" stepKey="checkMapForRelatedProduct">
152+
<actionGroup ref="StorefrontAssertRelatedProductMapOnProductPageActionGroup" stepKey="checkMapForRelatedProductOption1">
149153
<argument name="relatedProductMap" value="{{SimpleProductMap3.price}}"/>
150154
<argument name="productName" value="$createRelatedProduct.name$"/>
151155
</actionGroup>

0 commit comments

Comments
 (0)