[MBL-19884][Parent] Implement E2E tests for Course Details Front Page tab including K5 elementary courses #3632
Conversation
…rses. refs: MBL-19884 affects: Parent release note:
There was a problem hiding this comment.
Review: E2E test for K5 Front Page tab visibility (MBL-19842)
Good overall approach — the page object additions (assertTabDisplayed, assertTabDoesNotExist, assertTabCount) are clean and reusable, adding isDisplayed() to the WebView matcher is a solid fix for ambiguity, and the waitForIdle() calls improve stability.
A few things worth addressing:
Issues
-
Hardcoded environment-specific constant —
K5_SUB_ACCOUNT_ID = 181364LinParentTestExtensions.ktis tied to a specific Canvas server sub-account. If tests run against a different environment this will silently produce wrong results or fail with cryptic errors. At minimum add a comment explaining which environment this ID belongs to and that it must be updated for other targets. Ideally it should be externalized as a build config or test config property. -
Missing stabilization wait after
pressBack()— IntestFrontPageTabVisibilityForK5ElementaryCoursesE2E, afterEspresso.pressBack()the test immediately callscoursesPage.clickCourseItem(courseWithoutFrontPage.name)with no wait for the courses list to be ready. Other test methods in this file calldashboardPage.waitForRender()before interacting with the courses list. This is a likely source of flakiness.Espresso.pressBack() dashboardPage.waitForRender() // add this coursesPage.clickCourseItem(courseWithoutFrontPage.name)
-
Redundant
take(students)inseedDataForK5—data.studentsListis already seeded with exactlystudentsentries, so.take(students)is a no-op. This is harmless but could mislead readers into thinking partial enrollment is intentional. Remove it or add a clarifying comment.// Before: val observedStudents = data.studentsList.take(students) // After: val observedStudents = data.studentsList
Positive feedback
- The
assertTabCountimplementation usinghasAnyAncestor(hasTestTag("courseDetailsTabRow")) and isSelectable()is precise and avoids false positives from unrelated nodes. - The log message fix (
"Summary Tab"→"Front Page Tab") is a good catch. - Enrolling parents as observers across all courses × all students in
seedDataForK5correctly mirrors the K5 scenario.
🧪 Unit Test Results✅ 📱 Parent App
✅ 📦 Submodules
📊 Summary
Last updated: Tue, 07 Apr 2026 15:24:56 GMT |
📊 Code Coverage Report✅ Student
✅ Teacher
✅ Pandautils
📈 Overall Average
|
Summary
Implement E2E test for Front Page tab visibility in K5 elementary courses.
refs: MBL-19884
affects: Parent
release note:
Checklist