Skip to content

Conversation

@adamNagy56
Copy link
Contributor

Summary

Extend AssignmentDetails interaction test with more submission types. (TextEntry, FileUpload, different MediaRecording types)

refs: MBl-17351
affects: Student
release note:

…types.

refs: MBL-17351
affects: Student
release note:
…ecording submission scenarios.

refs: MBL-17351
affects: Student
release note:
…n tests for better clarity.

refs: MBL-17351
affects: Student
release note:
claude[bot]

This comment was marked as resolved.

@inst-danger
Copy link
Contributor

Parent Install Page

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

📊 Code Coverage Report

✅ Student

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

✅ Teacher

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

⚠️ Pandautils

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

📈 Overall Average

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

@inst-danger
Copy link
Contributor

Teacher Install Page

@inst-danger
Copy link
Contributor

Student Install Page

adam1014-ai and others added 3 commits November 3, 2025 16:31
Adds test.txt, test_audio.mp3, and test_video.mp4 to androidTest assets directory. These files are required by AssignmentDetailsInteractionTest for testing file upload, audio, and video submission functionality. Without these files in the repository, the tests fail in CI with FileNotFoundException.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
refs: MBL-17351
affects: Student
release note:
claude[bot]

This comment was marked as resolved.

@inst-danger
Copy link
Contributor

Parent Install Page

@inst-danger
Copy link
Contributor

Teacher Install Page

@inst-danger
Copy link
Contributor

Student Install Page

refs: MBL-17351
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

Great work adding comprehensive test coverage for various assignment submission types! The tests cover important functionality including text entry, file upload, and media recording submissions.

Strengths

  • ✅ Good test coverage across multiple submission types
  • ✅ Proper use of try-finally blocks for cleanup in most tests
  • ✅ Clear test naming following the existing pattern
  • ✅ Appropriate use of TestMetaData annotations

Key Improvement Areas

1. Code Duplication: There's significant duplication in test setup code. Consider extracting common patterns into helper methods.

2. Resource Management: One test (testSubmission_submitMediaRecordingRecordVideo) is missing the try-finally pattern for Intents cleanup, which could cause test pollution.

3. Null Safety: Multiple uses of the !! operator without proper null checks could lead to unclear test failures. Consider adding assertions before non-null assertions.

4. Test Stability:

  • The audio recording test manipulates files during UI automation which could be timing-dependent
  • UiSelector regex patterns like resourceIdMatches(".*recordAudioButton") are fragile
  • Hardcoded filenames (e.g., "audio.amr") could break if implementation changes

5. Missing Dependencies: Several helper methods are called but not visible in the diff (stubFilePickerIntent, setupFileOnDevice, copyAssetFileToExternalCache). Ensure these are properly implemented.

Recommendations

  1. Extract common test setup into a shared helper method
  2. Create a helper or test rule for managing Espresso Intents lifecycle
  3. Add explicit null checks with meaningful assertions
  4. Document or share constants for hardcoded values with production code
  5. Consider more reliable synchronization for file manipulation tests

The tests are functional and provide valuable coverage. The suggestions above focus on improving maintainability, reliability, and clarity for future developers.

@inst-danger
Copy link
Contributor

Parent Install Page

@inst-danger
Copy link
Contributor

Teacher Install Page

@inst-danger
Copy link
Contributor

Student Install Page

@tamaskozmer
Copy link
Contributor

There are many places where you use fully classified names instead of imports, I would fix those (haven't commented on all of those though).

refs: MBL-17351
affects: Student
release note:
@inst-danger
Copy link
Contributor

Parent Install Page

@inst-danger
Copy link
Contributor

Teacher Install Page

@github-actions
Copy link

Student Install Page

@inst-danger
Copy link
Contributor

Student Install Page

@inst-danger
Copy link
Contributor

Student Install Page

@adamNagy56 adamNagy56 merged commit dbd6745 into master Nov 11, 2025
25 checks passed
@adamNagy56 adamNagy56 deleted the MBL-17351-Extend-AssignmentDetailsInteractionTest-with-more-submission-types branch November 11, 2025 10:28
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.

6 participants