Conversation
d396508 to
3c64b7c
Compare
There was a problem hiding this comment.
Pull request overview
Adds British Sign Language (BSL, q4) as a supported accessible-format option in message plan (routing) flows, aligning it with existing large print and other-language routing pages.
Changes:
- Extend routing-supported letter/accessibility enums and validators to include BSL (
q4). - Add new “choose BSL template” and “preview BSL template” routing pages (plus auth protection and content).
- Add/update unit, component, routing-component, and accessibility tests to cover the new routes and UI.
Reviewed changes
Copilot reviewed 28 out of 29 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| utils/utils/src/zod-validators.ts | Adds Zod validator and helper for BSL letter templates (q4). |
| utils/utils/src/enum.ts | Updates routing-supported letter types and accessible formats to include q4. |
| utils/utils/src/tests/enum.test.ts | Updates URL mapping test to cover q4 routing choose page. |
| tests/test-team/template-mgmt-routing-component-tests/letter/preview-british-sign-language-letter-template.routing-component.spec.ts | New Playwright routing-component coverage for BSL preview page. |
| tests/test-team/template-mgmt-routing-component-tests/letter/choose-british-sign-language-letter-template.routing-component.spec.ts | New Playwright routing-component coverage for choosing a BSL template. |
| tests/test-team/template-mgmt-routing-component-tests/edit-message-plan.routing-component.spec.ts | Updates edit message plan routing-component test expectations to include BSL card/linking. |
| tests/test-team/template-mgmt-component-tests/template-protected-routes.component.spec.ts | Includes new BSL routing pages in protected-routes coverage. |
| tests/test-team/template-mgmt-accessibility/routing.accessibility.spec.ts | Adds accessibility scans for BSL choose/preview routing pages. |
| tests/test-team/template-mgmt-accessibility/route-coverage.accessibility.spec.ts | Adds BSL routing pages to accessibility route coverage list. |
| tests/test-team/pages/routing/letter/preview-british-sign-language-letter-template-page.ts | New page object model for BSL preview routing page. |
| tests/test-team/pages/routing/letter/index.ts | Exposes new BSL routing page objects via barrel export. |
| tests/test-team/pages/routing/letter/choose-british-sign-language-letter-template-page.ts | New page object model for BSL choose routing page. |
| tests/test-team/pages/routing/edit-message-plan-page.ts | Adds BSL locator helpers to the edit message plan page object. |
| package-lock.json | Patch-level AWS SDK dependency updates captured in lockfile. |
| frontend/src/middleware.ts | Protects the new BSL routing paths behind auth middleware. |
| frontend/src/content/content.ts | Adds content entries for BSL choose/preview routing pages. |
| frontend/src/app/message-plans/choose-british-sign-language-letter-template/[routingConfigId]/preview-template/[templateId]/page.tsx | New Next.js routing page to preview a BSL template from a message plan. |
| frontend/src/app/message-plans/choose-british-sign-language-letter-template/[routingConfigId]/page.tsx | New Next.js routing page to choose a BSL template for a message plan. |
| frontend/src/tests/utils/routing-utils.test.ts | Updates accessible-template extraction test to include q4. |
| frontend/src/tests/helpers/helpers.ts | Adds a reusable BSL authoring letter template test fixture. |
| frontend/src/tests/app/message-plans/review-and-move-to-production/page.test.tsx | Ensures review page renders q4 conditional template. |
| frontend/src/tests/app/message-plans/review-and-move-to-production/snapshots/page.test.tsx.snap | Snapshot updates reflecting BSL conditional template rendering. |
| frontend/src/tests/app/message-plans/preview-message-plan/page.test.tsx | Ensures message plan preview renders q4 conditional template. |
| frontend/src/tests/app/message-plans/preview-message-plan/snapshots/page.test.tsx.snap | Snapshot updates reflecting BSL conditional template rendering. |
| frontend/src/tests/app/message-plans/choose-british-sign-language-letter-template/preview-template/page.test.tsx | New unit test coverage for BSL preview routing page. |
| frontend/src/tests/app/message-plans/choose-british-sign-language-letter-template/preview-template/snapshots/page.test.tsx.snap | Snapshot for BSL preview routing page. |
| frontend/src/tests/app/message-plans/choose-british-sign-language-letter-template/page.test.tsx | New unit test coverage for BSL choose routing page. |
| frontend/src/tests/app/message-plans/choose-british-sign-language-letter-template/snapshots/page.test.tsx.snap | Snapshot for BSL choose routing page. |
| frontend/src/tests/app/edit-message-plan/snapshots/page.test.tsx.snap | Snapshot updates to include BSL conditional template card. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
acc99b5 to
b859392
Compare
…CCM-14747_add-bsl-to-routing-frontend
This reverts commit 0748b7c.
| 'PASSED', | ||
| { letterType: 'x1' } | ||
| ), | ||
| BSL_LETTER: TemplateFactory.uploadLetterTemplate( |
There was a problem hiding this comment.
Optional suggestion, but this might be a good time to convert these to carbone letters
There was a problem hiding this comment.
True, I did that in the the unit test helpers and thought about scrubbing through tests and shifting to default to authoring across the board, but then figured we'd surely start actively retiring pdf letters pretty quickly and it could be done then. But if vaccs means it'll be May before we can even start talking about that I'm more inclined to after all
There was a problem hiding this comment.
OK, definitely too fiddly for a tangential task to shift everything, but I've amended 'uploadLetterTemplate' to 'uploadPdfLetterTemplate' so its easier to spot, changed all the routing-related component tests except for template previews to use authoring templates, and added BSL to the review/preview message plan page tests
There was a problem hiding this comment.
Could you add renders, if the new factory templates are authoring letters in PROOF_APPROVED or SUBMITTED status please? The options object should be e.g.
{
shortFormRender: { status: 'RENDERED' },
longFormRender: { status: 'RENDERED' },
}
It shouldn't make a difference in a routing context probably, but its good to keep them realistic if possible I think
...omponent-tests/letter/choose-british-sign-language-letter-template.routing-component.spec.ts
Show resolved
Hide resolved
tests/test-team/template-mgmt-accessibility/routing.accessibility.spec.ts
Show resolved
Hide resolved
553c14a to
8861e2d
Compare
...st-team/template-mgmt-routing-component-tests/preview-message-plan.routing-component.spec.ts
Show resolved
Hide resolved
…CCM-14747_add-bsl-to-routing-frontend
utils/utils/src/enum.ts
Outdated
| export const accessibleFormatDisplayMappings = (letterType: LetterType) => { | ||
| const map: Record<LetterType, string> = { | ||
| export const accessibleFormatDisplayMappings = ( | ||
| letterType: Exclude<FrontendSupportedLetterType, 'language'> |
There was a problem hiding this comment.
| letterType: Exclude<FrontendSupportedLetterType, 'language'> | |
| letterType: FrontendSupportedAccessibleFormats |
?
| export const letterTypeMapping = (letterType: LetterType) => | ||
| `${letterTypeMap[letterType]} letter`; | ||
| export const letterTypeMapping = ( | ||
| letterType: Exclude<FrontendSupportedLetterType, 'language'> |
There was a problem hiding this comment.
| letterType: Exclude<FrontendSupportedLetterType, 'language'> | |
| letterType: FrontendSupportedAccessibleFormats |
is it not this ?
|
|
||
| export const letterTypeDisplayMappings = ( | ||
| letterType: LetterType, | ||
| letterType: Exclude<FrontendSupportedLetterType, 'language'>, |
There was a problem hiding this comment.
Both check against letterTypeMap which doesn't include 'language'
…CCM-14747_add-bsl-to-routing-frontend
Description
Context
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.