Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update DrawBoundary upload key from proposal.drawing.locationPlan to locationPlan #2758

Merged
merged 2 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const uploadedPlansBreadcrumb = {
EO6DzPso8o: {
auto: false,
data: {
"proposal.drawing.locationPlan": [
locationPlan: [
{
file: {
path: "fut.email.png",
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading