Add system test infrastructure and critical path browser specs #52
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
Standalone — identified in testing strategy audit (docs/testing-strategy.md). Depends on #51 being merged first (establishes request spec baseline).
Repo
ldraney/landscaping-assistantUser Story
As a developer,
I want Capybara system tests for the critical JS-driven user paths,
So that CI catches regressions in Stimulus controller behavior and Turbo Stream interactions that request specs cannot verify.
Context
The app uses Hotwire (Turbo + Stimulus) extensively. Request specs verify server responses but cannot test:
Rails 8 guidance: system tests should be reserved for critical user paths only. This ticket adds the infrastructure (gems, CI config, base test case) and writes system specs for three flows:
GPS/address entry system tests are deferred — they require Geolocation API mocking which adds complexity.
File Targets
Files the agent should modify:
Gemfile— add capybara, selenium-webdriver (or cuprite) to test group.woodpecker.yaml— ensure system tests run in CI (headless Chrome)Files the agent should create:
spec/support/system_test_config.rb— Capybara + headless driver setupspec/system/work_queue_spec.rb— work queue add + complete flowspec/system/uploads_spec.rb— file select auto-submit flowspec/system/properties_spec.rb— toggle active/inactive flowFiles the agent should read for context:
app/javascript/controllers/— all Stimulus controllers (understand what to test)app/views/— view templates (understand DOM structure for selectors)docs/testing-strategy.md— gap analysis and testing layer guidancedocs/hotwire.md— Stimulus controller inventory and CSS conventionsspec/rails_helper.rb— existing test configFiles the agent should NOT touch:
app/code — no application changes, test-onlyspec/requests/— don't modify existing request specsspec/models/— don't modify existing model specsAcceptance Criteria
capybaraand browser driver gem added to Gemfile test groupspec/support/system_test_config.rbconfigures headless Chrome (or Cuprite)rails_helper.rbrequires the system test configbundle exec rspec spec/system/bundle exec rspecTest Expectations
bundle exec rspec spec/system/Constraints
ruby:3.4.9-slim— Chrome/Chromium must be installed in the test stepChecklist
Related
landscaping-assistant— project board