Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/authentication/signup-ui-tests : Fix UI tests for M1: SignUp #96

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

taghizadlaura
Copy link
Contributor

Fix UI tests for M1: SignUp

Description

This PR introduces UI tests for the SignUpScreen component in the authentication module. It validates various user input scenarios to ensure proper error handling and navigation flow. It closes issue #76.

Changes

I added more tests, including tests for the calls to the ViewModel. Now the navigation tests also work.

Files

Modified

  • SignUpScreenTest.kt

@taghizadlaura taghizadlaura linked an issue Oct 30, 2024 that may be closed by this pull request
2 tasks
@taghizadlaura taghizadlaura changed the title fix: fix UI tests for M1: SignUp Fix UI tests for M1: SignUp Oct 30, 2024
@taghizadlaura taghizadlaura changed the title Fix UI tests for M1: SignUp fix/authentication/signup-ui-tests : Fix UI tests for M1: SignUp Oct 30, 2024
@taghizadlaura taghizadlaura mentioned this pull request Oct 30, 2024
11 tasks
Copy link
Contributor

@charliemangano charliemangano left a comment

Choose a reason for hiding this comment

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

Summary

These tests are very complete, good job! Small changes here and there, check the comments!

Important

Code Quality

Very well formatted code, very consistent as well. I like that you extracted email and password variations in a companion object, it helps with consistency and error checking.

Functionality

I think the tests check for the proper things, and correctly. Be careful of edge cases though, see comments.

Testing

The tests pass and are very complete! Great job:)

Documentation

Code is self-documenting thanks to the function and variable clear nomenclature!

Suggestions

See comments

Steps before PR approved

See comments. Any comment that is not annotated with "nitpick" has to be resolved before I approve this PR.

@charliemangano charliemangano added the bug Something isn't working label Oct 31, 2024
Replaced ``when`(navigationActions.currentRoute()).thenReturn(Route.ALERT_LIST)
` with correct return screen (`Screen.SIGN_UP`). Replaced "User is logged up" by "signed up". Completed empty email tests and others with the missing "signUpConfirmPassword".  Added a test for the edge case where only the confirm-password and only the password field is empty. Suppress the useless TODO.
@francelu francelu removed the request for review from lazarinibruno October 31, 2024 13:33
Copy link
Contributor

@francelu francelu left a comment

Choose a reason for hiding this comment

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

Summary

LGTM.

Important

Code Quality

  • The separation of tests for "doesNotCallVM" seems redundant but maintains consistency with SignInScreen.

Functionality

  • The tests correctly validate expected behaviors.

Steps before PR approved

  • None, keep up the good work!

Copy link
Contributor

@charliemangano charliemangano left a comment

Choose a reason for hiding this comment

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

Thanks for applying the changes! All tests pass and seem correct:)
LGTM

@taghizadlaura taghizadlaura merged commit 6eb8808 into main Oct 31, 2024
2 checks passed
@taghizadlaura taghizadlaura deleted the fix/authentication/signup-ui-tests branch October 31, 2024 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix UI tests for M1: SignUp
3 participants