Drop system tests: adopt Rails 8 endpoint-first testing philosophy #63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Repo
ldraney/landscaping-assistant
User Story
As a developer, I want the CI pipeline to pass reliably without browser-based system tests, so that PRs merge without flaky Chromium timeouts on a resource-constrained worker.
Context
System tests (Capybara + Cuprite + headless Chromium) break the CI pipeline. Chromium fails to produce a websocket URL within timeout during
reset!calls between tests. Every pipeline since PR #54 introduced system tests has failed. The 7 system tests verify Stimulus controller wiring (CSS class toggles, DOM element visibility) — thin JS glue, not business logic.Rails 8 no longer generates system tests by default. The official guide says: "System tests should be reserved for critical user paths. For most features, integration tests provide a better balance." In a Hotwire app, the server IS the frontend — request specs verify endpoint responses, which is the app's responsibility. Whether Turbo applies those responses correctly is the framework's responsibility.
File Targets
Gemfile— removecupritegemGemfile.lock— regenerate without cuprite/ferrum.woodpecker.yaml— remove chromium install, CHROMIUM_PATH, FERRUM_PROCESS_TIMEOUTspec/system/— delete directory (3 files, 7 examples)spec/support/system_test_config.rb— delete Cuprite driver configdocs/testing-strategy.md— rewrite with endpoint-first philosophyAcceptance Criteria
docs/testing-strategy.mddocuments the endpoint-first philosophy with rationale and mermaid diagramsTest Expectations
Constraints
capybaragem (used by request spec infrastructure)Checklist
Related