Accept the cookie consent banner
Easy25 pts~2 min
- Overlays
- Visibility
- Assertions
Practice app · ShopZone
A full marketplace: two-step sign-in, search with filters and sorting, product pages with tabs, a cart with coupons, and checkout.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
A cookie banner covers the bottom of the page on first visit. Accept all cookies and verify the banner is gone and the preference is recorded.
Your task
- 1Open TEST_URL and wait for the cookie banner (#cookie-banner).
- 2Click “Accept all” (#accept-cookies).
- 3Assert the banner is no longer visible.
- 4Assert the footer #consent-state reads “Cookie preference: accepted”.
Acceptance criteria
- The cookie banner is closed.
- The footer records the accepted preference.
- The test asserts the banner closed.
Fixtures
- buyer@shopzone.test
- Password
- Shop@123
- Account name
- Asha Verma
- Coupon
- SAVE10 (10% off the subtotal)
- Pincodes
- 560001 Bengaluru · 110001 New Delhi · 400001 Mumbai · 600001 Chennai
Playwright · Playwright Challenges · ShopZone