Skip to content

Fix/toast store tests - #1435

Merged
mftee merged 4 commits into
CodeGirlsInc:mainfrom
rabsqueen:fix/toast-store-tests
Aug 29, 2026
Merged

Fix/toast store tests#1435
mftee merged 4 commits into
CodeGirlsInc:mainfrom
rabsqueen:fix/toast-store-tests

Conversation

@rabsqueen

Copy link
Copy Markdown
Contributor

Summary

Added comprehensive test coverage for frontend/stores/toast.store.ts to verify toast creation, dismissal, and bounded stacking behavior under both normal and high-frequency notification scenarios.

Changes

  • Added tests for adding new toasts to the store.
  • Added coverage for automatic toast dismissal and expiration.
  • Added tests for manually dismissing individual toasts.
  • Added burst/concurrent toast tests simulating rapid shipment status updates.
  • Verified that toast stacking remains bounded and does not allow unbounded accumulation.
  • Covered state transitions and cleanup behavior to ensure dismissed toasts are removed correctly.
  • Kept the implementation aligned with the existing toast store behavior and frontend testing patterns.

Validation

  • Verified individual toast creation and state updates.
  • Confirmed auto-dismiss behavior removes expired toasts.
  • Confirmed manual dismissal removes the intended toast without affecting active notifications.
  • Verified rapid bursts of toast events respect the configured stacking limit.
  • Ran the relevant frontend test suite and checks.

Acceptance Criteria

  • Test adding toasts.
  • Test automatic dismissal.
  • Test manual dismissal.
  • Test rapid bursts of concurrent toasts.
  • Verify toast stacking/dismissal behavior is bounded.
  • Confirm dismissed notifications are properly cleaned up.

closes #1370
closes #1372
closes #1373
closes #1374

@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

@rabsqueen is attempting to deploy a commit to the Mftee's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@rabsqueen 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

@mftee mftee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No merge conflicts with main. Good fix for the toast store tests - approving.

@mftee
mftee merged commit 8578237 into CodeGirlsInc:main Aug 29, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment