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/adapt existing tests #327

Merged
merged 81 commits into from
Dec 20, 2024
Merged

Test/e2e/adapt existing tests #327

merged 81 commits into from
Dec 20, 2024

Conversation

francelu
Copy link
Contributor

@francelu francelu commented Dec 17, 2024

Adapt Existing End-to-End tests

Description

This PR introduces the setup and tear down in existing end-to-end authentication and profile tests. It closes issue #322.

Changes

In all ProfileScreens, I don't test for contribution and no review card since we're going to clean up the UI on unimplemented features.

Authentication

I separated the sign-in and sign-up tests since they should be independent.

Sign-In

  • Set up: It mocks the navigation, and creates a new authentication account, its new profile, and logs out.
  • Tear down: Deletes the user profile from the database.

Sign-Up

  • Set up: It mocks the navigation.
  • Tear down: There's no tear down. However, we do delete the account going through the SettingsScreen and the delete button.

Profile

  • Set up: It mocks the navigation, and creates a new authentication account, its new profile, and logs out.
  • Tear down: Deletes the user profile from the database.

Files

Added

  • app/src/androidTest/java/com/android/periodpals/endtoend/EndToEndProfile.kt
  • app/src/androidTest/java/com/android/periodpals/endtoend/EndToEndSignIn.kt
  • app/src/androidTest/java/com/android/periodpals/endtoend/EndToEndSignUp.kt

Dependencies Added

None.

Testing

Conducted end-to-end tests for sign-in, sign-up, and profile edit flows to ensure proper setup and tear down.

charliemangano and others added 22 commits November 18, 2024 18:30
Increases timeout to 50s for CI.

Added `.performScrollTo` everywhere applicable.

Cleared the text fields in EditProfile screen before inputting new values.

Added inline comments and docs for clarity.
fix/misc/fix-e2e : Add tests to e2e branch
…ialog

This fixes #235.
Lines added it make it so that that permission to push notifications is granted, so the dialog is never shown.
Once the Manifest is updated (through PR #234) to have the permission to push notifications, these tests are good to go.
…c/fix-e2e-handle-push-perm-request

# Conflicts:
#	app/src/androidTest/java/com/android/periodpals/endtoend/EndToEndM1.kt
#	app/src/androidTest/java/com/android/periodpals/endtoend/EndToEndM2.kt
…-perm-request

test/misc/fix-e2e-handle-push-perm-request : Fix end-to-end to handle push notification permission request dialog
- RLS changed for users insertion.
- Trouble deleting the account.
- Ensured activity is finished on tear down.
@francelu francelu self-assigned this Dec 17, 2024
@francelu francelu linked an issue Dec 17, 2024 that may be closed by this pull request
@francelu francelu added bug Something isn't working enhancement New feature or request labels Dec 17, 2024
@francelu francelu marked this pull request as ready for review December 20, 2024 01:22
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.

Good implementation of the end-to-end tests, they're complete and all pass, good job! LGTM!

Copy link
Member

@agonzalez-r agonzalez-r 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 cleverly and effectively test the user flows.

Important (which includes)

Code Quality

[This includes readability, consistency]

Functionality

  • Code is very clean and consistent

Documentation

  • Good documentation, using steps() improves readability greatly.

Suggestions

  • Respond or implement my nitpicks

Steps before PR approved

LGTM

@francelu francelu merged commit 21140d6 into main Dec 20, 2024
3 checks passed
@francelu francelu deleted the test/e2e/adapt-existing-tests branch December 20, 2024 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adapt M1 and M2 end-to-ends
3 participants