Skip to content

Conversation

@justin808
Copy link
Member

@justin808 justin808 commented Nov 7, 2025

Summary

  • Skip flaky stream_async_components_for_testing RSpec test that was replaced by Playwright E2E tests

Details

This test has been failing on master. Investigation revealed:

  1. The test was already replaced by more reliable Playwright E2E tests in commit b73ff63 "Replace streaming flaky tests with Playwright E2E tests" (2 weeks ago)
  2. The old RSpec tests were kept but are flaky and unreliable for testing streaming behavior
  3. The Playwright tests in e2e-tests/streaming.spec.ts provide comprehensive coverage of the streaming functionality

Test Coverage

The removed RSpec test is fully covered by Playwright E2E tests which:

  • Test incremental rendering of streamed components
  • Test early hydration of pages
  • Test RSC payload requests
  • Provide snapshot-based verification of component states

Related

  • Related commit: b73ff63 "Replace streaming flaky tests with Playwright E2E tests"
  • Similar approach used for "React Router Sixth Page" test which is also skipped

🤖 Generated with Claude Code


This change is Reviewable

This test has been replaced by more reliable Playwright E2E tests in
e2e-tests/streaming.spec.ts. The RSpec test was flaky and unreliable
for testing streaming behavior.

Related commit: b73ff63 "Replace streaming flaky tests with Playwright E2E tests"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 7, 2025

Warning

Rate limit exceeded

@justin808 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 16 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 23be9a9 and 3a3d381.

📒 Files selected for processing (1)
  • react_on_rails_pro/spec/dummy/spec/system/integration_spec.rb (1 hunks)
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch justin808/fix-stream-async-test

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@claude
Copy link

claude bot commented Nov 7, 2025

Code Review - PR #1941

Summary

This PR skips a flaky RSpec test for streaming async components that has been replaced by more reliable Playwright E2E tests. The change is minimal and well-justified.


✅ Positive Aspects

  1. Good test migration strategy: Replacing flaky Capybara/RSpec system tests with Playwright E2E tests is a sound approach for testing complex streaming behavior.

  2. Clear skip message: The skip reason explicitly references the replacement tests in e2e-tests/streaming.spec.ts, making it easy for future developers to understand why the test is disabled.

  3. Comprehensive E2E coverage: The Playwright tests in streaming.spec.ts provide excellent coverage:

    • Incremental rendering at multiple stages (stage0-stage5)
    • Early hydration testing
    • RSC payload request verification
    • Snapshot-based validation to catch regressions
  4. Maintains test intent: The skipped RSpec test checked for basic rendering and hydration. The Playwright tests cover these same concerns plus more advanced scenarios.

  5. Minimal change: Only 2 lines changed, reducing risk of introducing new issues.


🔍 Suggestions & Considerations

1. Consider complete removal instead of skipping

Current approach: Test is skipped with a message.

Alternative consideration: Since the test has been fully replaced and is confirmed flaky, consider removing it entirely rather than keeping it skipped. Skipped tests can accumulate and clutter test suites.

Rationale from CLAUDE.md: The project values clean, maintainable code. Dead code can be confusing for contributors.

Counter-argument: Keeping it temporarily might be valuable if there's any uncertainty about the Playwright test coverage. However, based on the PR description stating this was done 2 weeks ago in commit b73ff63, sufficient time has passed to validate the replacement.

2. Document the migration pattern

If this is part of a broader pattern of migrating from RSpec system tests to Playwright E2E tests, consider:

  • Documenting this pattern in CONTRIBUTING.md or test documentation
  • Using this as a template for similar migrations (like the "React Router Sixth Page" test on line 431)

3. Verify CI is green

Ensure that:

  • The Playwright tests are running reliably in CI
  • No gaps in test coverage exist between the old RSpec tests and new Playwright tests

🎯 Test Coverage Analysis

RSpec test coverage (being removed):

  • ✅ Basic component rendering
  • ✅ Component hydration
  • ✅ Server-side rendering without JS
  • ✅ Hydration status verification

Playwright test coverage (replacement):

  • ✅ Incremental rendering with snapshots (much more thorough)
  • ✅ Early hydration testing
  • ✅ Multiple page scenarios (regular page, inside router, after navigation, with async client components)
  • ✅ RSC payload request verification
  • ✅ Regression prevention via snapshot testing

Assessment: The Playwright tests provide superior coverage with better reliability.


🚀 Performance & CI Impact

Positive: Skipping a flaky test will:

  • Reduce CI failures and re-runs
  • Speed up the test suite (one less system test)
  • Reduce maintenance burden

🔒 Security Concerns

None identified.


📝 Code Quality

  • Follows RSpec skip pattern consistently with other skipped tests in the file
  • Skip message is descriptive and actionable
  • No style or linting issues

✅ Recommendation

APPROVE - This is a pragmatic change that improves test reliability.

Optional follow-up: Consider removing the test entirely after confirming Playwright tests have been stable in CI for a few more weeks.


📋 Checklist Review

  • ✅ Code quality and best practices: Good
  • ✅ Potential bugs: None
  • ✅ Performance: Improved (one less flaky test)
  • ✅ Security: No concerns
  • ✅ Test coverage: Actually improved with Playwright tests

Great work on improving test reliability! 🎉

@justin808 justin808 merged commit 2acff83 into master Nov 7, 2025
23 checks passed
@justin808 justin808 deleted the justin808/fix-stream-async-test branch November 7, 2025 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants