Skip to content

Commit 0cea458

Browse files
committed
ACQE-8251: Verify wish list count displayed on homepage except wish list page in customer menu.
- Add multiple products to wishlist, handle user input data, and update description.
1 parent 13ae3fb commit 0cea458

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

app/code/Magento/Wishlist/Test/Mftf/Data/WishlistData.xml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
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
-->
88

@@ -61,4 +61,7 @@
6161
<data key="path">rss/wishlist/active</data>
6262
<data key="value">1</data>
6363
</entity>
64+
<entity name="NumberOfItems">
65+
<data key="item">2 items</data>
66+
</entity>
6467
</entities>

app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontVerifyTheWishlistCountDisplayedInTheHomePageCustomerMenuTest.xml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,23 @@
55
* All Rights Reserved.
66
*/
77
-->
8+
89
<tests
910
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1011
<test name="StorefrontVerifyTheWishlistCountDisplayedInTheHomePageCustomerMenuTest">
1112
<annotations>
1213
<features value="Wishlist"/>
1314
<stories value="Wishlist count"/>
1415
<title value="Wishlist count in menu"/>
15-
<description value="Verify wishlist count displayed on homepage customer menu."/>
16+
<description value="Validate wishlist count on homepage matches actual wishlist items."/>
1617
<severity value="MAJOR"/>
1718
<testCaseId value="AC-15274"/>
1819
<group value="wishlist"/>
1920
</annotations>
2021
<before>
21-
<!-- Pre-condition 1,2: Create product, customer -->
22+
<!-- Pre-condition 1,2: Create products, customer -->
2223
<createData entity="SimpleProduct" stepKey="createProduct"/>
24+
<createData entity="_defaultProduct" stepKey="createSimpleProduct"/>
2325
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
2426
</before>
2527
<after>
@@ -41,15 +43,22 @@
4143
<actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToWishlistProduct">
4244
<argument name="productVar" value="$createProduct$"/>
4345
</actionGroup>
46+
<!-- Open second product page -->
47+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openTheProductPage">
48+
<argument name="productUrl" value="$$createSimpleProduct.custom_attributes[url_key]$$"/>
49+
</actionGroup>
50+
<!-- Step 2: Add second product to wishlist -->
51+
<actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToTheWishlistProduct">
52+
<argument name="productVar" value="$createSimpleProduct$"/>
53+
</actionGroup>
4454
<!-- Step 3: Navigate to Store front home page-->
4555
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
46-
<waitForPageLoad stepKey="waitToLoadHomePage"/>
4756
<!-- Step 4: Click on customer menu-->
4857
<waitForElementClickable selector="{{LoggedInCustomerHeaderLinksSection.customerDropdownMenu}}" stepKey="waitToOpenCustomerDropdownMenu"/>
4958
<click selector="{{LoggedInCustomerHeaderLinksSection.customerDropdownMenu}}" stepKey="openCustomerDropdownMenu"/>
5059
<waitForPageLoad stepKey="waitToLoadCustomerDropdownMenu"/>
5160
<!-- Step 4 assertion: The wishlist item count should display-->
5261
<waitForElementVisible selector="{{StorefrontCustomerWishlistProductSection.wishListLink}}" stepKey="wishListLink"/>
53-
<waitForText userInput="1 item" selector="{{StorefrontCustomerWishlistProductSection.wishListCount}}" stepKey="seeWishListCount"/>
62+
<waitForText userInput="{{NumberOfItems.item}}" selector="{{StorefrontCustomerWishlistProductSection.wishListCount}}" stepKey="seeWishListCount"/>
5463
</test>
5564
</tests>

0 commit comments

Comments
 (0)