Skip to content

Add automated testing PoC for Guard App login screen#274

Open
dhruvi-0406 wants to merge 4 commits intomainfrom
dhruvi-0406/feature/testing-poc
Open

Add automated testing PoC for Guard App login screen#274
dhruvi-0406 wants to merge 4 commits intomainfrom
dhruvi-0406/feature/testing-poc

Conversation

@dhruvi-0406
Copy link
Copy Markdown
Collaborator

Implemented an automated testing proof of concept (PoC) for the Guard App using Jest and React Native Testing Library.

What was done:

  • Set up Jest using the Expo testing preset (jest-expo)
  • Added automated tests for the Login screen
  • Verified UI rendering and basic user interaction using React Native Testing Library
  • Simulated user actions using fireEvent
  • Mocked AsyncStorage to resolve native module issues in the testing environment
  • Added documentation under docs/Guard App Testing Stack PoC.pdf

Purpose:

This PoC demonstrates how automated testing can be integrated into the project in a simple and maintainable way. It provides a foundation that can be extended to cover more screens and features in the future. This implementation focuses on establishing a scalable testing setup rather than a complete testing framework.

@dhruvi-0406 dhruvi-0406 force-pushed the dhruvi-0406/feature/testing-poc branch from 2d8bc03 to 362cf12 Compare April 12, 2026 16:00
@dhruvi-0406 dhruvi-0406 force-pushed the dhruvi-0406/feature/testing-poc branch from 362cf12 to 1b83714 Compare April 12, 2026 16:14
@Krisha190235
Copy link
Copy Markdown
Collaborator

before we can approve this PR, there are a few important areas that need to be addressed:

Key concerns (must fix):
• The current tests are quite limited and don’t strongly validate behavior (e.g., assertions are too basic).
• There is no navigation-related test coverage.
• Some import formatting/spacing issues need to be cleaned up.

Improvements expected:
• Please strengthen the test cases (e.g., verify actual outcomes, not just rendering).
• Add at least one meaningful test that covers user flow (such as navigation or login success/failure).
• Include edge cases (e.g., invalid email, empty inputs).
• Consider using a reusable setup/helper function to reduce duplication.
• Double-check import paths (case sensitivity can cause issues across environments).

Also, can you please try to fix the Lint / ESLint & Prettier errors? There is a tutorial on Teams you can follow. If anything is unclear or you need help, please let me know — happy to help you through it.

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.

2 participants