Skip to content

Conversation

@adamNagy56
Copy link
Contributor

@adamNagy56 adamNagy56 commented Dec 8, 2025

Summary

Unstubbed and refactored SpeedGrader comment and comment library interaction tests to work with the new Compose-based UI implementation.

Test Coverage

Tests validate comment library filtering, selection, sending comments, empty states, and clearing filters.

refs: MBL-19264
affects: Student, Teacher
release note:

Checklist

  • Run E2E test suite

… SubmissionDetailsInteractionTest.kt

refs: MBL-19264
affects: Student, Teacher
release note:
…larity and functionality.

refs: MBL-19264
affects: Student, Teacher
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 successfully implements previously stubbed UI tests for comment functionality in both the Student and Teacher apps. The changes demonstrate good test coverage for video/audio comment playback and comment library features.

Positive Aspects ✅

  • Comprehensive test implementation: All 12 previously stubbed tests are now fully implemented with proper assertions
  • Good test isolation: Tests properly set up mock data and use the FakeManagers pattern consistently
  • Proper use of page objects: Follows the existing page object pattern from the espresso module
  • UI modernization: Updated to use Compose testing APIs consistently (e.g., onNodeWithTag, performScrollTo)
  • Good helper functions: The createVideoAttachment and createAudioAttachment helpers reduce code duplication
  • Improved FakeSubmissionCommentsManager: Properly implements comment retrieval and creation with GraphQL mapping

Issues to Address 📋

  • Import ordering: Multiple test files have imports that are not alphabetically sorted (CommentLibraryInteractionTest.kt:49, SpeedGraderCommentsInteractionTest.kt:47). According to CLAUDE.md, imports should follow Kotlin style guides and be sorted alphabetically.
  • Hard-coded test strings: Consider extracting repeated comment text strings into constants (SpeedGraderCommentsInteractionTest.kt:270) for easier maintenance.

Code Quality Observations

Test Structure: The refactoring of goToSpeedGraderCommentsPage() to accept flexible parameters (commentText, isTeacherComment, commentCount) is well-designed and makes tests more readable.

Wait Strategy: The use of waitUntilExactlyOneExists with 5-second timeouts is appropriate for UI rendering scenarios and should help with test stability.

Thread Safety Note: The FakeSubmissionCommentsManager.createSubmissionComment() implementation mutates the submission's comments list, which is appropriate for test purposes. This should be safe as MockCanvas data is typically per-test instance, but worth noting for future maintainers if parallel test execution is added.

Overall Assessment

This is solid test implementation work that significantly improves test coverage for comment functionality. The minor issues noted above are primarily style concerns and don't affect functionality. Great job implementing these complex UI interaction tests!

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

📊 Code Coverage Report

✅ Student

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

✅ Teacher

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

⚠️ Pandautils

  • PR Coverage: 22.56%
  • Master Coverage: 22.56%
  • Delta: -0.00%

📈 Overall Average

  • PR Coverage: 30.26%
  • Master Coverage: 30.26%
  • Delta: -0.00%

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

🧪 Unit Test Results

✅ 📱 Student App

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

✅ 📱 Teacher App

  • Tests: 364 total, 0 failed, 0 skipped
  • Duration: 37.849s
  • Success Rate: 100%

✅ 🌅 Horizon

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

✅ 📦 Submodules

  • Tests: 2418 total, 0 failed, 0 skipped
  • Duration: 51.783s
  • Success Rate: 100%

📊 Summary

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

Last updated: Tue, 09 Dec 2025 13:20:11 GMT

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

Student Install Page

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

Teacher Install Page

refs: MBL-19264
affects: Student, Teacher
release note:
refs: MBL-19264
affects: Student, Teacher
release note:
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.

3 participants