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

Production deploy #3148

Merged
merged 10 commits into from
May 15, 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
2 changes: 2 additions & 0 deletions api.planx.uk/modules/gis/service/digitalLand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ const localAuthorityMetadata: Record<string, LocalAuthorityMetadata> = {
camden: require("./local_authorities/metadata/camden"),
canterbury: require("./local_authorities/metadata/canterbury"),
doncaster: require("./local_authorities/metadata/doncaster"),
"epsom-and-ewell": require("./local_authorities/metadata/epsomAndEwell"),
gateshead: require("./local_authorities/metadata/gateshead"),
lambeth: require("./local_authorities/metadata/lambeth"),
medway: require("./local_authorities/metadata/medway"),
newcastle: require("./local_authorities/metadata/newcastle"),
southwark: require("./local_authorities/metadata/southwark"),
"st-albans": require("./local_authorities/metadata/stAlbans"),
tewkesbury: require("./local_authorities/metadata/tewkesbury"),
"west-berkshire": require("./local_authorities/metadata/westBerkshire"),
};

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*
LAD20CD: E07000208
LAD20NM: Epsom and Ewell
LAD20NMW:
FID:

https://www.planning.data.gov.uk/entity/?dataset=article-4-direction-area&geometry_curie=statistical-geography%3AE07000208&entry_date_day=&entry_date_month=&entry_date_year=
https://docs.google.com/spreadsheets/d/1BzYZ_YvJjOrY2afxPGWbPvV2g_FLBr0H/edit#gid=125611981
*/

import { LocalAuthorityMetadata } from "../../digitalLand";

const planningConstraints: LocalAuthorityMetadata["planningConstraints"] = {
article4: {
// Planx granular values link to Digital Land article-4-direction and entity.reference
records: {
"article4.epsomAndEwell.burghheath": "11/00003/ART4",
"article4.epsomAndEwell.churchstreet": "11/00004/ART4",
"article4.epsomAndEwell.college": "11/00005/ART4",
"article4.epsomAndEwell.downs": "11/00006/ART4",
"article4.epsomAndEwell.ewellvillage": "11/00002/ART4",
"article4.epsomAndEwell.highergreenlongdown": "05/00002/ART4",
"article4.epsomAndEwell.lintons": "11/00007/ART4",
"article4.epsomAndEwell.pikes": "12/00002/ART4",
"article4.epsomAndEwell.pikesPart": "11/00008/ART4",
"article4.epsomAndEwell.stamfordgreen": "05/00001/ART4",
"article4.epsomAndEwell.greenewelldowns": "05/00004/ART4",
"article4.epsomAndEwell.worple": "11/00009/ART4",
"article4.epsomAndEwell.adelphi": "16/00008/ART4",
"article4.epsomAndEwell.aplanhouse": "16/00013/ART4",
"article4.epsomAndEwell.bradfordhouse": "16/00013/ART4",
"article4.epsomAndEwell.eastleighhouse": "16/00005/ART4",
"article4.epsomAndEwell.emeraldhouse": "16/00009/ART4",
"article4.epsomAndEwell.epsomchase": "16/00004/ART4",
"article4.epsomAndEwell.epsomgateway": "16/00015/ART4",
"article4.epsomAndEwell.globalhouse": "16/00016/ART4",
"article4.epsomAndEwell.horizonhouse": "16/00012/ART4",
"article4.epsomAndEwell.newplanhouse": "16/00006/ART4",
"article4.epsomAndEwell.nightingalehouse": "16/00007/ART4",
"article4.epsomAndEwell.oakshouse": "16/00014/ART4",
"article4.epsomAndEwell.parksidehouse": "16/00017/ART4",
"article4.epsomAndEwell.sollishouse": "16/00011/ART4",
"article4.epsomAndEwell.thekirkgate": "16/00019/ART4",
"article4.epsomAndEwell.thewells": "16/00018/ART4",
},
},
};

export { planningConstraints };
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
LAD20CD: E06000037
LAD20NM: West Berkshire
LAD20NMW:
FID:

https://www.planning.data.gov.uk/entity/?dataset=article-4-direction-area&geometry_curie=statistical-geography%3AE06000037&entry_date_day=&entry_date_month=&entry_date_year=#51.47483223935322,-1.0401689836322703,17.030900256454515z
https://docs.google.com/spreadsheets/d/1dRTb8xhcJgsQB8zIFregenm5aEzrZGU_/edit#gid=322896440
*/

import { LocalAuthorityMetadata } from "../../digitalLand";

const planningConstraints: LocalAuthorityMetadata["planningConstraints"] = {
article4: {
// Planx granular values link to Digital Land article-4-direction and entity.reference
records: {
"article4.westBerkshire.oxfordroad": "23/00295/ART4",
"article4.westBerkshire.theobalddrive": "23/00294/ART4",
"article4.westBerkshire.hollies": "23/00293/ART4",
"article4.westBerkshire.bridleway": "23/00292/ART4",
"article4.westBerkshire.sawmills": "22/00011/ART4",
"article4.westBerkshire.fordsfarmestate": "23/00291/ART4",
"article4.westBerkshire.hollybushlane": "22/00012/ART4",
"article4.westBerkshire.shawroad": "23/00296/ART4",
"article4.westBerkshire.eastgarston": "22/00010/ART4",
},
},
};

export { planningConstraints };
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ import { Operation } from "../sanitiseApplicationData/types";
*/

const ALLOW_LIST = [
"proposal.projectType",
"application.declaration.connection",
"property.type",
"drawBoundary.action",
"user.role",
"findProperty.action",
"property.constraints.planning",
"property.type",
"proposal.projectType",
"user.role",
];

export const getAnalyzeSessionOperations = (): Operation[] => [
Expand Down
2 changes: 1 addition & 1 deletion api.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@airbrake/node": "^2.1.8",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#d8acbea",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#2732b6e",
"@types/isomorphic-fetch": "^0.0.36",
"adm-zip": "^0.5.10",
"aws-sdk": "^2.1467.0",
Expand Down
9 changes: 5 additions & 4 deletions api.planx.uk/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/tests/api-driven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dependencies": {
"@cucumber/cucumber": "^9.3.0",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#d8acbea",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#2732b6e",
"axios": "^1.6.8",
"dotenv": "^16.3.1",
"dotenv-expand": "^10.0.0",
Expand Down
8 changes: 4 additions & 4 deletions e2e/tests/api-driven/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/tests/ui-driven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"postinstall": "./install-dependencies.sh"
},
"dependencies": {
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#d8acbea",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#2732b6e",
"axios": "^1.6.8",
"dotenv": "^16.3.1",
"eslint": "^8.56.0",
Expand Down
8 changes: 4 additions & 4 deletions e2e/tests/ui-driven/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion editor.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@mui/material": "^5.15.2",
"@mui/utils": "^5.15.2",
"@opensystemslab/map": "^0.8.2",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#d8acbea",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#2732b6e",
"@tiptap/core": "^2.0.3",
"@tiptap/extension-bold": "^2.0.3",
"@tiptap/extension-bubble-menu": "^2.1.13",
Expand Down
10 changes: 5 additions & 5 deletions editor.planx.uk/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ it("should not have any accessibility violations", async () => {
expect(results).toHaveNoViolations();
});

test("shows the file upload option by default and requires user data to continue", async () => {
test("shows the file upload option by default and requires user data to continue from either page", async () => {
const handleSubmit = jest.fn();

const { user } = setup(
Expand All @@ -134,12 +134,23 @@ test("shows the file upload option by default and requires user data to continue

// Draw a boundary screen
expect(screen.getByTestId("upload-file-button")).toBeInTheDocument();
expect(screen.getByTestId("continue-button")).toBeDisabled();
expect(screen.getByTestId("continue-button")).toBeEnabled();

await user.click(screen.getByTestId("continue-button"));
expect(
screen.getByTestId("error-message-draw-boundary-map"),
).toBeInTheDocument();

// Navigate to upload a file screen
await user.click(screen.getByTestId("upload-file-button"));
expect(screen.getByText("Upload a file")).toBeInTheDocument();
expect(screen.getByTestId("continue-button")).toBeDisabled();

// Continue is enabled by default, but requires data to proceed
expect(screen.getByTestId("continue-button")).toBeEnabled();
await user.click(screen.getByTestId("continue-button"));
expect(
screen.getByTestId("error-message-upload-location-plan"),
).toBeInTheDocument();
});

test("hides the upload option and allows user to continue without drawing if editor specifies", async () => {
Expand Down
Loading