[MAN-2071] Add alert banner for acceptable absense#1517
Merged
Conversation
c1699e9 to
29ee307
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds “multiple acceptable absences” alerting to the acceptable-absence appointment outcome page by wiring MAS compliance data into the journey and extending Wiremock/test fixtures to exercise the new behaviour.
Changes:
- Fetch and expose
acceptableAbsenceCountfrom MAS compliance data and render a new alert panel when count > 1. - Update domain models and middleware/unit/e2e tests to include and verify acceptable absence counts.
- Extend Wiremock mappings/stubs to return acceptable absence data and counts.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| wiremock/stubs/compliance.ts | Adds acceptableAbsenceCount to the compliance stubbed response used in e2e. |
| wiremock/mappings/X778160-non-compliance-detail.json | Adds a sample acceptable absence entry in non-compliance detail response. |
| wiremock/mappings/X778160-compliance.json | Adds acceptableAbsenceCount to sentence activity counts. |
| wiremock/mappings/X778160-compliance-detail.json | Adds acceptableAbsenceCount to sentence activity counts in the detail mapping. |
| wiremock/mappings/X777916-compliance.json | Adds acceptableAbsenceCount to sentence activity counts. |
| wiremock/mappings/X000001-non-compliance-detail.json | Adds a sample acceptable absence entry in non-compliance detail response. |
| wiremock/mappings/X000001-compliance.json | Adds acceptableAbsenceCount and a second compliance mapping for months=12. |
| server/views/pages/appointment-outcomes/acceptable-absence.njk | Renders a new alert/ticket panel when multiple acceptable absences are present. |
| server/routes/appointmentOutcomes.ts | Wires getComplianceData into the acceptable-absence route. |
| server/middleware/appointment-outcomes/getComplianceData.ts | Maps MAS compliance activity acceptableAbsenceCount into res.locals.appointmentOutcome.compliance. |
| server/middleware/appointment-outcomes/getComplianceData.test.ts | Updates assertions/fixtures to include acceptableAbsenceCount. |
| server/middleware/appointment-outcomes/getBreach.test.ts | Updates sentence compliance fixture to include the new activity count. |
| server/middleware/appointment-outcomes/buildCompliance.ts | Adds acceptableAbsenceCount to the composed compliance object. |
| server/middleware/appointment-outcomes/buildCompliance.test.ts | Updates fixtures/expectations to include acceptableAbsenceCount. |
| server/data/model/overview.ts | Extends ActivityCount and Compliance interfaces with acceptable absence count fields. |
| server/controllers/appointmentOutcomes.test.ts | Adds a controller test to ensure acceptable-absence renders without MAS calls when no selected sentence is present. |
| integration_tests/e2e/appointmentOutcomes/acceptable-absence.cy.ts | Adds Cypress coverage for the new alert banner and link. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
[MAN-2071] Update failing tests [MAN-2071] Add alerting integration tests [MAN-2071] Add alerting integration tests [MAN-2071] Add alerting integration tests [MAN-2071] WIP - need add test for non compliance link check [MAN-2071] WIP - tests passing [MAN-2071] Address review comments
Luca2471
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.