Description
The test suite (spec/) consists exclusively of unit tests (controllers, helpers, steps in isolation) and model specs. There are no integration tests that exercise the full pipeline:
- Create a site and health check with steps
- Trigger a check run
- Verify screenshots, logs, and status are recorded correctly
- Verify notifications are sent
Without end-to-end tests, regressions that involve multiple components interacting (e.g., a step type change breaking the runner, a mailer template error silently swallowing notifications) go undetected.
Suggested approach
Add spec/integration/ or spec/system/ directory with feature specs using RSpec + Capybara (or at minimum, request specs):
# spec/integration/health_check_execution_spec.rb
RSpec.describe 'Health check execution' do
it 'runs a visit+check_content check and records success' do
# setup site, health_check, steps
# trigger check!
# assert check_run.status == 'success'
end
end
Effort: large
Description
The test suite (
spec/) consists exclusively of unit tests (controllers, helpers, steps in isolation) and model specs. There are no integration tests that exercise the full pipeline:Without end-to-end tests, regressions that involve multiple components interacting (e.g., a step type change breaking the runner, a mailer template error silently swallowing notifications) go undetected.
Suggested approach
Add
spec/integration/orspec/system/directory with feature specs using RSpec + Capybara (or at minimum, request specs):Effort: large