test(e2e): scroll a long list, and wait out the popup crossfade #167

Merged
tudor merged 1 commits from fix/e2e-after-half-mile-default into main 2026-10-01 21:22:34 +00:00
Owner

Fixes the six E2E journeys that failed on main after #165 and #166 (run on 29b5f85). Test-only change; the app is behaving correctly.

Pinned toolbar (desktop + phones at 360/390/402/430)
These journeys type B1 1BB and then scroll the list to check that the toolbar stays pinned. At the new 0.5-mile default that search returns 2 schools (26 at 1 mile). The desktop page can only scroll to scrollY 229, and on phones the scroll runs into the footer, which carries the sticky toolbar away with its container. The tests now open /?postcode=B1%201BB&radius=1 (LONG_LIST), since a long list is what they measure. The typed search and the 0.5 default stay covered by "searching by postcode returns nearby schools".

Desktop map popup (strict mode: 2 × .sc-popup)
Leaflet crossfades popups over 200ms. Measured on staging after picking a second school: 2 popups at opacity 1/0 → 0.08/0.92, then 1 popup at ~220ms. A strict locator fails immediately instead of retrying, so toContainText failed when it landed in that window. The test now waits for toHaveCount(1) before reading the popup, at both popup steps.

Verification (against staging)

  • The 8 affected/related journeys pass.
  • The desktop map journey passes 8/8 with --repeat-each=8.
  • Full suite: 118 passed, 16 skipped, 0 failed.

🤖 Generated with Claude Code

Fixes the six E2E journeys that failed on main after #165 and #166 (run on 29b5f85). Test-only change; the app is behaving correctly. **Pinned toolbar (desktop + phones at 360/390/402/430)** These journeys type `B1 1BB` and then scroll the list to check that the toolbar stays pinned. At the new 0.5-mile default that search returns 2 schools (26 at 1 mile). The desktop page can only scroll to `scrollY` 229, and on phones the scroll runs into the footer, which carries the sticky toolbar away with its container. The tests now open `/?postcode=B1%201BB&radius=1` (`LONG_LIST`), since a long list is what they measure. The typed search and the 0.5 default stay covered by "searching by postcode returns nearby schools". **Desktop map popup (strict mode: 2 × `.sc-popup`)** Leaflet crossfades popups over 200ms. Measured on staging after picking a second school: 2 popups at opacity `1/0` → `0.08/0.92`, then 1 popup at ~220ms. A strict locator fails immediately instead of retrying, so `toContainText` failed when it landed in that window. The test now waits for `toHaveCount(1)` before reading the popup, at both popup steps. **Verification (against staging)** - The 8 affected/related journeys pass. - The desktop map journey passes 8/8 with `--repeat-each=8`. - Full suite: 118 passed, 16 skipped, 0 failed. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
tudor added 1 commit 2026-10-01 20:43:07 +00:00
test(e2e): scroll a long list, and wait out the popup crossfade
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 1m17s
PR Checks / Backend Smoke (pull_request) Successful in 11s
PR Checks / Build Backend (no push) (pull_request) Successful in 19s
PR Checks / Build Frontend (no push) (pull_request) Successful in 1m31s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 12s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 13s
e7645d1ba5
The pinned-toolbar journeys scrolled the results of a typed B1 1BB search.
At the new half-mile default that is two schools, so the page ended before
the toolbar had anything to stay pinned over (desktop scrollY stopped at
229; on phones the scroll reached the footer). They now open the search
at a mile, which is what they were measuring.

Leaflet crossfades popups for 200ms, so for that window there are two
.sc-popup elements, and a strict locator fails at once rather than
retrying. Wait for one popup before reading it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

🤖 AI Code Review (Claude Code)

Test-only change to the Playwright e2e journeys. It introduces a LONG_LIST constant (postcode B1 1BB at a 1-mile radius) so the scroll-related tests have enough results now that the default radius is half a mile. It also adds waits for Leaflet's popup crossfade to settle so only one popup exists before the content assertions. The change looks healthy and has no production impact.

✅ No issues found.

## 🤖 AI Code Review (Claude Code) Test-only change to the Playwright e2e journeys. It introduces a LONG_LIST constant (postcode B1 1BB at a 1-mile radius) so the scroll-related tests have enough results now that the default radius is half a mile. It also adds waits for Leaflet's popup crossfade to settle so only one popup exists before the content assertions. The change looks healthy and has no production impact. ✅ No issues found.
tudor merged commit 4b54c25943 into main 2026-10-01 21:22:34 +00:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tudor/school_compare#167