Fixes release testing tests & sample gaps#14098
Conversation
📝 WalkthroughWalkthroughAdds a new ChangesRSV Subtyping, Sample Material & Test Type Updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.44.0)sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.javaThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
sormas-api/src/test/java/de/symeda/sormas/api/sample/PathogenTestTypeTest.java (1)
101-104: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover these new methods in the exhaustive result-type contract test.
ANTIGEN_DETECTION,LATEX_AGGLUTINATION, andRSV_SUBTYPINGnow have explicit@ResultValueTypeRel(QUALITATIVE)annotations inPathogenTestType.java, but this update only checks selectability.everyMethodMapsToItsExpectedResultValueTypesstill treats unmapped methods as default-qualitative, so those annotations could be deleted without failing a test.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@sormas-api/src/test/java/de/symeda/sormas/api/sample/PathogenTestTypeTest.java` around lines 101 - 104, The exhaustive result-type contract test in PathogenTestTypeTest currently only verifies selectability and still lets unmapped methods fall back to the default qualitative behavior, so the new `@ResultValueTypeRel`(QUALITATIVE) annotations on ANTIGEN_DETECTION, LATEX_AGGLUTINATION, and RSV_SUBTYPING are not actually covered. Update everyMethodMapsToItsExpectedResultValueTypes to include and assert these PathogenTestType methods explicitly, alongside the existing expected result value type mapping, so removing the annotations would fail the contract test.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@sormas-api/src/test/java/de/symeda/sormas/api/sample/PathogenTestTypeTest.java`:
- Around line 101-104: The exhaustive result-type contract test in
PathogenTestTypeTest currently only verifies selectability and still lets
unmapped methods fall back to the default qualitative behavior, so the new
`@ResultValueTypeRel`(QUALITATIVE) annotations on ANTIGEN_DETECTION,
LATEX_AGGLUTINATION, and RSV_SUBTYPING are not actually covered. Update
everyMethodMapsToItsExpectedResultValueTypes to include and assert these
PathogenTestType methods explicitly, alongside the existing expected result
value type mapping, so removing the annotations would fail the contract test.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: b490437b-36ae-4467-b3d8-79f6ede55c29
📒 Files selected for processing (10)
sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.javasormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.javasormas-api/src/main/java/de/symeda/sormas/api/sample/SampleMaterial.javasormas-api/src/main/resources/captions.propertiessormas-api/src/main/resources/enum.propertiessormas-api/src/test/java/de/symeda/sormas/api/sample/PathogenTestTypeTest.javasormas-api/src/test/java/de/symeda/sormas/api/sample/SampleMaterialTest.javasormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonSideComponentsElement.javasormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/DiseaseSectionFactory.javasormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/RsvSectionComponent.java
Fixes #14014 #14025 #14023 #14034 #14026 #14031 #14024
Summary by CodeRabbit
New Features
Bug Fixes