Skip to content

Commit 4750470

Browse files
remove test archive
1 parent c8c3fd8 commit 4750470

File tree

7 files changed

+50
-41
lines changed

7 files changed

+50
-41
lines changed

.github/actions/acceptance-tests/action.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,3 @@ runs:
3737
shell: bash
3838
run: |
3939
make test-${{ inputs.testType }}
40-
41-
- name: Archive test results
42-
uses: actions/upload-artifact@v4
43-
if: always()
44-
with:
45-
name: ${{ inputs.testType }} - test report
46-
path: "tests/acceptance-test-report"

tests/helpers/common-types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { SUPPLIERID } from "../constants/api-constants";
21

32
export type ErrorLink = {
43
about: string;

tests/helpers/generate-fetch-test-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
SUPPLIERID,
1010
envName,
1111
} from "../constants/api-constants";
12-
import { runCreateLetter } from "./pnpmHelpers";
12+
import { runCreateLetter } from "./pnpm-helpers";
1313

1414
const ddb = new DynamoDBClient({});
1515
const docClient = DynamoDBDocumentClient.from(ddb);

tests/helpers/pnpm-helpers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ export default async function runCreateLetter(options: {
6060
String(count),
6161
];
6262

63-
await new Promise<void>((resolve, reject) => {
63+
await new Promise<void>((resolve, reject) => {
64+
let output = "";
6465
const child = spawn(cmd, args, {
6566
stdio: "inherit",
6667
cwd: root,
Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,35 @@
1-
import { test, expect, request } from '@playwright/test';
2-
import { SUPPLIER_API_URL_SANDBOX, SUPPLIER_LETTERS} from '../constants/api-constants';
3-
import { apiSandboxGetLettersRequestTestData } from './testCases/get-list-of-letters-test-cases';
1+
import { expect, test } from "@playwright/test";
2+
import {
3+
SUPPLIER_API_URL_SANDBOX,
4+
SUPPLIER_LETTERS,
5+
} from "../constants/api-constants";
6+
import { apiSandboxGetLettersRequestTestData } from "./testCases/get-list-of-letters-test-cases";
47

5-
6-
test.describe('Sandbox Tests To Get List Of Pending Letters ', () =>
7-
{
8-
apiSandboxGetLettersRequestTestData.forEach(({ testCase, header, limit, expectedStatus, expectedResponse }) => {
8+
test.describe("Sandbox Tests To Get List Of Pending Letters ", () => {
9+
for (const {
10+
expectedResponse,
11+
expectedStatus,
12+
header,
13+
limit,
14+
testCase,
15+
} of apiSandboxGetLettersRequestTestData) {
916
test(`Get /Letters endpoint returns ${testCase}`, async ({ request }) => {
10-
11-
const response = await request.get(`${SUPPLIER_API_URL_SANDBOX}/${SUPPLIER_LETTERS}` ,{
12-
headers: header,
13-
params:{
14-
limit: limit
15-
},
17+
const response = await request.get(
18+
`${SUPPLIER_API_URL_SANDBOX}/${SUPPLIER_LETTERS}`,
19+
{
20+
headers: header,
21+
params: {
22+
limit,
1623
},
17-
);
24+
},
25+
);
1826

1927
const res = await response.json();
2028
await expect(response.status()).toBe(expectedStatus);
2129
expect(res).toEqual(expectedResponse);
22-
if (response.status() === 200){
30+
if (response.status() === 200) {
2331
expect(res.data.length.toString()).toEqual(limit);
2432
}
2533
});
26-
});
34+
}
2735
});

tests/sandbox/update-letter-status.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
SUPPLIER_API_URL_SANDBOX,
44
SUPPLIER_LETTERS,
55
} from "../constants/api-constants";
6-
import { apiSandboxUpdateLetterStatusTestData } from "./testCases/updateLetterStatus_testCases";
6+
import { apiSandboxUpdateLetterStatusTestData } from "./testCases/update-letter-status-test-cases";
77

88
test.describe("Sandbox Tests To Update Letter Status", () => {
99
for (const {
Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
1-
import { test, expect, request } from '@playwright/test';
2-
import { SUPPLIER_API_URL_SANDBOX, SUPPLIER_LETTERS} from '../constants/api-constants';
3-
import { apiSandboxMultipleLetterStatusTestData } from './testCases/updateMultipleStatus_testCases';
1+
import { expect, test } from "@playwright/test";
2+
import {
3+
SUPPLIER_API_URL_SANDBOX,
4+
SUPPLIER_LETTERS,
5+
} from "../constants/api-constants";
6+
import { apiSandboxMultipleLetterStatusTestData } from "./testCases/update-multiple-status-test-cases";
47

5-
6-
test.describe('Sandbox Tests To Update Multiple Letter Status', () =>
7-
{
8-
apiSandboxMultipleLetterStatusTestData.forEach(({ testCase, header, body, expectedStatus }) => {
8+
test.describe("Sandbox Tests To Update Multiple Letter Status", () => {
9+
for (const {
10+
body,
11+
expectedStatus,
12+
header,
13+
testCase,
14+
} of apiSandboxMultipleLetterStatusTestData) {
915
test(`Patch /Letters endpoint returns ${testCase}`, async ({ request }) => {
10-
11-
const response = await request.post(`${SUPPLIER_API_URL_SANDBOX}/${SUPPLIER_LETTERS}` ,{
12-
headers: header,
13-
data: body
14-
});
15-
expect(response.status()).toBe(expectedStatus);
16+
const response = await request.post(
17+
`${SUPPLIER_API_URL_SANDBOX}/${SUPPLIER_LETTERS}`,
18+
{
19+
headers: header,
20+
data: body,
21+
},
22+
);
23+
expect(response.status()).toBe(expectedStatus);
1624
});
17-
});
25+
}
1826
});

0 commit comments

Comments
 (0)