Skip to content

[MBL-19884][Parent] Implement E2E tests for Course Details Front Page tab including K5 elementary courses #3632

Open
adamNagy56 wants to merge 2 commits intomasterfrom
MBL-19884-Implement-E2E-test-for-Front-Page-tab
Open

[MBL-19884][Parent] Implement E2E tests for Course Details Front Page tab including K5 elementary courses #3632
adamNagy56 wants to merge 2 commits intomasterfrom
MBL-19884-Implement-E2E-test-for-Front-Page-tab

Conversation

@adamNagy56
Copy link
Copy Markdown
Contributor

Summary

Implement E2E test for Front Page tab visibility in K5 elementary courses.

refs: MBL-19884
affects: Parent
release note:

Checklist

  • Run E2E test suite

Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 constantK5_SUB_ACCOUNT_ID = 181364L in ParentTestExtensions.kt is 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() — In testFrontPageTabVisibilityForK5ElementaryCoursesE2E, after Espresso.pressBack() the test immediately calls coursesPage.clickCourseItem(courseWithoutFrontPage.name) with no wait for the courses list to be ready. Other test methods in this file call dashboardPage.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) in seedDataForK5data.studentsList is already seeded with exactly students entries, 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 assertTabCount implementation using hasAnyAncestor(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 seedDataForK5 correctly mirrors the K5 scenario.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

🧪 Unit Test Results

✅ 📱 Parent App

  • Tests: 315 total, 0 failed, 0 skipped
  • Duration: 39.648s
  • Success Rate: 100%

✅ 📦 Submodules

  • Tests: 3349 total, 0 failed, 0 skipped
  • Duration: 59.190s
  • Success Rate: 100%

📊 Summary

  • Total Tests: 3664
  • Failed: 0
  • Skipped: 0
  • Status: ✅ All tests passed!

Last updated: Tue, 07 Apr 2026 15:24:56 GMT

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

📊 Code Coverage Report

✅ Student

  • PR Coverage: 42.65%
  • Master Coverage: 42.65%
  • Delta: +0.00%

✅ Teacher

  • PR Coverage: 25.37%
  • Master Coverage: 25.37%
  • Delta: +0.00%

✅ Pandautils

  • PR Coverage: 23.69%
  • Master Coverage: 23.69%
  • Delta: +0.00%

📈 Overall Average

  • PR Coverage: 30.57%
  • Master Coverage: 30.57%
  • Delta: +0.00%

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

Parent Install Page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant