-
Notifications
You must be signed in to change notification settings - Fork 3
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
test: E2E #167
test: E2E #167
Conversation
…hilt injection (so creating mock repositories for profile and travel list, and a mock authentication service). The following things were added : 1) a mock repository for profileRepository 2) a mock repository for travelRepository 3) a mock database consisting of two maps, one mapping uid to profiles, and the other mapping uid to travels 4) using hilt to inject mock repositories in the view models of profile and travel 5) removing the factory for these view model 6) Adding an AppModule that helps us inject actual functions to use the firebase API calls and real repositories 7) Adding a TestModule that helps us inject mock API calls and mock repositories 8) Creating an adapter for authentication service and a mock authentication service 9) Adding a sign in model with email and password, to avoid dealing with google sign in
…ign in with email and password button due to the merging of the circular loading
…ss in NotificationRepositoryUnitTest by a data class it contains
…ing tests to verify the logic when clicking on the sign in button of SignInWithEmailAndPasswordScreen
…hanging the private val of NotificationRepository for a collection reference to a string (the collection reference is accessed from the fucntions now) This makes us avoid a Firestore Internal error when launching the e2e test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Work ! We have now a End to end test. I would have preferred that we use the Firebase emulator to do the end to end but I think you had problems with it so using Hilt is a very good way to do it.
Some suggestion in addition :
- Add Appmodule in a folder
di
(Dependency Injection) - Add
ProfileRepositoryMock
,TravelRepositoryMock
in a folder mock - The sign button should be less visible because it is not the main option for sign in
- The screen for the Sign in with password can be maybe prettier ?
app/src/androidTest/java/com/github/se/travelpouch/endtoend/EndToEndTest.kt
Outdated
Show resolved
Hide resolved
app/src/androidTest/java/com/github/se/travelpouch/endtoend/EndToEndTest.kt
Show resolved
Hide resolved
...droidTest/java/com/github/se/travelpouch/ui/authentication/TestSignInWithEmailAndPassword.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/github/se/travelpouch/model/profile/ProfileModelView.kt
Show resolved
Hide resolved
app/src/main/java/com/github/se/travelpouch/model/travels/ListTravelViewModel.kt
Show resolved
Hide resolved
app/src/main/java/com/github/se/travelpouch/model/travels/TravelRepositoryMock.kt
Show resolved
Hide resolved
app/src/main/java/com/github/se/travelpouch/ui/authentication/SignInWithPassword.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/github/se/travelpouch/ui/authentication/SignInWithPassword.kt
Outdated
Show resolved
Hide resolved
To answer to your main comment :
|
…ders and back navigation, and adding the log in option with password refactor: Making the files in the correct directories, modules in di folders and TestSignInWithEmailAndPassword in unit Test
…ing tests for the UI with login with password and email
…lPouch/travelpouch into test/end-to-end-test-final-version
…conds style: removing useless logs in mock repositories
…alled the non-mock variable profileViewModel, but must call profileRepository which is mock
…h google, and blocking log in and sign in button on EmailAndPassword screen when a method of authentication is chosen, to avoid double authentication
…lPouch/travelpouch into test/end-to-end-test-final-version
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work! You made the changes, ask. I found no problems so I think we can merge it !
No description provided.