PeriodPals / periodpals

3 stars 1 forks source link

Test/misc/end-to-end-m1 : End-to-end tests for SignIn and SignUp flows #199

Closed charliemangano closed 2 weeks ago

charliemangano commented 2 weeks ago

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 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

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

SignUp flow on Figma LogIn flow on Figma

sonarcloud[bot] commented 2 weeks ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud