-
Notifications
You must be signed in to change notification settings - Fork 108
[MBL-17659][Student] - Implement E2E test for draft assignment #3467
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-17659][Student] - Implement E2E test for draft assignment #3467
Conversation
Add some page object methods. Add ComposeCustomActions util file. Add rceditor dependency to espresso gradle. Move TextSubmissionUploadPage from classic to compose pages. refs: MBL-17659 affects: Student release note: -
…ignment # Conflicts: # apps/student/src/androidTest/java/com/instructure/student/ui/utils/StudentComposeTest.kt # apps/student/src/androidTest/java/com/instructure/student/ui/utils/StudentTest.kt
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 migrates the TextSubmissionUploadPage from classic views to Compose and adds a new E2E test for draft assignment functionality. The changes look solid overall with good test coverage for the draft submission workflow.
Issues Found
- Missing copyright header in
TextSubmissionUploadPage.kt- Should include Apache License 2.0 header - Missing newlines at EOF in
TextSubmissionUploadPage.ktandCustomActions.kt - Test naming inconsistency -
test1DraftAssignmentE2Eshould betestDraftAssignmentE2E
Positive Aspects
✓ Good test coverage - The new test1DraftAssignmentE2E test comprehensively covers the draft submission workflow including save/don't save scenarios
✓ Clean migration - The refactor from classic to Compose is well-structured and maintains the same functionality
✓ Helpful utilities - New TypeInRCETextEditor action and RCE assertions (RCETextEditorContentAssertion, RCETextEditorHtmlAssertion) will be useful for other tests
✓ Consistent patterns - The Compose page object follows established patterns in the codebase
✓ Proper dependency management - Added rceditor dependency to espresso module appropriately
Test Quality
The new E2E test follows good practices:
- Clear logging at each step with PREPARATION_TAG, STEP_TAG, and ASSERTION_TAG
- Tests both positive paths (saving draft) and negative paths (not saving draft)
- Verifies draft state persistence and retrieval
- Includes WorkManager task handling for submission
Minor Observations
The @Stub annotation updates clarify that the failures are specifically "Worker issue" related, which is helpful context for anyone investigating those tests later.
| @@ -0,0 +1,60 @@ | |||
| package com.instructure.student.ui.pages.compose | |||
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.
Missing copyright header. This file should include the standard Apache License 2.0 header like the deleted classic version had.
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.
Please add copyright header.
...nt/src/androidTest/java/com/instructure/student/ui/pages/compose/TextSubmissionUploadPage.kt
Show resolved
Hide resolved
|
|
||
| @E2E | ||
| @Test | ||
| @TestMetaData(Priority.COMMON, FeatureCategory.ASSIGNMENTS, TestCategory.E2E) |
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.
The test method name test1DraftAssignmentE2E has an unusual "1" prefix. Consider renaming to testDraftAssignmentE2E to match the naming convention of other tests in this file.
automation/espresso/src/main/kotlin/com/instructure/canvas/espresso/CustomActions.kt
Show resolved
Hide resolved
📊 Code Coverage Report✅ Student
✅ Teacher
✅ Pandautils
📈 Overall Average
|
🧪 Unit Test Results✅ 📱 Student App
✅ 🌅 Horizon
✅ 📦 Submodules
📊 Summary
Last updated: Thu, 08 Jan 2026 14:40:08 GMT |
| @@ -0,0 +1,60 @@ | |||
| package com.instructure.student.ui.pages.compose | |||
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.
Please add copyright header.
Implement E2E test for Draft assignment feature.
Add some page object methods.
Add ComposeCustomActions util file.
Add rceditor dependency to espresso gradle.
Move TextSubmissionUploadPage from classic to compose pages.
refs: MBL-17659
affects: Student
release note: -