Skip to content

[Enhancement]: Add Tests for NotificationScreen and NotificationViewModel #27

@theMr17

Description

@theMr17

Summary of Improvement

Add UI and unit tests for the NotificationScreen and NotificationViewModel introduced by #22.

Current Implementation

Currently, there are no tests covering the NotificationScreen composable or the associated NotificationViewModel. This makes it difficult to ensure UI correctness, especially during refactors or feature additions.

Proposed Solution

  • Create a test class for NotificationViewModel that verifies:

    • Initial UI state
    • Notification loading behavior
    • Read/unread status updates
    • Edge cases like empty or failed notification lists
  • Create an instrumented test for NotificationScreen that verifies:

    • UI renders correctly with sample data
    • Click events navigate or respond appropriately
    • Unread badge visibility logic works as expected

The structure and strategy should follow existing patterns in:

  • SetupViewModelTest
  • LoginViewModelTest
  • SetupScreenTest
  • LoginScreenTest

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementImprovements or additions to existing feature/code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions