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

test: E2E #167

Merged
merged 19 commits into from
Nov 14, 2024
Merged

test: E2E #167

merged 19 commits into from
Nov 14, 2024

Conversation

yassine04e
Copy link
Contributor

No description provided.

@RemIsMyWaifuu RemIsMyWaifuu requested review from RemIsMyWaifuu and removed request for RemIsMyWaifuu November 11, 2024 17:07
yassine04e and others added 5 commits November 12, 2024 06:21
…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
@yassine04e yassine04e marked this pull request as draft November 12, 2024 07:29
…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
@yassine04e yassine04e requested a review from Unsaved2 November 12, 2024 08:43
@yassine04e yassine04e self-assigned this Nov 12, 2024
@yassine04e yassine04e marked this pull request as ready for review November 12, 2024 08:45
@yassine04e yassine04e added the test Adding tests label Nov 12, 2024
@yassine04e yassine04e modified the milestone: 2 Nov 12, 2024
@yassine04e yassine04e linked an issue Nov 12, 2024 that may be closed by this pull request
@yassine04e yassine04e mentioned this pull request Nov 12, 2024
Copy link
Contributor

@Unsaved2 Unsaved2 left a 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 :

  1. Add Appmodule in a folder di (Dependency Injection)
  2. Add ProfileRepositoryMock, TravelRepositoryMock in a folder mock
  3. The sign button should be less visible because it is not the main option for sign in
  4. The screen for the Sign in with password can be maybe prettier ?

@yassine04e
Copy link
Contributor Author

To answer to your main comment :

  1. Yes, I added the di folder.
  2. I think we don't need a mock module since the mock repositories are considered as the model part of our application and they just implement an interface of a specific repository.
  3. No need, we can have two authentication options.
  4. Yes, I corrected it.

yassine04e and others added 7 commits November 13, 2024 05:43
…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
@yassine04e yassine04e requested a review from Unsaved2 November 13, 2024 07:39
…h google, and blocking log in and sign in button on EmailAndPassword screen when a method of authentication is chosen, to avoid double authentication
Copy link
Contributor

@Unsaved2 Unsaved2 left a 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 !

@yassine04e yassine04e merged commit f6b04ba into main Nov 14, 2024
2 checks passed
@StefanPetersTM StefanPetersTM deleted the test/end-to-end-test-final-version branch December 11, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Adding tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement an End-to-End test
2 participants