Playwright E2E testing patterns — web-first assertions, user-visible locators, network interception, fixtures, authentication, and parallel execution
98
99%
Does it follow best practices?
Impact
98%
1.81xAverage score across 5 eval scenarios
Passed
No known issues
An online store has a product catalog page with search and filtering capabilities. Write Playwright E2E tests.
The app runs on http://localhost:3000 with this page:
/products -- displays a grid of product cards with:
API endpoints:
GET /api/products?q=&category=&sort=&page= -- returns paginated productsPOST /api/cart -- adds item to cartThe page loads 12 products initially and 12 more on each "Load more" click.
Produce:
playwright.config.ts -- Playwright configuratione2e/products.spec.ts -- E2E test filepackage.json -- with @playwright/test dependency listedYou may create additional files for good test organization.