Skip to content

test: add coverage for error boundaries and virtual stream list (#748… - #876

Merged
Austinaminu2 merged 1 commit into
FlowwStar:mainfrom
ALLEN-AYODEJI:feat/issues-745-746-747-748
Sep 27, 2026
Merged

Austinaminu2 merged 1 commit into
FlowwStar:mainfrom
ALLEN-AYODEJI:feat/issues-745-746-747-748

Conversation

@ALLEN-AYODEJI

Copy link
Copy Markdown
Contributor

…, #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

…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>
@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants