From 42da4797bc36d4c9771e56025ed15a0c007f2d75 Mon Sep 17 00:00:00 2001 From: Michael Harrison Date: Fri, 14 Nov 2025 17:03:20 +0000 Subject: [PATCH 01/11] CCM-12744: WIP --- .../__snapshots__/page.test.tsx.snap | 24 ++ .../app/choose-templates/page.test.tsx | 1 + .../__snapshots__/page.test.tsx.snap | 24 ++ .../edit-message-plan-settings/page.test.tsx | 24 +- .../__tests__/app/message-plans/page.test.tsx | 1 + .../molecules/MessagePlanBlock.test.tsx | 8 + .../MessagePlanChannelTemplate.test.tsx | 6 + .../MessagePlanBlock.test.tsx.snap | 32 +++ .../MessagePlanChannelTemplate.test.tsx.snap | 32 +++ .../organisms/CreateEditMessagePlan.test.tsx | 1 + .../organisms/MessagePlanChannelList.test.tsx | 1 + .../CreateEditMessagePlan.test.tsx.snap | 24 ++ .../MessagePlanChannelList.test.tsx.snap | 48 ++++ .../PreviewLetterTemplate.test.tsx.snap | 10 +- .../helpers/routing-config-factory.ts | 1 + .../get-message-plan-template-ids.test.ts | 18 +- .../src/__tests__/utils/message-plans.test.ts | 31 ++- .../[routingConfigId]/actions.test.ts | 1 + .../[routingConfigId]/actions.ts | 8 +- .../[routingConfigId]/page.tsx | 6 + .../[routingConfigId]/server-action.ts | 14 +- .../[templateId]/page.tsx | 14 +- .../[templateId]/page.tsx | 14 +- .../MessagePlanBlock/MessagePlanBlock.tsx | 3 + .../MessagePlanChannelTemplate.tsx | 16 +- .../MessagePlanChannelList.tsx | 1 + .../PreviewLetterTemplate.tsx | 6 +- .../utils/get-message-plan-template-ids.ts | 2 +- frontend/src/utils/message-plans.ts | 8 +- .../modules/backend-api/spec.tmpl.json | 33 ++- .../api/create-routing-config.test.ts | 1 + .../api/delete-routing-config.test.ts | 56 +++- .../src/__tests__/api/delete.test.ts | 11 +- .../src/__tests__/api/proof.test.ts | 6 +- .../api/submit-routing-config.test.ts | 56 +++- .../src/__tests__/api/submit.test.ts | 6 +- .../api/update-routing-config.test.ts | 68 ++++- .../src/__tests__/api/update.test.ts | 11 +- .../app/routing-config-client.test.ts | 123 ++++++-- .../src/__tests__/app/template-client.test.ts | 12 +- .../src/__tests__/fixtures/routing-config.ts | 1 + .../repository.test.ts | 227 ++++++++++++--- .../infra/template-repository.test.ts | 14 +- .../src/api/delete-routing-config.ts | 3 +- .../src/api/submit-routing-config.ts | 3 +- .../src/api/update-routing-config.ts | 3 +- .../src/app/routing-config-client.ts | 49 +++- .../backend-api/src/app/template-client.ts | 20 +- .../routing-config-repository/repository.ts | 45 ++- .../src/infra/template-repository.ts | 24 +- .../routing-config-api-client.test.ts | 11 +- .../src/routing-config-api-client.ts | 11 +- .../src/schemas/routing-config.ts | 8 +- .../src/schemas/template-schema.ts | 4 +- .../src/types/generated/types.gen.ts | 33 ++- .../factories/routing-config-factory.ts | 1 + .../create-routing-configuration.api.spec.ts | 2 + .../delete-routing-config.api.spec.ts | 134 ++++++--- .../delete-template.api.spec.ts | 6 +- .../request-proof.api.spec.ts | 6 +- .../submit-routing-config.api.spec.ts | 150 +++++++--- .../submit-template.api.spec.ts | 6 +- .../update-routing-config.api.spec.ts | 262 ++++++++++++------ .../update-template.api.spec.ts | 6 +- .../routing-config-update-builder.test.ts | 58 ++++ .../src/routing-config-update-builder.ts | 15 + utils/utils/src/types.ts | 1 + 67 files changed, 1501 insertions(+), 364 deletions(-) diff --git a/frontend/src/__tests__/app/choose-templates/__snapshots__/page.test.tsx.snap b/frontend/src/__tests__/app/choose-templates/__snapshots__/page.test.tsx.snap index 0a3996d36..30df80b18 100644 --- a/frontend/src/__tests__/app/choose-templates/__snapshots__/page.test.tsx.snap +++ b/frontend/src/__tests__/app/choose-templates/__snapshots__/page.test.tsx.snap @@ -127,14 +127,22 @@ exports[`ChooseTemplatesPage renders correctly for a message plan with multiple
+