Updating code to use MinConsecutiveWeeks instead of MinWeeks - legacy…#166
Updating code to use MinConsecutiveWeeks instead of MinWeeks - legacy…#166
Conversation
… clinical scheduler code does not show or update MinWeeks
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughParameter and property Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 14 minutes and 26 seconds.Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #166 +/- ##
==========================================
+ Coverage 43.34% 43.40% +0.05%
==========================================
Files 863 863
Lines 50476 50476
Branches 4724 4724
==========================================
+ Hits 21879 21909 +30
+ Misses 28074 28044 -30
Partials 523 523
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
test/ClinicalScheduler/RotationMappingExtensionsTests.cs (1)
25-43:⚠️ Potential issue | 🟡 Minor | ⚡ Quick win
MinConsecutiveWeeksis arranged but never asserted in this test.Add an assertion for the nested mapped value so this rename is actually protected by this test.
Proposed test fix
Assert.NotNull(dto.Service); Assert.Equal(rotation.Service.ServiceId, dto.Service.ServiceId); Assert.Equal(rotation.Service.ServiceName, dto.Service.ServiceName); + Assert.Equal(rotation.Service.MinConsecutiveWeeks, dto.Service.MinConsecutiveWeeks);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@test/ClinicalScheduler/RotationMappingExtensionsTests.cs` around lines 25 - 43, The test in RotationMappingExtensionsTests constructs a rotation with MinConsecutiveWeeks set but never asserts it; update the assertion block after dto = rotation.ToDto() to assert the nested mapped value by adding an assertion comparing rotation.MinConsecutiveWeeks to dto.MinConsecutiveWeeks so the mapping is verified (locate the rotation variable and the dto result in the test and add Assert.Equal(rotation.MinConsecutiveWeeks, dto.MinConsecutiveWeeks)).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@test/ClinicalScheduler/RotationMappingExtensionsTests.cs`:
- Around line 25-43: The test in RotationMappingExtensionsTests constructs a
rotation with MinConsecutiveWeeks set but never asserts it; update the assertion
block after dto = rotation.ToDto() to assert the nested mapped value by adding
an assertion comparing rotation.MinConsecutiveWeeks to dto.MinConsecutiveWeeks
so the mapping is verified (locate the rotation variable and the dto result in
the test and add Assert.Equal(rotation.MinConsecutiveWeeks,
dto.MinConsecutiveWeeks)).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: be1e4873-ad92-40c2-9047-9706720fcd1a
📒 Files selected for processing (10)
test/ClinicalScheduler/EvaluationPolicyServiceTest.cstest/ClinicalScheduler/RotationMappingExtensionsTests.cstest/ClinicalScheduler/ServiceMappingExtensionsTests.csweb/Areas/ClinicalScheduler/Controllers/RotationsController.csweb/Areas/ClinicalScheduler/Extensions/ServiceMappingExtensions.csweb/Areas/ClinicalScheduler/Models/DTOs/Responses/ServiceDto.csweb/Areas/ClinicalScheduler/Services/EvaluationPolicyService.csweb/Areas/ClinicalScheduler/Services/IEvaluationPolicyService.csweb/Classes/SQLContext/ClinicalSchedulerContext.csweb/Models/ClinicalScheduler/Service.cs
Bundle ReportBundle size has no change ✅ |
… clinical scheduler code does not show or update MinWeeks
Summary by CodeRabbit
WeekSizetoMinConsecutiveWeeksin clinical scheduler APIs and models.MinConsecutiveWeeksinstead ofWeekSize.serviceMinConsecutiveWeeksparameter instead ofserviceWeekSize.