Drop system tests: adopt Rails 8 endpoint-first testing #64
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "drop-system-tests"
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?
Summary
Remove browser-based system tests and adopt the Rails 8 endpoint-first testing philosophy. System tests broke every CI pipeline since PR #54 due to Chromium timeout failures on a resource-constrained single-worker node.
Changes
cupritegem (ferrum removed transitively)chromiumfrom apt-get, removeCHROMIUM_PATHandFERRUM_PROCESS_TIMEOUTenv vars82 specs remain (19 model + 63 request) covering every HTTP endpoint.
Test Plan
docs/testing-strategy.mdrenders correctly with mermaid diagramsReview Checklist
Related Notes
PR #64 Review
DOMAIN REVIEW
Tech stack: Ruby on Rails 8, Hotwire (Turbo/Stimulus), RSpec, Woodpecker CI, Docker Compose.
System test removal (primary change). The removal is clean and thorough:
cupritegem removed from Gemfile, lock file regenerated correctly without cuprite, ferrum, or webrick transitive dependencies.spec/support/system_test_config.rbdeleted -- no orphan Cuprite driver config remains..woodpecker.yamlproperly stripschromiumfromapt-getand removesCHROMIUM_PATHenv var.capybaragem retained in test group -- confirmed it is still used by request spec infrastructure (rack_testdriver).rails_helper.rbauto-requiresspec/support/**/*.rb(line 22) -- sincesystem_test_config.rbwas the only file there that referenced cuprite, no stale requires remain.@servicesremoval fromWorkQueueItemsController#index. Correct. The service filter chip UI was removed fromapp/views/work_queue_items/index.html.erb, so the instance variable is no longer needed. Confirmed@servicesis still set inPropertiesController#manageand#editwhere the manage view (manage.html.erbline 9) still uses it.View restructuring (
index.html.erb). The quick-add form and queue list were moved inside thedata-controller="filter"div so the unified search input can filter the property list below. Thedata-action="turbo:submit-end->filter#clearInput"on the form is correct Stimulus wiring -- clears the search input after successful form submission.filter_controller.jsclearInputmethod. Clean addition. Guards onevent.detail.successto avoid clearing on failed submissions. This also addresses issue #50 (quick-add form resets on failed submissions) as a side effect.puma.rb--activate_control_appadded. This is required for theyabeda-puma-pluginto collect Puma metrics. Withoutactivate_control_app, the plugin cannot query Puma's internal stats. This is a correctness fix for the metrics endpoint added in PR #47.docker-compose.yml-- port parameterization."${WEB_PORT:-7143}:3000"allows overriding the host port via env var while keeping 7143 as default. Low-risk, useful for running multiple instances.docs/testing-strategy.mdrewrite. Thorough documentation. The philosophy section with Rails 8 rationale and Hotwire testing insight is well-argued. The endpoint coverage table and remaining gaps table are accurate against the existing spec files. The mermaid diagrams are correctly structured.BLOCKERS
None.
clearInputStimulus method is thin event-handler glue (3 lines) consistent with the documented philosophy of not unit-testing Stimulus controllers.NITS
PR body
FERRUM_PROCESS_TIMEOUTclaim. The PR body says it removes theFERRUM_PROCESS_TIMEOUTenv var from.woodpecker.yaml, but the diff does not show this removal. It was likely added in PR #61 which may not have been merged to main, or was already reverted. Not a code issue -- just a PR description inaccuracy.Stale comment in
rails_helper.rbline 21. The comment says# Auto-require all support files (system test config, shared contexts, etc.)-- the "system test config" reference is now stale since that file was deleted. Cosmetic only.Scope creep (minor). Three changes are not strictly about dropping system tests: (a) the
activate_control_appline inpuma.rb, (b) theWEB_PORTparameterization indocker-compose.yml, and (c) theclearInputmethod + view restructuring. These are all small, correct, and low-risk, but they are distinct from the stated scope of "drop system tests." Future PRs would benefit from keeping these separate.SOP COMPLIANCE
drop-system-tests-- does not follow{issue-number}-{kebab-case-purpose}convention. Should be63-drop-system-tests..envfiles in the diff.PROCESS OBSERVATIONS
activate_control_appfix is a correctness improvement for existing metrics functionality.VERDICT: APPROVED
The code changes are correct, complete, and well-documented. The system test removal is thorough with no orphan references. Branch naming does not follow convention, but the code itself has no blockers.
ab44eccebe44a7c5b1ea