From 1c389246998cd526103a26cecb20c91d2f3d235f Mon Sep 17 00:00:00 2001 From: Craig Broady Date: Fri, 16 Aug 2024 10:12:57 +0100 Subject: [PATCH 1/2] feat(cb2-13572): added example test stations for vef --- .../testStationsFunction.intTest.ts | 4 +- tests/resources/test-stations.json | 51 +++++++++++++++++++ tests/unit/TestStationService.unitTest.ts | 2 +- 3 files changed, 54 insertions(+), 3 deletions(-) diff --git a/tests/integration/testStationsFunction.intTest.ts b/tests/integration/testStationsFunction.intTest.ts index ecc8f17..cccb800 100644 --- a/tests/integration/testStationsFunction.intTest.ts +++ b/tests/integration/testStationsFunction.intTest.ts @@ -15,8 +15,8 @@ describe("getTestStations", () => { context("when database is populated", () => { it("should return only the active test stations", () => { return LambdaTester(getTestStations).expectResolve((result: any) => { - expect(testStations).toHaveLength(24); - expect(JSON.parse(result.body)).toHaveLength(23); + expect(testStations).toHaveLength(27); + expect(JSON.parse(result.body)).toHaveLength(25); expect(result.statusCode).toEqual(200); }); }); diff --git a/tests/resources/test-stations.json b/tests/resources/test-stations.json index c8ae9b8..eaa1f92 100644 --- a/tests/resources/test-stations.json +++ b/tests/resources/test-stations.json @@ -403,5 +403,56 @@ "testStationStatus": "active", "testStationTown": "Ruthin", "testStationType": "atf" + }, + { + "testStationId": "25", + "testStationAddress": "1042 Bow Lane", + "testStationContactNumber": "02074892500", + "testStationEmails": [], + "testStationGeneralNotes": "Example of English VEF site with inactive status", + "testStationAccessNotes": "", + "testStationLatitude": 181, + "testStationLongitude": 362, + "testStationName": "VEF 1", + "testStationPNumber": "V99900", + "testStationPostcode": "EC4M 9DT", + "testStationCountry": "England", + "testStationStatus": "inactive", + "testStationTown": "London", + "testStationType": "vef" + }, + { + "testStationId": "26", + "testStationAddress": "3400 Tan-y-Bryn Road", + "testStationContactNumber": "01492879456", + "testStationEmails": [], + "testStationGeneralNotes": "Example of Welsh VEF site with active status", + "testStationAccessNotes": "", + "testStationLatitude": 181, + "testStationLongitude": 362, + "testStationName": "New Test ATF 2", + "testStationPNumber": "V99901", + "testStationPostcode": "LL30 1UU", + "testStationCountry": "Wales", + "testStationStatus": "active", + "testStationTown": "Llandudno", + "testStationType": "vef" + }, + { + "testStationId": "27", + "testStationAddress": "2108 Church Street", + "testStationContactNumber": "02088925908", + "testStationEmails": [], + "testStationGeneralNotes": "Example of English VEF site with active status", + "testStationAccessNotes": "", + "testStationLatitude": 181, + "testStationLongitude": 362, + "testStationName": "ATF 3", + "testStationPNumber": "V99902", + "testStationPostcode": "TW1 3NJ", + "testStationCountry": "England", + "testStationStatus": "active", + "testStationTown": "Twickenham", + "testStationType": "vef" } ] diff --git a/tests/unit/TestStationService.unitTest.ts b/tests/unit/TestStationService.unitTest.ts index dd9b70a..82fb1f8 100644 --- a/tests/unit/TestStationService.unitTest.ts +++ b/tests/unit/TestStationService.unitTest.ts @@ -30,7 +30,7 @@ describe("TestStationService", () => { return testStationService .getTestStationList() .then((returnedRecords: any) => { - expect(returnedRecords.length).toEqual(24); + expect(returnedRecords.length).toEqual(27); }); }); }); From 72a4fab3f56c3fd7974c08a2bcceb4b8997bc183 Mon Sep 17 00:00:00 2001 From: Craig Broady Date: Fri, 16 Aug 2024 12:12:51 +0100 Subject: [PATCH 2/2] feat(cb2-13572): updated email addresses as per pr comment --- tests/resources/test-stations.json | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/resources/test-stations.json b/tests/resources/test-stations.json index eaa1f92..0dbf7bc 100644 --- a/tests/resources/test-stations.json +++ b/tests/resources/test-stations.json @@ -408,7 +408,10 @@ "testStationId": "25", "testStationAddress": "1042 Bow Lane", "testStationContactNumber": "02074892500", - "testStationEmails": [], + "testStationEmails": [ + "sarah.rees@vef1.co.uk", + "phil.jones@vef1.co.uk" + ], "testStationGeneralNotes": "Example of English VEF site with inactive status", "testStationAccessNotes": "", "testStationLatitude": 181, @@ -425,12 +428,15 @@ "testStationId": "26", "testStationAddress": "3400 Tan-y-Bryn Road", "testStationContactNumber": "01492879456", - "testStationEmails": [], + "testStationEmails": [ + "mike.davies@vef2.co.uk", + "bob.ross@vef2.co.uk" + ], "testStationGeneralNotes": "Example of Welsh VEF site with active status", "testStationAccessNotes": "", "testStationLatitude": 181, "testStationLongitude": 362, - "testStationName": "New Test ATF 2", + "testStationName": "VEF 2", "testStationPNumber": "V99901", "testStationPostcode": "LL30 1UU", "testStationCountry": "Wales", @@ -442,12 +448,15 @@ "testStationId": "27", "testStationAddress": "2108 Church Street", "testStationContactNumber": "02088925908", - "testStationEmails": [], + "testStationEmails": [ + "norman.bates@vef3.co.uk", + "john.smith@vef3.co.uk" + ], "testStationGeneralNotes": "Example of English VEF site with active status", "testStationAccessNotes": "", "testStationLatitude": 181, "testStationLongitude": 362, - "testStationName": "ATF 3", + "testStationName": "VEF 3", "testStationPNumber": "V99902", "testStationPostcode": "TW1 3NJ", "testStationCountry": "England",