Searching a website is an everyday action for most internet users. For most services, the speed at which their customers are able to get to the products they are looking for is directly tied to revenue. To enable that, a performant and reliable search function is needed.Documentation Index
Fetch the complete documentation index at: https://checkly-422f444a-sync-playwright-reporter-changelog-v1-5-0.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Steps
The example below, which is running against our test webshop, shows how we can verify the correctness of a search’s result from an end-to-end perspective. In short, we will:- Enter a known search term
- Firstly, assert the expected number of results is being shown
- If the previous point is true, assert that all expected search results are shown
search.spec.ts
When testing search on large sets of data, you might additionally need to handle result pagination, together with the possibility of duplicate results.
Takeaways
- Moving test data to a separate file can help when running more thorough comparisons.
- Assertion libraries help us cleanly verify multiple constraints in our test.
Bugs don’t stop at CI/CD. Why would Playwright? 
Sign up and start using Playwright for end-to-end monitoring with Checkly.