test: add coverage for error boundaries and virtual stream list (#748… - #876
Merged
Austinaminu2 merged 1 commit intoSep 27, 2026
Merged
Conversation
…wStar#748, FlowwStar#747, FlowwStar#746, FlowwStar#745) FlowwStar#748 - components/error-boundary/section-error-boundary.tsx Added assertions to the existing SectionErrorBoundary suite: a thrown child's fallback renders while sibling nav/footer content elsewhere on the page keeps rendering (the boundary doesn't take down the page), and captureError is called with the section_render:<name> operation tag. FlowwStar#747 - components/error-boundary/page-error-boundary.tsx Added assertions to the existing PageErrorBoundary suite: the full-screen fallback exposes both the "Go to dashboard" link (href=/app) and the "Reload page" button, and captureError is called with the page_render operation tag. FlowwStar#746 - components/error-boundary/component-error-boundary.tsx Added assertions to the existing ComponentErrorBoundary suite: the fallback renders in place of a thrown child without crashing sibling content, and captureError is called with the component_render:<label> operation tag. Discrepancy vs. issue descriptions (FlowwStar#748/FlowwStar#747/FlowwStar#746): all three boundaries already had a component test suite (__tests__/components/error-boundary.test.tsx, added in a prior PR) covering the "renders fallback on throw" and retry behavior, contrary to the issues' "no test coverage" premise. Rather than duplicate that suite, this change extends it with the specific assertions each issue called for that weren't yet covered: the captureError call and, for the page boundary, the dashboard link/reload button. FlowwStar#745 - components/streams/virtual-stream-list.tsx New test file __tests__/components/streams/virtual-stream-list.test.tsx. Covers the flat-list path (all given streams render, empty input renders nothing, loading shows skeletons) and the virtualized path for 60 streams (crosses the 50-item VIRTUALIZATION_THRESHOLD): asserts only a windowed subset of rows mounts rather than all 60. jsdom reports 0 for both offsetHeight and getBoundingClientRect(), which @tanstack/virtual-core and this component's measureElement callback both treat as "nothing is visible" (zero rows render). The virtualized tests locally stub HTMLElement.prototype.offsetHeight (viewport size) and Element.prototype.getBoundingClientRect (per-row measured size) for the scroll container to produce a stable, non-empty visible window; no such mocking convention previously existed in the repo. Verified via `npx vitest run`: both files pass in full (16 and 5 tests respectively). A full-suite run shows 11 pre-existing failing test files unrelated to this change (dashboard.test.tsx, hero.test.tsx, navbar.test.tsx, etc.) — left untouched per scope. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
@ALLEN-AYODEJI Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…, #747, #746, #745)
#748 - components/error-boundary/section-error-boundary.tsx Added assertions to the existing SectionErrorBoundary suite: a thrown child's fallback renders while sibling nav/footer content elsewhere on the page keeps rendering (the boundary doesn't take down the page), and captureError is called with the section_render: operation tag.
#747 - components/error-boundary/page-error-boundary.tsx Added assertions to the existing PageErrorBoundary suite: the full-screen fallback exposes both the "Go to dashboard" link (href=/app) and the "Reload page" button, and captureError is called with the page_render operation tag.
#746 - components/error-boundary/component-error-boundary.tsx Added assertions to the existing ComponentErrorBoundary suite: the fallback renders in place of a thrown child without crashing sibling content, and captureError is called with the component_render: operation tag.
Discrepancy vs. issue descriptions (#748/#747/#746): all three boundaries already had a component test suite (tests/components/error-boundary.test.tsx, added in a prior PR) covering the "renders fallback on throw" and retry behavior, contrary to the issues' "no test coverage" premise. Rather than duplicate that suite, this change extends it with the specific assertions each issue called for that weren't yet covered: the captureError call and, for the page boundary, the dashboard link/reload button.
#745 - components/streams/virtual-stream-list.tsx
New test file tests/components/streams/virtual-stream-list.test.tsx. Covers the flat-list path (all given streams render, empty input renders nothing, loading shows skeletons) and the virtualized path for 60 streams (crosses the 50-item VIRTUALIZATION_THRESHOLD): asserts only a windowed subset of rows mounts rather than all 60.
jsdom reports 0 for both offsetHeight and getBoundingClientRect(), which @tanstack/virtual-core and this component's measureElement callback both treat as "nothing is visible" (zero rows render). The virtualized tests locally stub HTMLElement.prototype.offsetHeight (viewport size) and Element.prototype.getBoundingClientRect (per-row measured size) for the scroll container to produce a stable, non-empty visible window; no such mocking convention previously existed in the repo.
Verified via
npx vitest run: both files pass in full (16 and 5 tests respectively). A full-suite run shows 11 pre-existing failing test files unrelated to this change (dashboard.test.tsx, hero.test.tsx, navbar.test.tsx, etc.) — left untouched per scope.Closes #745
Closes #746
Closes #747
Closes #748