From 4e14dbf4161d7a9d46d130a1d895041ca7fcf858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dafydd=20Ll=C5=B7r=20Pearson?= Date: Mon, 15 Jul 2024 14:14:35 +0100 Subject: [PATCH] fix: Failing tests - Bump planx-core - Add missing team_settings queries - Add reference_code for BOPS e2e tests --- .../pay/service/inviteToPay/sendPaymentEmail.ts | 11 ++++++++++- .../saveAndReturn/service/resumeApplication.ts | 11 ++++++++++- api.planx.uk/package.json | 2 +- api.planx.uk/pnpm-lock.yaml | 8 ++++---- e2e/tests/api-driven/package.json | 2 +- e2e/tests/api-driven/pnpm-lock.yaml | 8 ++++---- e2e/tests/api-driven/src/globalHelpers.ts | 1 - e2e/tests/api-driven/src/invite-to-pay/helpers.ts | 2 +- e2e/tests/ui-driven/package.json | 2 +- e2e/tests/ui-driven/pnpm-lock.yaml | 8 ++++---- editor.planx.uk/package.json | 2 +- editor.planx.uk/pnpm-lock.yaml | 10 +++++----- 12 files changed, 42 insertions(+), 25 deletions(-) diff --git a/api.planx.uk/modules/pay/service/inviteToPay/sendPaymentEmail.ts b/api.planx.uk/modules/pay/service/inviteToPay/sendPaymentEmail.ts index 1924d221d7..acb92aa972 100644 --- a/api.planx.uk/modules/pay/service/inviteToPay/sendPaymentEmail.ts +++ b/api.planx.uk/modules/pay/service/inviteToPay/sendPaymentEmail.ts @@ -74,7 +74,16 @@ const validatePaymentRequest = async ( name slug domain - settings: team_settings + settings: team_settings { + boundaryUrl: boundary_url + boundaryBBox: boundary_bbox + homepage + helpEmail: help_email + helpPhone: help_phone + helpOpeningHours: help_opening_hours + emailReplyToId: email_reply_to_id + boundaryBBox: boundary_bbox + } } } } diff --git a/api.planx.uk/modules/saveAndReturn/service/resumeApplication.ts b/api.planx.uk/modules/saveAndReturn/service/resumeApplication.ts index e8c1eb1414..3c33c34e09 100644 --- a/api.planx.uk/modules/saveAndReturn/service/resumeApplication.ts +++ b/api.planx.uk/modules/saveAndReturn/service/resumeApplication.ts @@ -66,7 +66,16 @@ const validateRequest = async ( teams(where: { slug: { _eq: $teamSlug } }) { slug name - settings: team_settings + settings: team_settings { + boundaryUrl: boundary_url + boundaryBBox: boundary_bbox + homepage + helpEmail: help_email + helpPhone: help_phone + helpOpeningHours: help_opening_hours + emailReplyToId: email_reply_to_id + boundaryBBox: boundary_bbox + } domain } } diff --git a/api.planx.uk/package.json b/api.planx.uk/package.json index a239159c3c..b8f5c2aece 100644 --- a/api.planx.uk/package.json +++ b/api.planx.uk/package.json @@ -5,7 +5,7 @@ "packageManager": "pnpm@8.6.6", "dependencies": { "@airbrake/node": "^2.1.8", - "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#d99d371", + "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#28ef2e1", "@types/isomorphic-fetch": "^0.0.36", "adm-zip": "^0.5.10", "aws-sdk": "^2.1467.0", diff --git a/api.planx.uk/pnpm-lock.yaml b/api.planx.uk/pnpm-lock.yaml index e4a3d211a3..ce78e0da53 100644 --- a/api.planx.uk/pnpm-lock.yaml +++ b/api.planx.uk/pnpm-lock.yaml @@ -14,8 +14,8 @@ dependencies: specifier: ^2.1.8 version: 2.1.8 '@opensystemslab/planx-core': - specifier: git+https://github.com/theopensystemslab/planx-core#d99d371 - version: github.com/theopensystemslab/planx-core/d99d371 + specifier: git+https://github.com/theopensystemslab/planx-core#28ef2e1 + version: github.com/theopensystemslab/planx-core/28ef2e1 '@types/isomorphic-fetch': specifier: ^0.0.36 version: 0.0.36 @@ -8224,8 +8224,8 @@ packages: resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} dev: false - github.com/theopensystemslab/planx-core/d99d371: - resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/d99d371} + github.com/theopensystemslab/planx-core/28ef2e1: + resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/28ef2e1} name: '@opensystemslab/planx-core' version: 1.0.0 prepare: true diff --git a/e2e/tests/api-driven/package.json b/e2e/tests/api-driven/package.json index 0cc2dc6504..36bd925ab6 100644 --- a/e2e/tests/api-driven/package.json +++ b/e2e/tests/api-driven/package.json @@ -7,7 +7,7 @@ "packageManager": "pnpm@8.6.6", "dependencies": { "@cucumber/cucumber": "^9.3.0", - "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#d99d371", + "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#28ef2e1", "axios": "^1.6.8", "dotenv": "^16.3.1", "dotenv-expand": "^10.0.0", diff --git a/e2e/tests/api-driven/pnpm-lock.yaml b/e2e/tests/api-driven/pnpm-lock.yaml index 0ea543a1ee..6a4ced3cff 100644 --- a/e2e/tests/api-driven/pnpm-lock.yaml +++ b/e2e/tests/api-driven/pnpm-lock.yaml @@ -9,8 +9,8 @@ dependencies: specifier: ^9.3.0 version: 9.3.0 '@opensystemslab/planx-core': - specifier: git+https://github.com/theopensystemslab/planx-core#d99d371 - version: github.com/theopensystemslab/planx-core/d99d371 + specifier: git+https://github.com/theopensystemslab/planx-core#28ef2e1 + version: github.com/theopensystemslab/planx-core/28ef2e1 axios: specifier: ^1.6.8 version: 1.6.8 @@ -3070,8 +3070,8 @@ packages: resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} dev: false - github.com/theopensystemslab/planx-core/d99d371: - resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/d99d371} + github.com/theopensystemslab/planx-core/28ef2e1: + resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/28ef2e1} name: '@opensystemslab/planx-core' version: 1.0.0 prepare: true diff --git a/e2e/tests/api-driven/src/globalHelpers.ts b/e2e/tests/api-driven/src/globalHelpers.ts index 159e8290ba..88a0cafcb9 100644 --- a/e2e/tests/api-driven/src/globalHelpers.ts +++ b/e2e/tests/api-driven/src/globalHelpers.ts @@ -11,7 +11,6 @@ export function createTeam( submissionEmail: TEST_EMAIL, settings: { homepage: "http://www.planx.uk", - referenceCode: "ABCD", }, ...args, }), diff --git a/e2e/tests/api-driven/src/invite-to-pay/helpers.ts b/e2e/tests/api-driven/src/invite-to-pay/helpers.ts index 4a856b1b77..d8d2db0acf 100644 --- a/e2e/tests/api-driven/src/invite-to-pay/helpers.ts +++ b/e2e/tests/api-driven/src/invite-to-pay/helpers.ts @@ -186,7 +186,7 @@ const setupMockBopsSubmissionUrl = async (teamId: number) => { export const setup = async () => { await setUpMocks(); - const teamId = await createTeam(); + const teamId = await createTeam({ settings: { referenceCode: "ABC" } }); const userId = await createUser(); await setupMockBopsSubmissionUrl(teamId); diff --git a/e2e/tests/ui-driven/package.json b/e2e/tests/ui-driven/package.json index 55ad185ac8..aef15caa86 100644 --- a/e2e/tests/ui-driven/package.json +++ b/e2e/tests/ui-driven/package.json @@ -8,7 +8,7 @@ "postinstall": "./install-dependencies.sh" }, "dependencies": { - "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#d99d371", + "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#28ef2e1", "axios": "^1.6.8", "dotenv": "^16.3.1", "eslint": "^8.56.0", diff --git a/e2e/tests/ui-driven/pnpm-lock.yaml b/e2e/tests/ui-driven/pnpm-lock.yaml index 63589aa730..66692984a7 100644 --- a/e2e/tests/ui-driven/pnpm-lock.yaml +++ b/e2e/tests/ui-driven/pnpm-lock.yaml @@ -6,8 +6,8 @@ settings: dependencies: '@opensystemslab/planx-core': - specifier: git+https://github.com/theopensystemslab/planx-core#d99d371 - version: github.com/theopensystemslab/planx-core/d99d371 + specifier: git+https://github.com/theopensystemslab/planx-core#28ef2e1 + version: github.com/theopensystemslab/planx-core/28ef2e1 axios: specifier: ^1.6.8 version: 1.6.8 @@ -2803,8 +2803,8 @@ packages: resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} dev: false - github.com/theopensystemslab/planx-core/d99d371: - resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/d99d371} + github.com/theopensystemslab/planx-core/28ef2e1: + resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/28ef2e1} name: '@opensystemslab/planx-core' version: 1.0.0 prepare: true diff --git a/editor.planx.uk/package.json b/editor.planx.uk/package.json index 35d0b0913a..221eb47337 100644 --- a/editor.planx.uk/package.json +++ b/editor.planx.uk/package.json @@ -13,7 +13,7 @@ "@mui/material": "^5.15.2", "@mui/utils": "^5.15.2", "@opensystemslab/map": "^0.8.3", - "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#d99d371", + "@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#28ef2e1", "@tiptap/core": "^2.4.0", "@tiptap/extension-bold": "^2.0.3", "@tiptap/extension-bubble-menu": "^2.1.13", diff --git a/editor.planx.uk/pnpm-lock.yaml b/editor.planx.uk/pnpm-lock.yaml index 0f7a7ae085..d36afeaebb 100644 --- a/editor.planx.uk/pnpm-lock.yaml +++ b/editor.planx.uk/pnpm-lock.yaml @@ -43,8 +43,8 @@ dependencies: specifier: ^0.8.3 version: 0.8.3 '@opensystemslab/planx-core': - specifier: git+https://github.com/theopensystemslab/planx-core#d99d371 - version: github.com/theopensystemslab/planx-core/d99d371(@types/react@18.2.45) + specifier: git+https://github.com/theopensystemslab/planx-core#28ef2e1 + version: github.com/theopensystemslab/planx-core/28ef2e1(@types/react@18.2.45) '@tiptap/core': specifier: ^2.4.0 version: 2.4.0(@tiptap/pm@2.0.3) @@ -21858,9 +21858,9 @@ packages: use-sync-external-store: 1.2.0(react@18.2.0) dev: false - github.com/theopensystemslab/planx-core/d99d371(@types/react@18.2.45): - resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/d99d371} - id: github.com/theopensystemslab/planx-core/d99d371 + github.com/theopensystemslab/planx-core/28ef2e1(@types/react@18.2.45): + resolution: {tarball: https://codeload.github.com/theopensystemslab/planx-core/tar.gz/28ef2e1} + id: github.com/theopensystemslab/planx-core/28ef2e1 name: '@opensystemslab/planx-core' version: 1.0.0 prepare: true