Skip to content

Conversation

@kdeakinstructure
Copy link
Contributor

Test Plan

  1. Run the updated testConferencesE2E() test in ConferencesE2ETest.kt
  2. Verify that the test successfully:
    • Clicks the expand/collapse button to collapse the "New Conferences" group
    • Asserts that conferences are hidden when collapsed
    • Clicks the expand/collapse button again to expand the group
    • Asserts that conferences are visible again when expanded
  3. Verify all other existing assertions still pass

Changes

  • Extended Conferences E2E test with expand/collapse functionality testing
  • Added clickExpandCollapseGroup() method to ConferenceListPage to support clicking conference group headers by name
  • Added copyright headers to CollaborationsE2ETest, GradesE2ETest, and PushNotificationsE2ETest

refs: MBL-19504

affects: Student

release note: none

  • I have tested this code in light and dark mode
  • I have tested this code in portrait and landscape
  • I have run all relevant accessibility checks
  • Run E2E tests

Add some copyright to some test classes.

refs: MBL-19504
affects: Student
release note: -
Copy link

@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 Summary

This PR adds license headers to test files and implements expand/collapse functionality testing for conference groups. The changes are well-structured and follow the existing test patterns.

Positive Aspects

  • ✅ Proper Apache License 2.0 headers added to all modified files (correctly dated for their original creation)
  • ✅ Comprehensive test coverage for the expand/collapse feature with clear assertion messages
  • ✅ Good use of descriptive logging with STEP_TAG and ASSERTION_TAG
  • ✅ New page object methods follow existing naming conventions
  • ✅ Test verifies both collapsed and expanded states

Issues Found

  • Hardcoded timeout value (ConferenceListPage.kt:51) - The DoesNotExistAssertion(5) uses a magic number for timeout
  • Missing KDoc comments (ConferenceListPage.kt:50, 84) - New public methods assertConferenceNotDisplayed and clickExpandCollapseGroup lack documentation

Code Quality

The code follows Kotlin conventions and Espresso testing patterns. The test logic is clear and maintainable. Minor improvements noted in inline comments would enhance code documentation and maintainability.

Test Coverage

The new test appropriately validates the expand/collapse functionality for conference groups, including verification that items appear and disappear as expected. The test flow is logical and thorough.

Security & Performance

No security concerns identified. The changes are test-only and don't affect production code performance.

onView(allOf(withId(R.id.title), withText(conferenceTitle))).assertDisplayed()
}

fun assertConferenceNotDisplayed(conferenceTitle: String) {
Copy link

Choose a reason for hiding this comment

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

The DoesNotExistAssertion(5) uses a hardcoded timeout of 5 seconds. Consider using a constant or configuration value for consistency with other timeout values in the codebase. This would make it easier to adjust timeout behavior across all tests if needed.

fun assertConferenceDisplayed(conferenceTitle: String) {
onView(allOf(withId(R.id.title), withText(conferenceTitle))).assertDisplayed()
}

Copy link

Choose a reason for hiding this comment

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

Missing KDoc comment. Consider adding documentation to explain what this method does and when it should be used, especially since it's a public method in a page object that other tests might use.

onView(withId(R.id.title) + withText(R.string.newConferences) + withAncestor(R.id.conferenceListPage)).assertDisplayed()
}

fun clickExpandCollapseGroup(groupName: String) {
Copy link

Choose a reason for hiding this comment

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

Missing KDoc comment. Consider adding documentation to explain this method's purpose, especially since it's used for toggling both expand and collapse actions.

@github-actions
Copy link

📊 Code Coverage Report

✅ Student

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

✅ Teacher

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

✅ Pandautils

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

📈 Overall Average

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

@github-actions
Copy link

🧪 Unit Test Results

✅ 📱 Student App

  • Tests: 1241 total, 0 failed, 0 skipped
  • Duration: 0.000s
  • Success Rate: 100%

✅ 🌅 Horizon

  • Tests: 449 total, 0 failed, 0 skipped
  • Duration: 34.508s
  • Success Rate: 100%

✅ 📦 Submodules

  • Tests: 2472 total, 0 failed, 0 skipped
  • Duration: 43.670s
  • Success Rate: 100%

📊 Summary

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

Last updated: Fri, 19 Dec 2025 00:09:35 GMT

@github-actions
Copy link

Student 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.

2 participants