|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright 2025 Adobe |
| 5 | + * All Rights Reserved. |
| 6 | + */ |
| 7 | +--> |
| 8 | +<tests |
| 9 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 10 | + <test name="StorefrontVerifyTheWishlistCountDisplayedInTheHomePageCustomerMenuTest"> |
| 11 | + <annotations> |
| 12 | + <features value="Wishlist"/> |
| 13 | + <stories value="Wishlist count"/> |
| 14 | + <title value="Wishlist count in menu"/> |
| 15 | + <description value="Verify wishlist count displayed on homepage customer menu."/> |
| 16 | + <severity value="MAJOR"/> |
| 17 | + <testCaseId value="AC-15274"/> |
| 18 | + <group value="wishlist"/> |
| 19 | + </annotations> |
| 20 | + <before> |
| 21 | + <!-- Pre-condition 1: Create product--> |
| 22 | + <createData entity="SimpleProduct" stepKey="createProduct"/> |
| 23 | + <!-- Pre-condition 2: Create customer--> |
| 24 | + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> |
| 25 | + </before> |
| 26 | + <after> |
| 27 | + <!-- Logout from storefront--> |
| 28 | + <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> |
| 29 | + <!-- Delete product, customer --> |
| 30 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 31 | + <deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> |
| 32 | + </after> |
| 33 | + <!-- Step 1:Log in as a customer on storefront. --> |
| 34 | + <actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> |
| 35 | + <argument name="Customer" value="$createCustomer$"/> |
| 36 | + </actionGroup> |
| 37 | + <!-- Open product page --> |
| 38 | + <actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage"> |
| 39 | + <argument name="productUrl" value="$$createProduct.custom_attributes[url_key]$$"/> |
| 40 | + </actionGroup> |
| 41 | + <!-- Step 2: Add product to wishlist --> |
| 42 | + <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToWishlistProduct"> |
| 43 | + <argument name="productVar" value="$createProduct$"/> |
| 44 | + </actionGroup> |
| 45 | + <!-- Step 3: Navigate to Store front home page--> |
| 46 | + <actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/> |
| 47 | + <waitForPageLoad stepKey="waitToLoadHomePage"/> |
| 48 | + <!-- Step 4: Click on customer menu--> |
| 49 | + <waitForElementClickable selector="{{LoggedInCustomerHeaderLinksSection.customerDropdownMenu}}" stepKey="waitToOpenCustomerDropdownMenu"/> |
| 50 | + <click selector="{{LoggedInCustomerHeaderLinksSection.customerDropdownMenu}}" stepKey="openCustomerDropdownMenu"/> |
| 51 | + <!-- Step 4 assertion:The wishlist item count should display--> |
| 52 | + <waitForElementVisible selector="{{StorefrontCustomerWishlistProductSection.wishListLink}}" stepKey="wishListLink"/> |
| 53 | + <waitForText userInput="1 item" selector="{{StorefrontCustomerWishlistProductSection.wishListCount}}" stepKey="seeWishListCount"/> |
| 54 | + </test> |
| 55 | +</tests> |
0 commit comments