Skip to content
Open
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
1 change: 1 addition & 0 deletions .github/actions/acceptance-tests-components/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
3 changes: 2 additions & 1 deletion .github/actions/test-types.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
"component",
"e2e"
"e2e",
"sandbox"
]
13 changes: 5 additions & 8 deletions specification/api/components/schemas/apiGatewayError.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion tests/constants/api-constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
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 =
"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`;
Expand Down
2 changes: 1 addition & 1 deletion tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
8 changes: 8 additions & 0 deletions tests/sandbox/testCases/get-letter-status-test-cases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ type GetLetterData = {
attributes: {
specificationId: string;
groupId: string;
sha256Hash: string;
status: string;
};
};
Expand All @@ -39,6 +40,7 @@ type RejectedLetterData = {
attributes: {
specificationId: string;
groupId: string;
sha256Hash: string;
status: string;
reasonCode: string;
reasonText: string;
Expand Down Expand Up @@ -74,6 +76,8 @@ export const apiSandboxGetLetterStatusTestData: ApiSandboxGetLetterStatusTestCas
attributes: {
specificationId: "2WL5eYSWGzCHlGmzNxuqVusPxDg",
groupId: "c5d93f917f5546d08beccf770a915d96",
sha256Hash:
"3a7bd3e2360a3d29eea436fcfb7e44c735d117c8f2f1d2d1e4f6e8f7e6e8f7e6",
status: "ACCEPTED",
},
},
Expand All @@ -91,6 +95,8 @@ export const apiSandboxGetLetterStatusTestData: ApiSandboxGetLetterStatusTestCas
attributes: {
specificationId: "2WL5eYSWGzCHlGmzNxuqVusPxDg",
groupId: "c5d93f917f5546d08beccf770a915d96",
sha256Hash:
"3a7bd3e2360a3d29eea436fcfb7e44c735d117c8f2f1d2d1e4f6e8f7e6e8f7e6",
status: "REJECTED",
reasonCode: "R01",
reasonText: "failed validation",
Expand All @@ -110,6 +116,8 @@ export const apiSandboxGetLetterStatusTestData: ApiSandboxGetLetterStatusTestCas
attributes: {
specificationId: "2WL5eYSWGzCHlGmzNxuqVusPxDg",
groupId: "c5d93f917f5546d08beccf770a915d96",
sha256Hash:
"3a7bd3e2360a3d29eea436fcfb7e44c735d117c8f2f1d2d1e4f6e8f7e6e8f7e6",
status: "CANCELLED",
reasonCode: "R01",
},
Expand Down
3 changes: 3 additions & 0 deletions tests/sandbox/testCases/get-list-of-letters-test-cases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type ApiData = {
attributes: {
specificationId: string;
groupId: string;
sha256Hash: string;
status: string;
};
};
Expand Down Expand Up @@ -59,6 +60,8 @@ export const apiSandboxGetLettersRequestTestData: ApiSandboxGetLettersRequestTes
attributes: {
specificationId: "2WL5eYSWGzCHlGmzNxuqVusPxDg",
groupId: "c5d93f917f5546d08beccf770a915d96",
sha256Hash:
"3a7bd3e2360a3d29eea436fcfb7e44c735d117c8f2f1d2d1e4f6e8f7e6e8f7e6",
status: "PENDING",
},
},
Expand Down
Loading