|
5 | 5 | * All Rights Reserved. |
6 | 6 | */ |
7 | 7 | --> |
| 8 | + |
8 | 9 | <tests |
9 | 10 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
10 | 11 | <test name="StorefrontVerifyTheWishlistCountDisplayedInTheHomePageCustomerMenuTest"> |
11 | 12 | <annotations> |
12 | 13 | <features value="Wishlist"/> |
13 | 14 | <stories value="Wishlist count"/> |
14 | 15 | <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."/> |
16 | 17 | <severity value="MAJOR"/> |
17 | 18 | <testCaseId value="AC-15274"/> |
18 | 19 | <group value="wishlist"/> |
19 | 20 | </annotations> |
20 | 21 | <before> |
21 | | - <!-- Pre-condition 1,2: Create product, customer --> |
| 22 | + <!-- Pre-condition 1,2: Create products, customer --> |
22 | 23 | <createData entity="SimpleProduct" stepKey="createProduct"/> |
| 24 | + <createData entity="_defaultProduct" stepKey="createSimpleProduct"/> |
23 | 25 | <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
24 | 26 | </before> |
25 | 27 | <after> |
|
41 | 43 | <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToWishlistProduct"> |
42 | 44 | <argument name="productVar" value="$createProduct$"/> |
43 | 45 | </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> |
44 | 54 | <!-- Step 3: Navigate to Store front home page--> |
45 | 55 | <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/> |
46 | | - <waitForPageLoad stepKey="waitToLoadHomePage"/> |
47 | 56 | <!-- Step 4: Click on customer menu--> |
48 | 57 | <waitForElementClickable selector="{{LoggedInCustomerHeaderLinksSection.customerDropdownMenu}}" stepKey="waitToOpenCustomerDropdownMenu"/> |
49 | 58 | <click selector="{{LoggedInCustomerHeaderLinksSection.customerDropdownMenu}}" stepKey="openCustomerDropdownMenu"/> |
50 | 59 | <waitForPageLoad stepKey="waitToLoadCustomerDropdownMenu"/> |
51 | 60 | <!-- Step 4 assertion: The wishlist item count should display--> |
52 | 61 | <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"/> |
54 | 63 | </test> |
55 | 64 | </tests> |
0 commit comments