-
Notifications
You must be signed in to change notification settings - Fork 2
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/alert #357
Test/e2e/alert #357
Conversation
- Changed the contentDescription of Product and urgency. - Used index to sign each MyAlertItem and PalsAlertItem.
- Use while and sleep to wait for screens to be loaded. - Use randomNumber to prevent parallel testing failures. - Removed unnecessary set up of alert VM. - Added checks after edit and delete.
…test/e2e/alert # Conflicts: # app/src/main/java/com/android/periodpals/ui/alert/AlertLists.kt
…test/e2e/alert # Conflicts: # app/src/main/java/com/android/periodpals/ui/alert/AlertLists.kt
…test/e2e/alert # Conflicts: # app/src/androidTest/java/com/android/periodpals/endtoend/EndToEndM1.kt
…test/e2e/alert # Conflicts: # app/src/main/java/com/android/periodpals/ui/alert/AlertLists.kt # app/src/test/java/com/android/periodpals/ui/alert/AlertListsScreenTest.kt
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.
Good implementation of the end-to-end tests! You found a way to make the test tags work, good job!
@@ -292,9 +293,10 @@ fun AlertListsScreen( | |||
if (myAlertsList.isEmpty()) { | |||
item { NoAlertDialog(context.getString(R.string.alert_lists_no_my_alerts_dialog)) } | |||
} else { | |||
items(myAlertsList) { alert -> | |||
itemsIndexed(myAlertsList) { index, alert -> |
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.
Good fix!
@@ -352,6 +356,7 @@ fun AlertListsScreen( | |||
* profile picture, time, location, product type, urgency, and an edit button. | |||
* | |||
* @param alert The alert to be displayed. | |||
* @param indexTestTag The index of the alert in the list. |
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.
Nice reflex
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.
Summary
Great end to end test for Alerts!
Important (which includes)
Code Quality
LGTM
Functionality
LGTM
Testing
Very cohesive tests should correctly reflect users' flow.
Alert E2E
Description
This PR introduces an end-to-end test for the flow of creating an alert and editing it and deleting it.
Changes
AlertLists.kt
, because using the alert.id in the test tag was not possible from the end to end.Files
Added
Modified
AlertLists.kt
AlertListsScreenTest
Removed
None.
Dependencies Added
None.