Generate multiple search results
Befehl: cy.ttSearchForMultipleResults()
Magento shops often offer an extensive product portfolio. This Cypress test checks whether the search function of a Magento shop works correctly when entering a search term that leads to multiple results. The test performs a search and then validates whether the search results page displays multiple products that match the term entered. This confirms that the search function works effectively and provides relevant results for user queries.
Validate search without results
Befehl: cy.ttSearchForNoResults()
It is equally important that a search without relevant products reflects this correctly. This Cypress test validates the behaviour of the search function in a Magento shop when the search returns no results. The test simulates a user search with a search term that is expected to return no product matches. It then checks that the page displays an appropriate message telling the user that no products have been found. This is important to ensure a good user experience by providing clear feedback when there are no search results.