From 71f32bf0648ec812fff03940c2d6a42d8cd018d0 Mon Sep 17 00:00:00 2001 From: Vlasis-Perdikidis Date: Mon, 27 Jul 2026 21:54:22 +0000 Subject: [PATCH 1/3] tests passing locally --- tests/constants/api-constants.ts | 3 ++- tests/package.json | 2 +- tests/sandbox/testCases/get-letter-status-test-cases.ts | 8 ++++++++ tests/sandbox/testCases/get-list-of-letters-test-cases.ts | 3 +++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/constants/api-constants.ts b/tests/constants/api-constants.ts index f2d9df297..72efefa5a 100644 --- a/tests/constants/api-constants.ts +++ b/tests/constants/api-constants.ts @@ -1,6 +1,7 @@ export const SUPPLIER_LETTERS = "letters"; +const DEFAULT_SUPPLIER_API_URL_SANDBOX = "http://127.0.0.1:9000"; export const SUPPLIER_API_URL_SANDBOX = - "https://internal-dev-sandbox.api.service.nhs.uk/nhs-notify-supplier"; + process.env.SUPPLIER_API_URL_SANDBOX ?? DEFAULT_SUPPLIER_API_URL_SANDBOX; export const AWS_REGION = "eu-west-2"; export const envName = process.env.TARGET_ENVIRONMENT ?? "main"; export const API_NAME = `nhs-${envName}-supapi`; diff --git a/tests/package.json b/tests/package.json index d2fab44c1..b3c6e5b5b 100644 --- a/tests/package.json +++ b/tests/package.json @@ -51,7 +51,7 @@ "test:component": "playwright test --config=config/main.config.ts --max-failures=10", "test:pact": "./pact-tests/run-pact-tests.sh", "test:performance": "playwright test --config=config/performance/performance.config.ts --max-failures=10 --project=performance", - "test:sandbox": "playwright test --config=config/sandbox.config.ts --max-failures=10 --project=sandbox", + "test:sandbox": "playwright test --config=config/sandbox.config.ts --max-failures=9 --project=sandbox", "test:unit": "echo \"No unit tests for tests package\"", "typecheck": "tsc --noEmit" }, diff --git a/tests/sandbox/testCases/get-letter-status-test-cases.ts b/tests/sandbox/testCases/get-letter-status-test-cases.ts index 1e039b922..4f8ec2808 100644 --- a/tests/sandbox/testCases/get-letter-status-test-cases.ts +++ b/tests/sandbox/testCases/get-letter-status-test-cases.ts @@ -29,6 +29,7 @@ type GetLetterData = { attributes: { specificationId: string; groupId: string; + sha256Hash: string; status: string; }; }; @@ -39,6 +40,7 @@ type RejectedLetterData = { attributes: { specificationId: string; groupId: string; + sha256Hash: string; status: string; reasonCode: string; reasonText: string; @@ -74,6 +76,8 @@ export const apiSandboxGetLetterStatusTestData: ApiSandboxGetLetterStatusTestCas attributes: { specificationId: "2WL5eYSWGzCHlGmzNxuqVusPxDg", groupId: "c5d93f917f5546d08beccf770a915d96", + sha256Hash: + "3a7bd3e2360a3d29eea436fcfb7e44c735d117c8f2f1d2d1e4f6e8f7e6e8f7e6", status: "ACCEPTED", }, }, @@ -91,6 +95,8 @@ export const apiSandboxGetLetterStatusTestData: ApiSandboxGetLetterStatusTestCas attributes: { specificationId: "2WL5eYSWGzCHlGmzNxuqVusPxDg", groupId: "c5d93f917f5546d08beccf770a915d96", + sha256Hash: + "3a7bd3e2360a3d29eea436fcfb7e44c735d117c8f2f1d2d1e4f6e8f7e6e8f7e6", status: "REJECTED", reasonCode: "R01", reasonText: "failed validation", @@ -110,6 +116,8 @@ export const apiSandboxGetLetterStatusTestData: ApiSandboxGetLetterStatusTestCas attributes: { specificationId: "2WL5eYSWGzCHlGmzNxuqVusPxDg", groupId: "c5d93f917f5546d08beccf770a915d96", + sha256Hash: + "3a7bd3e2360a3d29eea436fcfb7e44c735d117c8f2f1d2d1e4f6e8f7e6e8f7e6", status: "CANCELLED", reasonCode: "R01", }, diff --git a/tests/sandbox/testCases/get-list-of-letters-test-cases.ts b/tests/sandbox/testCases/get-list-of-letters-test-cases.ts index b41534b37..c26daae04 100644 --- a/tests/sandbox/testCases/get-list-of-letters-test-cases.ts +++ b/tests/sandbox/testCases/get-list-of-letters-test-cases.ts @@ -22,6 +22,7 @@ type ApiData = { attributes: { specificationId: string; groupId: string; + sha256Hash: string; status: string; }; }; @@ -59,6 +60,8 @@ export const apiSandboxGetLettersRequestTestData: ApiSandboxGetLettersRequestTes attributes: { specificationId: "2WL5eYSWGzCHlGmzNxuqVusPxDg", groupId: "c5d93f917f5546d08beccf770a915d96", + sha256Hash: + "3a7bd3e2360a3d29eea436fcfb7e44c735d117c8f2f1d2d1e4f6e8f7e6e8f7e6", status: "PENDING", }, }, From 2bd2e59de78e241cde0d9ba7511c854bda93dcf8 Mon Sep 17 00:00:00 2001 From: Vlasis-Perdikidis Date: Mon, 27 Jul 2026 22:10:03 +0000 Subject: [PATCH 2/3] re-enable sandbox tests in pipeline --- .github/actions/test-types.json | 3 ++- .../api/components/schemas/apiGatewayError.yml | 13 +++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/actions/test-types.json b/.github/actions/test-types.json index 6ae115da8..fe18d5da7 100644 --- a/.github/actions/test-types.json +++ b/.github/actions/test-types.json @@ -1,4 +1,5 @@ [ "component", - "e2e" + "e2e", + "sandbox" ] diff --git a/specification/api/components/schemas/apiGatewayError.yml b/specification/api/components/schemas/apiGatewayError.yml index a36048f67..ac1de3f8b 100644 --- a/specification/api/components/schemas/apiGatewayError.yml +++ b/specification/api/components/schemas/apiGatewayError.yml @@ -1,9 +1,6 @@ +type: object description: API gateway error response -content: - application/json: - schema: - type: object - properties: - message: - type: string - example: "Bad Gateway" +properties: + message: + type: string + example: Bad Gateway From 4c4e46fe02ccfd0aa96c6f1f83e44467711af289 Mon Sep 17 00:00:00 2001 From: Vlasis-Perdikidis Date: Tue, 28 Jul 2026 13:37:44 +0000 Subject: [PATCH 3/3] correct SUPPLIER_API_URL_SANDBOX for pipeilne --- .github/actions/acceptance-tests-components/action.yml | 1 + tests/constants/api-constants.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/actions/acceptance-tests-components/action.yml b/.github/actions/acceptance-tests-components/action.yml index 0071d20d1..297779dbd 100644 --- a/.github/actions/acceptance-tests-components/action.yml +++ b/.github/actions/acceptance-tests-components/action.yml @@ -44,5 +44,6 @@ runs: env: TARGET_ENVIRONMENT: ${{ inputs.targetEnvironment }} TARGET_ACCOUNT_GROUP: ${{ inputs.targetAccountGroup }} + SUPPLIER_API_URL_SANDBOX: https://internal-dev-sandbox.api.service.nhs.uk/nhs-notify-supplier run: | make test-${{ inputs.testType }} diff --git a/tests/constants/api-constants.ts b/tests/constants/api-constants.ts index 72efefa5a..e45e3ebe4 100644 --- a/tests/constants/api-constants.ts +++ b/tests/constants/api-constants.ts @@ -1,4 +1,5 @@ export const SUPPLIER_LETTERS = "letters"; +// previous "https://internal-dev-sandbox.api.service.nhs.uk/nhs-notify-supplier"; const DEFAULT_SUPPLIER_API_URL_SANDBOX = "http://127.0.0.1:9000"; export const SUPPLIER_API_URL_SANDBOX = process.env.SUPPLIER_API_URL_SANDBOX ?? DEFAULT_SUPPLIER_API_URL_SANDBOX;