-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Overview
Create comprehensive integration test suite.
Parent Epic: #70
Priority: P1
Prerequisites
- All controllers and components completed
- 6.1: Implement Streaming for Story List #96 (6.1: Implement Streaming for Story List)
- 6.2: Implement Streaming for Comments #97 (6.2: Implement Streaming for Comments)
Next Issues (after this is complete)
- 7.4: Add Production Configuration (ensure tests pass in CI)
Acceptance Criteria
- System tests for story list page (all types: top, new, show, ask, jobs)
- System tests for pagination
- System tests for story detail page
- System tests for comment display
- System tests for user profile page
- System tests for error states (404, etc.)
- Tests verify RSC streaming works
- All tests passing locally
- CI configuration for running tests
Implementation Notes
Use Capybara with a JavaScript driver for full RSC testing:
# spec/system/stories_spec.rb
require 'rails_helper'
RSpec.describe 'Stories', type: :system do
it 'displays top stories' do
visit '/news/1'
expect(page).to have_css('.story', minimum: 1)
end
it 'paginates correctly' do
visit '/news/1'
click_link 'More'
expect(page).to have_current_path('/news/2')
end
endConsider mocking the HN API for reliable, fast tests.
coderabbitai