Skip to content

Refactor Playwright component tests around SQL fixtures - #1410

Merged
lovasoa merged 3 commits into
mainfrom
test/playwright-fixture-harness
Aug 30, 2026
Merged

lovasoa merged 3 commits into
mainfrom
test/playwright-fixture-harness

Conversation

@lovasoa

@lovasoa lovasoa commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a shared Playwright harness that opens each suite's SQL fixture, checks response/render errors, waits for component initialization, and reports uncaught page errors
  • move chart and map behavior tests to deterministic fixtures/<suite>/{index.sql,test.ts} applications rendered through SQLPage instead of injecting synthetic DOM or calling private initializers
  • separate fixture and official-site Playwright projects, start the fixture server locally and in CI, and document the convention in CONTRIBUTING.md and AGENTS.md
  • use configured baseURL values for the remaining official-site smoke tests

Why

This follows Playwright's recommendations to test user-visible behavior, isolate tests, use locators and web-first assertions, and avoid timing-based waits. It also exercises SQLPage's real SQL-to-template-to-initialization path, so component tests cannot silently drift from production markup.

The diff is +42 lines overall. The small increase buys explicit SQL applications, server configuration, automatic health/error checks, and contributor documentation; the chart suite itself is shorter, and the map suite replaces a fixed 500 ms sleep with deterministic outcome waits.

Validation

  • npm run format
  • npm test
  • npm run test in tests/end-to-end (70 passed)
  • CI=1 npx playwright test --project=fixtures --reporter=line (40 passed, one worker)

actionlint was unavailable locally.

@lovasoa
lovasoa merged commit 7eb830b into main Aug 30, 2026
51 checks passed
@lovasoa
lovasoa deleted the test/playwright-fixture-harness branch August 30, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant