Skip to content

Health Notifications Tests

Noor Alam Shuvo edited this page Aug 2, 2025 · 1 revision

Health Notifications Test Cases

Overview

Health notification system including eye rest, stretch reminders, and break notifications with modal interface and pause functionality.

Test Cases

TC-HN-001: Eye Rest Notification Basic Flow

Objective: Verify eye rest notifications appear at configured intervals
Prerequisites: Extension installed, eye rest interval set to 20 minutes, notifications enabled
Priority: High | Category: Health Notifications

Steps:

  1. Start tracking activity
  2. Work continuously for 20 minutes
  3. Verify eye rest notification appears
  4. Click "Got it!" button
  5. Verify positive feedback message appears

Expected Result:

  • Notification appears exactly after 20 minutes
  • Modal blocks UI (if modal setting enabled)
  • Timer auto-pauses when modal appears
  • Timer auto-resumes when modal dismissed
  • Positive feedback message displayed

TC-HN-002: Eye Rest Snooze Functionality

Objective: Verify eye rest snooze works correctly
Prerequisites: Extension installed, eye rest notifications enabled
Priority: High | Category: Health Notifications

Steps:

  1. Start tracking and wait for eye rest notification
  2. Click "Pause Timer" button
  3. Verify timer pauses
  4. Resume work after a few minutes
  5. Verify timer resumes when activity detected

Expected Result:

  • Timer immediately pauses when "Pause Timer" clicked
  • Time tracking stops accumulating
  • Timer automatically resumes when user starts typing again
  • No lost time or session data

TC-HN-003: Stretch Notification Basic Flow

Objective: Verify stretch notifications appear at configured intervals
Prerequisites: Extension installed, stretch interval set to 45 minutes, notifications enabled
Priority: High | Category: Health Notifications

Steps:

  1. Start tracking activity
  2. Work continuously for 45 minutes
  3. Verify stretch notification appears
  4. Click "Will do!" button
  5. Verify positive feedback message appears

Expected Result:

  • Notification appears exactly after 45 minutes
  • Modal has correct message about stretching
  • Timer auto-pauses/resumes correctly
  • Encouraging feedback provided

TC-HN-004: Stretch Snooze Functionality

Objective: Verify stretch reminder snooze works correctly
Prerequisites: Extension installed, stretch notifications enabled
Priority: High | Category: Health Notifications

Steps:

  1. Start tracking and wait for stretch notification
  2. Click "Pause Timer" button
  3. Verify timer pauses immediately
  4. Wait several minutes without activity
  5. Resume coding and verify timer resumes

Expected Result:

  • Timer pauses immediately when button clicked
  • No time accumulation during pause
  • Timer resumes automatically when coding resumes
  • Stretch timer resets after acknowledging

TC-HN-005: Break Notification Basic Flow

Objective: Verify break notifications appear after 2+ hours
Prerequisites: Extension installed, break threshold set to 120 minutes, notifications enabled
Priority: High | Category: Health Notifications

Steps:

  1. Start tracking activity
  2. Work continuously for 2+ hours
  3. Verify break notification appears (Error level)
  4. Select one of the break duration options
  5. Verify timer pauses for selected duration

Expected Result:

  • Notification appears after exactly 2 hours
  • Notification uses Error level (red, urgent)
  • Message emphasizes health importance
  • Multiple break duration options available
  • Timer pauses for selected break duration

TC-HN-006: Break Duration Options

Objective: Verify all break duration options work correctly
Prerequisites: Extension installed, break notifications enabled
Priority: High | Category: Health Notifications

Steps:

  1. Work for 2+ hours to trigger break notification
  2. Test each break option:
    • "Quick stretch (5 min)"
    • "Eye rest (10 min)"
    • "Coffee break (15 min)"
    • "Proper break (20 min)"
  3. Verify timer pauses for correct duration

Expected Result:

  • Each option pauses timer for specified duration
  • Timer automatically resumes after break period
  • Break acknowledgment resets the 2-hour threshold
  • User receives appropriate feedback

TC-HN-007: Modal vs Non-Modal Behavior

Objective: Verify notifications respect modal setting
Prerequisites: Extension installed with access to settings
Priority: Medium | Category: Configuration

Steps:

  1. Set modalNotifications to true
  2. Trigger any health notification
  3. Verify modal behavior (blocks UI)
  4. Set modalNotifications to false
  5. Trigger another notification
  6. Verify non-modal behavior

Expected Result:

  • Modal true: Notification blocks UI, requires user action
  • Modal false: Notification appears but doesn't block UI
  • Timer pause/resume only works with modal enabled
  • Setting change takes effect immediately

TC-HN-008: Auto-Pause and Resume Timer

Objective: Verify timer automatically pauses/resumes with modal notifications
Prerequisites: Extension installed, modal notifications enabled
Priority: High | Category: Timer Integration

Steps:

  1. Start tracking activity
  2. Trigger any health notification
  3. Verify timer pauses when modal appears
  4. Interact with modal (any button)
  5. Verify timer resumes when modal disappears

Expected Result:

  • Timer status shows paused when modal appears
  • No time accumulation during modal display
  • Timer automatically resumes without user action
  • Status bar reflects correct state throughout

TC-HN-009: Multiple Notification Types Timing

Objective: Verify multiple notification types work together correctly
Prerequisites: Extension installed, all notifications enabled with default intervals
Priority: Medium | Category: Integration

Steps:

  1. Start tracking
  2. Work continuously to trigger multiple notification types
  3. Verify timing independence (eye rest at 20min, stretch at 45min, break at 120min)
  4. Check that notifications don't interfere with each other

Expected Result:

  • Each notification type maintains independent timing
  • No conflicts between notification types
  • All timers continue correctly after any notification
  • Each type shows appropriate messages and options

TC-HN-010: Notification Settings Configuration

Objective: Verify all health notification settings work correctly
Prerequisites: Extension installed with configuration access
Priority: Medium | Category: Configuration

Steps:

  1. Change eye rest interval to custom value (e.g., 15 minutes)
  2. Change stretch interval to custom value (e.g., 30 minutes)
  3. Change break threshold to custom value (e.g., 90 minutes)
  4. Disable/enable notifications
  5. Test each configuration change

Expected Result:

  • Custom intervals are respected exactly
  • Settings changes take effect immediately
  • Disabling notifications stops all health reminders
  • Re-enabling restarts timers from current time

TC-HN-011: Edge Case - Rapid Modal Dismissal

Objective: Verify behavior when user quickly dismisses modals
Prerequisites: Extension installed, modal notifications enabled
Priority: Low | Category: Edge Cases

Steps:

  1. Trigger health notification
  2. Quickly dismiss modal without clicking buttons
  3. Verify timer behavior
  4. Trigger another notification immediately
  5. Test rapid button clicking

Expected Result:

  • System handles rapid dismissal gracefully
  • Timer state remains consistent
  • No duplicate notifications or timer issues
  • User actions are processed correctly

TC-HN-012: Notification Accuracy During Breaks

Objective: Verify notifications don't appear during legitimate breaks
Prerequisites: Extension installed, notifications enabled
Priority: Medium | Category: User Experience

Steps:

  1. Work until break notification appears
  2. Select a break duration option
  3. Stop all activity during break period
  4. Resume work after break
  5. Verify notification timing resets appropriately

Expected Result:

  • Break acknowledgment resets notification timer
  • System recognizes legitimate break time
  • Notifications resume with fresh timing when work resumes
  • No inappropriate notifications during actual breaks

TC-HN-013: Toggle Health Notifications Command

Objective: Verify toggle command for health notifications works correctly
Prerequisites: Extension installed with command access
Priority: Low | Category: Commands

Steps:

  1. Execute "SCTT: Toggle Health Notifications" command
  2. Verify notifications are disabled
  3. Try to trigger notifications through normal workflow
  4. Execute toggle command again
  5. Verify notifications are re-enabled

Expected Result:

  • Toggle command immediately enables/disables all health notifications
  • Status is clearly communicated to user
  • Disabled state prevents all health notifications
  • Re-enabling resumes normal notification schedule

Test Environment Requirements

Setup Prerequisites

  • VS Code with extension installed
  • Access to VS Code settings
  • Ability to modify extension configuration
  • Timer capability for precise timing verification

Test Data Requirements

  • Various workspace configurations
  • Different notification interval settings
  • Modal and non-modal configurations
  • Test scenarios for all notification types

Performance Considerations

  • Health notifications should not impact VS Code performance
  • Modal notifications should be responsive
  • Timer accuracy should be maintained across all scenarios

Related Tests: Core Features Tests | Configuration Tests | Test Case Index

Clone this wiki locally