This PR (finally) introduces the end-to-end tests that we meant to finish for M1: the SignIn and SignUp flows. This relied on a lot of small and big problems being fixed and merged to work so it took a while to finally be able to write them. It closes issue #48.
Thanks a lot to @lazarinibruno for his help on this at the very beginning.
Changes
Created a file EndToEndM1.kt with a test for the SignUp flow and one for the SignIn. These tests don't use mocking at all and go through the app like the average user would.
Sign In: I used a user profile that we created beforehand. The "user" lands on the SignIn screen and (correctly) fill in their info. They click on the "Sign In" button and get redirected to the Profile screen that displays their information.
Sign Up: I randomize the email to be sure to create a new user each time. As we have not yet implemented a method to delete a user, this was the only way, but in the future we should be able to always create the same user and then delete it in the tearDown. The "user" lands on the SignIn screen then navigates to the SignUp screen. They (correctly) fill in the fields and click on the "Sign Up" button and get redirected to the CreateProfile screen. They (correctly) fill in the fields and get redirected to the Profile screen that displays the info they just entered.
Files
Added
app/src/androidTest/java/com/android/periodpals/endtoend/EndToEndM1.kt: SignIn and SignUp flows
Modified
None
Removed
None
Dependencies Added
None
Testing
Test for basic SignUp and SignIn flows. Since we still haven't found a way to test the profile picture, there are not tests for that.
End-to-end tests for SignIn and SignUp flows
Description
This PR (finally) introduces the end-to-end tests that we meant to finish for M1: the SignIn and SignUp flows. This relied on a lot of small and big problems being fixed and merged to work so it took a while to finally be able to write them. It closes issue #48. Thanks a lot to @lazarinibruno for his help on this at the very beginning.
Changes
Created a file
EndToEndM1.kt
with a test for the SignUp flow and one for the SignIn. These tests don't use mocking at all and go through the app like the average user would. Sign In: I used a user profile that we created beforehand. The "user" lands on the SignIn screen and (correctly) fill in their info. They click on the "Sign In" button and get redirected to the Profile screen that displays their information. Sign Up: I randomize the email to be sure to create a new user each time. As we have not yet implemented a method to delete a user, this was the only way, but in the future we should be able to always create the same user and then delete it in thetearDown
. The "user" lands on the SignIn screen then navigates to the SignUp screen. They (correctly) fill in the fields and click on the "Sign Up" button and get redirected to the CreateProfile screen. They (correctly) fill in the fields and get redirected to the Profile screen that displays the info they just entered.Files
Added
app/src/androidTest/java/com/android/periodpals/endtoend/EndToEndM1.kt
: SignIn and SignUp flowsModified
None
Removed
None
Dependencies Added
None
Testing
Test for basic SignUp and SignIn flows. Since we still haven't found a way to test the profile picture, there are not tests for that.
Screenshots