QA-187 | test: add Planned encounter status transition spec#16481
QA-187 | test: add Planned encounter status transition spec#16481nihal467 wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
🚀 Preview Deployment Ready!🔗 Preview URL: https://pr-16481.care-preview-a7w.pages.dev 📱 Mobile Access: This preview will be automatically updated when you push new commits to this PR. |
Greptile SummaryThis PR extracts shared encounter-form helpers into a new
Confidence Score: 5/5Test-only change with no production code modified; safe to merge. All three files are test/helper additions or refactors with no changes to production source. The helper extraction is correct, the new spec covers the intended transition matrix, and the one gap found is non-blocking. encounterFutureDateRestriction.spec.ts — four inline status-selection blocks should be migrated to the new selectStatusInCreateDialog helper introduced in the same PR. Important Files Changed
Reviews (2): Last reviewed commit: "refactor(tests): extract shared encounte..." | Re-trigger Greptile |
|
Thanks for the review @greptile-apps. Responses: 1. Cleanup contradicting CLAUDE.md — The DB snapshot is restored once per run by 2. 3. Duplication with |
|
All three points are well-addressed:
All concerns resolved. LGTM 👍 Tip: You can customize Greptile's behavior for this repo with |
Proposed Changes
Adds a Playwright spec covering the encounter-status transition rules introduced in #16476.
For a Planned encounter with a future start date:
Each test creates a fresh Planned + future-date encounter in `beforeEach`, performs the transition through the Update Encounter form, and cleans up to a terminal state (Cancelled / Entered in error) so re-runs don't hit the 5-live-encounter cap on the fixture patient.
Notes