Playwright

Verify the live result count in the filters dialog

Medium55 pts~2 min
  • Modals
  • Radio buttons
  • Checkboxes
  • Dynamic text
Practice app · StayNest

A home-sharing marketplace: destination autocomplete, a two-month date-range calendar, a guests popover with steppers, results with a list/map toggle and a filters modal, listing pages with a photo gallery, a reserve card with a price breakdown, host profiles in a new tab, a wishlist that needs sign-in and a message-host form.

Test URL
/lab/playwright-staynest-filters-live-count

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Narrow the Banff stays in the filters dialog, verifying that the “Show N stays” button updates after every change, and apply the filters.

Your task

  1. 1Open TEST_URL and open Banff from “Inspiration for your next trip” ([data-testid="destination-tile"][data-destination="banff"]).
  2. 2Click Filters (#filters-button) and assert the footer button #filters-apply reads “Show 4 stays”.
  3. 3Choose Entire place (#type-entire) and assert the button updates to “Show 3 stays”.
  4. 4Tick Hot tub (#amenity-hottub) and assert “Show 2 stays”; then type 300 into the maximum price #price-max and assert “Show 1 stay”.
  5. 5Click #filters-apply and assert the dialog closes, only the Spruce Ridge Cabin card (data-listing-id="banff-spruce-cabin") remains and #filters-count shows 3.

Acceptance criteria

  • The filters dialog is closed.
  • Exactly one stay, Spruce Ridge Cabin, is listed and the summary says 1 stay.
  • The Filters button shows 3 active filters.
  • The test asserts the live count at least three times.

Fixtures

Email
guest@staynest.test
Password
Nest@2026
Account name
Jordan Lee
Today
Tuesday, 10 November 2026 (earlier days are disabled)
Destinations
Goa · Lisbon · Kyoto · Banff · Cape Town
Service fee
14% of the nightly subtotal
Guest limits
Adults 1–16 (adults + children ≤ 16) · infants up to 5 · pets up to 5
Host verification code
Shown only on the host profile tab

Playwright · Playwright Challenges · StayNest