Skip to content

test: cover webhook resend, stream card pin/copy-link, notification prefs - #1026

Merged
Austinaminu2 merged 1 commit into
FlowwStar:mainfrom
King-Boye:fix/king-boye-batch-oct18
Oct 18, 2026
Merged

Austinaminu2 merged 1 commit into
FlowwStar:mainfrom
King-Boye:fix/king-boye-batch-oct18

Conversation

@King-Boye

Copy link
Copy Markdown
Contributor

Summary

Adds Vitest + Testing Library coverage for four previously-untested interactions. In all four cases the production behavior described in the issue already exists and works correctly on main — only test coverage was missing, so no production code changes were made.

  • Test WebhookSettings resend delivery #919 — __tests__/components/webhook-settings.test.tsx: new "resend delivery" describe block covering handleResend (calls resendDelivery with the delivery, success/failure toasts, button disabled while in flight, resend action only rendered for failed deliveries that have a stored payload).
  • Test StreamCard copy-link action #918 — __tests__/components/streams/stream-card-copy-link.test.tsx (new file): covers handleCopyLink — writes <origin>/app/stream/<id> to the clipboard, does not navigate the card's <Link>, shows the check icon then resets to the link icon.
  • Test StreamCard pin/unpin action #916 — __tests__/components/streams/stream-card-menu.test.tsx: new "pin/unpin" describe block covering handlePinToggle — "Pin to top" calls pinStream with a pinned toast, a pinned card shows "Unpin stream" and calls unpinStream with an unpinned toast.
  • Add tests for useNotificationPreferences #915 — __tests__/hooks/use-notification-preferences.test.ts (new file): covers useNotificationPreferences / isNotificationTypeEnabled — defaults when storage is empty, updates persist to localStorage, isNotificationTypeEnabled reflects saved preferences, corrupt JSON falls back to defaults, and the onSaveError callback fires when persistence throws.

Test plan

  • npm test passes, including the new/updated test files
  • New tests actually exercise handleResend, handleCopyLink, handlePinToggle, and useNotificationPreferences (verified by reading current main source for each — all four already implement the acceptance-criteria behavior)

Closes #919
Closes #918
Closes #916
Closes #915

🤖 Generated with Claude Code

…fication preferences

Adds Vitest/Testing Library coverage for four previously-untested pieces of
the app:
- handleResend in WebhookSettings (success/failure toasts, calls
  resendDelivery, button disabled while in flight, only shown for failed
  deliveries with a stored payload)
- handlePinToggle in StreamCard (pinStream/unpinStream, toasts, menu label
  swap)
- handleCopyLink in StreamCard (writes <origin>/app/stream/<id> to the
  clipboard, does not navigate the card link, check icon shown then reset)
- useNotificationPreferences / savePreferences / isNotificationTypeEnabled
  (defaults, persistence, corrupt-JSON fallback, save-error callback)

No production code changes were needed — all four behaviors already exist
and work as described in their issues; only test coverage was missing.

Closes FlowwStar#919
Closes FlowwStar#918
Closes FlowwStar#916
Closes FlowwStar#915

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@King-Boye 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

@Austinaminu2
Austinaminu2 merged commit 295238d into FlowwStar:main Oct 18, 2026
1 of 7 checks passed

This branch had an error being deployed

1 failed deployment
staging — 1128fa78 Deployed Oct 18, 2026 by King-Boye via deploy-staging #348
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.

Test WebhookSettings resend delivery Test StreamCard copy-link action Test StreamCard pin/unpin action Add tests for useNotificationPreferences

2 participants