From 539b7745417cea837114d4dfc26edf6e65722d5f Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Thu, 8 Feb 2024 16:24:50 +0000 Subject: [PATCH] chore: update DrawBoundary upload key from `proposal.drawing.locationPlan` to `locationPlan` (#2758) --- .../src/@planx/components/DrawBoundary/Public/Public.test.tsx | 2 +- editor.planx.uk/src/@planx/components/DrawBoundary/model.ts | 2 +- .../src/@planx/components/Review/Public/mocks/fileUpload.tsx | 4 ++-- .../src/@planx/components/Send/bops/__tests__/files.test.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/editor.planx.uk/src/@planx/components/DrawBoundary/Public/Public.test.tsx b/editor.planx.uk/src/@planx/components/DrawBoundary/Public/Public.test.tsx index e4a749bfd9..b3824e8ad7 100644 --- a/editor.planx.uk/src/@planx/components/DrawBoundary/Public/Public.test.tsx +++ b/editor.planx.uk/src/@planx/components/DrawBoundary/Public/Public.test.tsx @@ -7,7 +7,7 @@ import DrawBoundary from "./"; test("recovers previously submitted files when clicking the back button", async () => { const handleSubmit = jest.fn(); const previouslySubmittedData = { - "proposal.drawing.locationPlan": [ + "locationPlan": [ { file: { path: "placeholder.png", diff --git a/editor.planx.uk/src/@planx/components/DrawBoundary/model.ts b/editor.planx.uk/src/@planx/components/DrawBoundary/model.ts index f719142a4f..34d10d398b 100644 --- a/editor.planx.uk/src/@planx/components/DrawBoundary/model.ts +++ b/editor.planx.uk/src/@planx/components/DrawBoundary/model.ts @@ -42,7 +42,7 @@ export const parseDrawBoundary = ( definitionImg: data?.definitionImg || defaultContent?.["definitionImg"], }); -export const PASSPORT_UPLOAD_KEY = "proposal.drawing.locationPlan" as const; // not added to editor yet +export const PASSPORT_UPLOAD_KEY = "locationPlan" as const; // not added to editor yet export const PASSPORT_COMPONENT_ACTION_KEY = "drawBoundary.action" as const; // internal use only // Default content as of Jan 2024 when title boundaries were introduced diff --git a/editor.planx.uk/src/@planx/components/Review/Public/mocks/fileUpload.tsx b/editor.planx.uk/src/@planx/components/Review/Public/mocks/fileUpload.tsx index 205a27aa66..d8d7d3a0b1 100644 --- a/editor.planx.uk/src/@planx/components/Review/Public/mocks/fileUpload.tsx +++ b/editor.planx.uk/src/@planx/components/Review/Public/mocks/fileUpload.tsx @@ -76,7 +76,7 @@ export const uploadedPlansBreadcrumb = { EO6DzPso8o: { auto: false, data: { - "proposal.drawing.locationPlan": [ + locationPlan: [ { file: { path: "fut.email.png", @@ -113,7 +113,7 @@ export const uploadedPlansPassport = { "property.type": ["residential.dwelling.house.terrace"], "property.localAuthorityDistrict": ["Southwark"], "property.region": ["London"], - "proposal.drawing.locationPlan": [ + locationPlan: [ { file: { path: "fut.email.png", diff --git a/editor.planx.uk/src/@planx/components/Send/bops/__tests__/files.test.ts b/editor.planx.uk/src/@planx/components/Send/bops/__tests__/files.test.ts index 0276edbebe..8e6ce51738 100644 --- a/editor.planx.uk/src/@planx/components/Send/bops/__tests__/files.test.ts +++ b/editor.planx.uk/src/@planx/components/Send/bops/__tests__/files.test.ts @@ -99,10 +99,10 @@ describe("It extracts tags for", () => { }, "Location plan": { key: - PASSPORT_UPLOAD_KEY === "proposal.drawing.locationPlan" + PASSPORT_UPLOAD_KEY === "locationPlan" ? PASSPORT_UPLOAD_KEY : "key changed unexpectedly!", - tags: ["Proposed", /*"Drawing",*/ "Site", "Plan"], + tags: [/*"Proposed", "Drawing",*/ "Site", "Plan"], }, "Existing site plan": { key: "property.drawing.sitePlan",