Skip to content

Commit 16326e6

Browse files
committed
MC-41494: Minimum Advertised Price "Popup Text Message" does not displays in cart
1 parent 35399d8 commit 16326e6

File tree

3 files changed

+107
-0
lines changed

3 files changed

+107
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
11+
<actionGroup name="StorefrontCartPageCheckMapMessagePresentAndClickableActionGroup">
12+
<annotations>
13+
<description>
14+
Assert that the MAP message is present on the product listing in the cart, and What's this? link is clickable and bring up the info popup.
15+
</description>
16+
</annotations>
17+
<!-- Confirm that the MAP message and help link are visible -->
18+
<see selector="{{StorefrontCartMapSection.mapNotice}}" userInput="See price before order confirmation." stepKey="seeMsrpNotice"/>
19+
<see selector="{{StorefrontCartMapSection.mapWhatsThis}}" userInput="What's this?" stepKey="seeMsrpNoticeHelpLink"/>
20+
<!-- Confirm that clicking on the 'What's this?' link shows the help popup -->
21+
<click selector="{{StorefrontCartMapSection.mapWhatsThis}}" stepKey="clickOnWhatsThisLink"/>
22+
<waitForElementVisible selector="{{StorefrontCartMapSection.mapWhatsThisPopup}}" stepKey="waitForTheInfoMessage"/>
23+
<!-- Confirm that clicking on X button closes the popup -->
24+
<click selector="{{StorefrontCartMapSection.mapWhatsThisPopupClose}}" stepKey="clickOnCloseInfoMessage"/>
25+
<waitForElementNotVisible selector="{{StorefrontCartMapSection.mapWhatsThisPopup}}" stepKey="waitForTheInfoMessageToClose"/>
26+
</actionGroup>
27+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="StorefrontCartMapSection">
12+
<element name="mapNotice" type="text" selector=".msrp.notice"/>
13+
<element name="mapWhatsThis" type="text" selector=".msrp .action.help.map"/>
14+
<element name="mapWhatsThisPopup" type="text" selector="//div[@id='map-popup-text-what-this']"/>
15+
<element name="mapWhatsThisPopupClose" type="text" selector=".popup button.action.close"/>
16+
</section>
17+
</sections>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
9+
<test name="StorefrontVerifyMopMessagePopupOnCartViewPageTest">
10+
<annotations>
11+
<stories value="Shopping Cart"/>
12+
<features value="Checkout"/>
13+
<title value="Minimum Advertised Price 'What's this?' popup does not displays in cart"/>
14+
<description value="When Minimum Advertised Price (MAP) is enabled and the product has MAP set in Advanced Pricing, click on 'What's this?' at the product listing in the shopping cart must display the popup with the info message."/>
15+
<testCaseId value="MC-41596"/>
16+
<useCaseId value="MC-41494"/>
17+
<severity value="MAJOR"/>
18+
<group value="shoppingCart"/>
19+
<group value="checkout"/>
20+
</annotations>
21+
<before>
22+
<!-- Enable MAP functionality in Magento Instance -->
23+
<createData entity="MsrpEnableMAP" stepKey="enableMAP"/>
24+
<!-- Create product and category -->
25+
<createData entity="_defaultCategory" stepKey="category"/>
26+
<createData entity="SimpleProduct" stepKey="product">
27+
<requiredEntity createDataKey="category"/>
28+
</createData>
29+
</before>
30+
<after>
31+
<!-- Disable MAP functionality in Magento Instance -->
32+
<createData entity="MsrpDisableMAP" stepKey="disableMAP"/>
33+
<!-- Delete product and category -->
34+
<deleteData createDataKey="product" stepKey="deleteSimpleProduct"/>
35+
<deleteData createDataKey="category" stepKey="deleteCategory"/>
36+
</after>
37+
38+
<!-- Add MAP to the newly created product Advanced Pricing -->
39+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
40+
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="openAdminProductEditPage">
41+
<argument name="productId" value="$$product.id$$"/>
42+
</actionGroup>
43+
<actionGroup ref="AdminAddMinimumAdvertisedPriceActionGroup" stepKey="setMapToCreatedProduct">
44+
<argument name="msrpData" value="MsrpBeforeOrderConfirmation"/>
45+
</actionGroup>
46+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProductForm"/>
47+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdmin"/>
48+
49+
<!--Adding the newly created product to shopping cart.-->
50+
<actionGroup ref="StorefrontNavigateToCategoryUrlActionGroup" stepKey="goToCategoryPageOnFrontEnd">
51+
<argument name="categoryUrl" value="$category.custom_attributes[url_key]$"/>
52+
</actionGroup>
53+
<actionGroup ref="StorefrontAddSimpleProductToCartActionGroup" stepKey="addProductToCart">
54+
<argument name="product" value="$product$"/>
55+
</actionGroup>
56+
57+
<!-- Navigate to the cart edit page -->
58+
<actionGroup ref="clickViewAndEditCartFromMiniCartActionGroup" stepKey="goToCartViewAndEditPage"/>
59+
60+
<!-- Check if MAP message and link are present and functioning -->
61+
<actionGroup ref="StorefrontCartPageCheckMapMessagePresentAndClickableActionGroup" stepKey="checkFormMapFunctioning"/>
62+
</test>
63+
</tests>

0 commit comments

Comments
 (0)