medium priority low complexity testing pending testing specialist Tier 4

Acceptance Criteria

All tests pass with `flutter test` and produce no flaky failures across 10 consecutive runs
PauseNotificationCard: mentor name renders correctly from mock model data
PauseNotificationCard: effective date renders in the expected human-readable format
PauseNotificationCard: optional reason field renders when provided and is absent from the tree when null
PauseNotificationCard: tapping the quick-action link triggers the `onProfileTap` callback with the correct mentor ID
PauseNotificationCard: tapping the quick-action link with a null mentor ID does not invoke the callback and does not throw
PeerMentorConfirmationBanner: renders pause-specific message text for `pauseActivated` event type
PeerMentorConfirmationBanner: renders resume-specific message text for `pauseDeactivated` event type
PeerMentorConfirmationBanner: `onDismiss` is called after `autoDismissDuration` elapses (verified with `fakeAsync`)
PeerMentorConfirmationBanner: tapping the close button calls `onDismiss` immediately without waiting for the timer
PeerMentorConfirmationBanner: after `onDismiss` fires, the widget is not found in the tree when the parent conditionally removes it
Accessibility checks pass for both widgets using `tester.pump` + `expectAccessibility` or equivalent

Technical Requirements

frameworks
Flutter
flutter_test
fakeAsync / FakeAsync
data models
assignment
performance requirements
All tests complete within 30 seconds total in CI
No real timers — all time-dependent tests use fakeAsync
security requirements
No real Supabase or FCM connections made in tests — all dependencies mocked
ui components
PauseNotificationCard
PeerMentorConfirmationBanner

Execution Context

Execution Tier
Tier 4

Tier 4 - 323 tasks

Can start after Tier 3 completes

Implementation Notes

Group tests by widget in separate `group()` blocks for clarity. Create a shared `buildTestWidget` helper for each component that wraps it in `MaterialApp` with the app's design token theme to avoid token-not-found runtime errors during tests. For the auto-dismiss test: wrap the test in `fakeAsync`, pump the widget, advance time by `PeerMentorConfirmationBannerModel.autoDismissDuration`, then pump again and assert `onDismiss` was called. To test widget removal from tree: use a `StatefulWidget` wrapper in the test that removes the banner from the build output when `onDismiss` fires, then assert `find.byType(PeerMentorConfirmationBanner).evaluate().isEmpty`.

Avoid `pumpAndSettle` with timers — use explicit `pump(duration)` calls instead.

Testing Requirements

Flutter widget tests only (no integration tests in this task). Use `flutter_test` with `WidgetTester`. Use `fakeAsync` + `FakeAsync.elapse()` for timer-dependent banner tests. Mock navigation callbacks with captured `VoidCallback` / argument matchers.

Use `find.text`, `find.byType`, and `find.byKey` for assertions. Golden tests are optional but recommended for visual regression on both states of the banner. Accessibility: run `SemanticsHandle` checks to confirm semantic labels are present on interactive elements.

Epic Risks (2)
medium impact low prob integration

The existing notification feed component may expect a specific notification model shape that does not map cleanly to the pause notification payload structure, requiring either payload transformation or feed refactoring.

Mitigation & Contingency

Mitigation: Review the notification-list-item and notification-model contracts before building the card. Design the pause-notification-card to extend or wrap the existing list item pattern rather than replacing it.

Contingency: If the feed contract is incompatible, implement a lightweight adapter that maps the pause notification payload to the feed's expected model shape, keeping the adapter isolated from the core card widget.

low impact low prob dependency

The app's existing toast/banner infrastructure may not support the auto-dismiss timeout duration or dismissal animation required for the peer mentor confirmation banner, necessitating a custom implementation that diverges from the design system.

Mitigation & Contingency

Mitigation: Audit the existing banner and toast components (in-app-notification-banner, notification-list-item) for configurable dismiss timeout before starting implementation. Prefer configuration over custom code.

Contingency: If the existing infrastructure cannot be configured, implement the banner as a thin wrapper with a custom auto-dismiss timer while reusing all visual tokens (colours, spacing, typography) from the design system to maintain consistency.