-
Notifications
You must be signed in to change notification settings - Fork 108
[MBL-18125][Student] Add E2E test for custom reminders on assignments with no due date. #3470
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
base: master
Are you sure you want to change the base?
[MBL-18125][Student] Add E2E test for custom reminders on assignments with no due date. #3470
Conversation
refs: MBL-18125 affects: Student release note:
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.
Review Summary
This PR adds a new E2E test (testAssignmentNoDueDateCustomReminderE2E) that validates the assignment reminder functionality for assignments without due dates. The test covers important scenarios including adding custom reminders, preventing duplicate reminders, and validating invalid time inputs.
Positive Aspects
- Good test coverage for the no-due-date assignment reminder flow
- Includes edge cases like duplicate reminder prevention and invalid time validation
- Clear logging with step tags makes test execution easy to follow
- Properly structured test with appropriate assertions
Issues Found
-
Calendar object mutation bug (lines 459, 482, 487): The test uses
Calendar.apply { add(...) }which mutates the originalfutureDateobject rather than creating independent instances. This causesreminderDate,reminderDate2, andfutureDateto all reference the same mutated object, leading to unexpected behavior and making the test fragile. -
Unused mutation (line 482):
futureDate.apply { add(Calendar.HOUR, 2) }modifies the object but doesn't assign the result, appearing to be orphaned code. -
Questionable invalid time test case (line 497): Using
00:00(midnight) as the invalid time test case may not be ideal since midnight is typically a valid time. Consider using a truly invalid input or documenting why midnight is invalid for reminders.
Recommendations
- Use
futureDate.clone() as Calendarbefore applying modifications to create independent Calendar instances - Remove or clarify the purpose of the orphaned mutation on line 482
- Consider using a more obviously invalid time input for the invalid time test case
The test logic is sound, but the Calendar handling needs to be fixed to prevent potential flakiness and confusion.
apps/student/src/androidTest/java/com/instructure/student/ui/e2e/compose/AssignmentsE2ETest.kt
Show resolved
Hide resolved
apps/student/src/androidTest/java/com/instructure/student/ui/e2e/compose/AssignmentsE2ETest.kt
Outdated
Show resolved
Hide resolved
apps/student/src/androidTest/java/com/instructure/student/ui/e2e/compose/AssignmentsE2ETest.kt
Show resolved
Hide resolved
apps/student/src/androidTest/java/com/instructure/student/ui/e2e/compose/AssignmentsE2ETest.kt
Show resolved
Hide resolved
🧪 Unit Test Results✅ 📱 Student App
✅ 🌅 Horizon
✅ 📦 Submodules
📊 Summary
Last updated: Wed, 14 Jan 2026 08:28:26 GMT |
📊 Code Coverage Reportℹ️ Student
ℹ️ Teacher
ℹ️ Pandautils
|
apps/student/src/androidTest/java/com/instructure/student/ui/e2e/compose/AssignmentsE2ETest.kt
Outdated
Show resolved
Hide resolved
refs: MBL-18125 affects: Student release note:
…o-Due-Date'-assignment
…o-Due-Date'-assignment
Add E2E test for custom reminders on assignments with no due date.
refs: MBL-18125
affects: Student
release note:
Checklist