Skip to content

Commit c11ec7d

Browse files
Merge branch 'main' into AEA-5328-go-back-button-functionality
2 parents 06da3e2 + 64e1d81 commit c11ec7d

File tree

15 files changed

+430
-371
lines changed

15 files changed

+430
-371
lines changed

package-lock.json

Lines changed: 340 additions & 338 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
"@semantic-release/changelog": "^6.0.3",
4646
"@semantic-release/release-notes-generator": "^14.1.0",
4747
"@types/jest": "^30.0.0",
48-
"@types/node": "^24.6.2",
48+
"@types/node": "^24.7.1",
4949
"@typescript-eslint/eslint-plugin": "^8.42.0",
50-
"@typescript-eslint/parser": "^8.43.0",
50+
"@typescript-eslint/parser": "^8.46.0",
5151
"aws-sdk-client-mock": "^4.1.0",
52-
"eslint": "^9.36.0",
52+
"eslint": "^9.37.0",
5353
"eslint-config-prettier": "^10.1.8",
5454
"eslint-plugin-import-newlines": "^1.3.4",
5555
"eslint-plugin-prettier": "^5.5.4",
@@ -60,10 +60,10 @@
6060
"jest-junit": "^16.0.0",
6161
"license-checker": "^25.0.1",
6262
"semantic-release": "^24.2.8",
63-
"ts-jest": "^29.4.4",
63+
"ts-jest": "^29.4.5",
6464
"ts-node": "^10.9.2",
6565
"typescript": "^5.9.3",
66-
"typescript-eslint": "^8.45.0"
66+
"typescript-eslint": "^8.46.0"
6767
},
6868
"dependencies": {
6969
"conventional-changelog-eslint": "^6.0.0",

packages/CIS2SignOutLambda/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
},
1515
"dependencies": {
1616
"@aws-lambda-powertools/logger": "^2.27.0",
17-
"@aws-sdk/client-dynamodb": "^3.896.0",
18-
"@aws-sdk/lib-dynamodb": "^3.902.0",
17+
"@aws-sdk/client-dynamodb": "^3.908.0",
18+
"@aws-sdk/lib-dynamodb": "^3.908.0",
1919
"@cpt-ui-common/authFunctions": "^1.0.0",
2020
"@cpt-ui-common/dynamoFunctions": "^1.0.0",
2121
"@cpt-ui-common/middyErrorHandler": "^1.0.0",

packages/cdk/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
},
99
"dependencies": {
1010
"aws-cdk-lib": "^2.219.0",
11-
"cdk-nag": "^2.37.36",
11+
"cdk-nag": "^2.37.49",
1212
"constructs": "^10.4.2"
1313
},
1414
"devDependencies": {
15-
"aws-cdk": "^2.1029.4"
15+
"aws-cdk": "^2.1030.0"
1616
}
1717
}

packages/cognito/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"dependencies": {
1616
"@aws-lambda-powertools/logger": "^2.27.0",
1717
"@aws-lambda-powertools/parameters": "^2.27.0",
18-
"@aws-sdk/client-dynamodb": "^3.896.0",
19-
"@aws-sdk/lib-dynamodb": "^3.902.0",
18+
"@aws-sdk/client-dynamodb": "^3.908.0",
19+
"@aws-sdk/lib-dynamodb": "^3.908.0",
2020
"@cpt-ui-common/authFunctions": "^1.0.0",
2121
"@cpt-ui-common/dynamoFunctions": "^1.0.0",
2222
"@cpt-ui-common/lambdaUtils": "^1.0.0",

packages/common/authFunctions/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
"check-licenses": "license-checker --failOn GPL --failOn LGPL --start ../.."
1414
},
1515
"devDependencies": {
16-
"@aws-sdk/client-dynamodb": "^3.896.0",
16+
"@aws-sdk/client-dynamodb": "^3.908.0",
1717
"axios": "^1.12.2",
1818
"mock-jwks": "3.2.2"
1919
},
2020
"dependencies": {
2121
"@aws-lambda-powertools/logger": "^2.27.0",
2222
"@aws-lambda-powertools/parameters": "^2.27.0",
23-
"@aws-sdk/lib-dynamodb": "^3.902.0",
23+
"@aws-sdk/lib-dynamodb": "^3.908.0",
2424
"@cpt-ui-common/dynamoFunctions": "^1.0.0",
2525
"@middy/core": "^6.4.5",
2626
"aws-lambda": "^1.0.7",

packages/common/dynamoFunctions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"dependencies": {
1616
"@aws-lambda-powertools/logger": "^2.27.0",
17-
"@aws-sdk/lib-dynamodb": "^3.902.0",
17+
"@aws-sdk/lib-dynamodb": "^3.908.0",
1818
"@cpt-ui-common/common-types": "^1.0.0"
1919
}
2020
}

packages/cpt-ui/__tests__/EpsPrescriptionList.test.tsx

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ const mockSearchResponse: SearchResponse = {
234234
{
235235
prescriptionId: "RX003",
236236
isDeleted: false,
237-
statusCode: PrescriptionStatus.WITH_DISPENSER_ACTIVE,
237+
statusCode: PrescriptionStatus.AWAITING_RELEASE_READY,
238238
issueDate: "2025-03-10",
239239
prescriptionTreatmentType: TreatmentType.ERD,
240240
issueNumber: 3,
@@ -247,7 +247,7 @@ const mockSearchResponse: SearchResponse = {
247247
{
248248
prescriptionId: "RX004",
249249
isDeleted: false,
250-
statusCode: PrescriptionStatus.DISPENSED,
250+
statusCode: PrescriptionStatus.NOT_DISPENSED,
251251
issueDate: "2025-01-15",
252252
prescriptionTreatmentType: TreatmentType.REPEAT,
253253
issueNumber: 1,
@@ -258,7 +258,7 @@ const mockSearchResponse: SearchResponse = {
258258
{
259259
prescriptionId: "RX005",
260260
isDeleted: false,
261-
statusCode: PrescriptionStatus.NOT_DISPENSED,
261+
statusCode:PrescriptionStatus.CLAIMED,
262262
issueDate: "2024-12-20",
263263
prescriptionTreatmentType: TreatmentType.ACUTE,
264264
issueNumber: 1,
@@ -835,4 +835,61 @@ describe("PrescriptionListPage", () => {
835835
expect(heading).toHaveTextContent("Sorry, there is a problem with this service")
836836
})
837837
})
838+
it("renders correct message for a current prescription", async () => {
839+
mockedAxios.get.mockResolvedValue({
840+
status: 200,
841+
data: mockSearchResponse
842+
})
843+
844+
renderWithRouter(
845+
FRONTEND_PATHS.PRESCRIPTION_LIST_CURRENT,
846+
signedInAuthState,
847+
{
848+
...defaultSearchState,
849+
prescriptionId: "C0C757-A83008-C2D93O"
850+
}
851+
)
852+
expect(mockedAxios.get).toHaveBeenCalledTimes(1)
853+
854+
const statusLabel = await screen.findByText("Available to download when due")
855+
expect(statusLabel).toBeInTheDocument()
856+
})
857+
it("renders correct message for a past prescription", async () => {
858+
mockedAxios.get.mockResolvedValue({
859+
status: 200,
860+
data: mockSearchResponse
861+
})
862+
863+
renderWithRouter(
864+
FRONTEND_PATHS.PRESCRIPTION_LIST_PAST,
865+
signedInAuthState,
866+
{
867+
...defaultSearchState,
868+
prescriptionId: "C0C757-A83008-C2D93O"
869+
}
870+
)
871+
expect(mockedAxios.get).toHaveBeenCalledTimes(1)
872+
873+
const statusLabel = await screen.findByText("Not dispensed")
874+
expect(statusLabel).toBeInTheDocument()
875+
})
876+
it("renders correct message for a future prescription", async () => {
877+
mockedAxios.get.mockResolvedValue({
878+
status: 200,
879+
data: mockSearchResponse
880+
})
881+
882+
renderWithRouter(
883+
FRONTEND_PATHS.PRESCRIPTION_LIST_FUTURE,
884+
signedInAuthState,
885+
{
886+
...defaultSearchState,
887+
prescriptionId: "C0C757-A83008-C2D93O"
888+
}
889+
)
890+
expect(mockedAxios.get).toHaveBeenCalledTimes(1)
891+
892+
const statusLabel = await screen.findByText("To dispense in the future")
893+
expect(statusLabel).toBeInTheDocument()
894+
})
838895
})

packages/cpt-ui/src/constants/ui-strings/StatusLabels.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const STATUS_LABELS = {
22
prescription: {
3-
"0000": "Next repeat ready to download",
3+
"0000": "Available to download when due",
44
"0001": "Available to download",
55
"0002": "Downloaded by a dispenser",
66
"0003": "Some items dispensed",
@@ -11,7 +11,7 @@ export const STATUS_LABELS = {
1111
"0008": "Claimed",
1212
"0009": "Not claimed",
1313
"9000": "Future eRD issue",
14-
"9001": "Future issue date dispense",
14+
"9001": "To dispense in the future",
1515
"9005": "Future prescription cancelled"
1616
},
1717
item: {

packages/patientSearchLambda/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
},
1515
"dependencies": {
1616
"@aws-lambda-powertools/logger": "^2.27.0",
17-
"@aws-sdk/client-dynamodb": "^3.896.0",
18-
"@aws-sdk/lib-dynamodb": "^3.902.0",
17+
"@aws-sdk/client-dynamodb": "^3.908.0",
18+
"@aws-sdk/lib-dynamodb": "^3.908.0",
1919
"@cpt-ui-common/authFunctions": "^1.0.0",
2020
"@cpt-ui-common/lambdaUtils": "^1.0.0",
2121
"@cpt-ui-common/middyErrorHandler": "^1.0.0",

0 commit comments

Comments
 (0)