diff --git a/.gitignore b/.gitignore
index 08fc66426..b0f959994 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,3 +38,8 @@ bin/main/application.yaml
### Generated CCD Json Definition ###
ccd-definitions/definitions/development
+
+### Miscellaneous ###
+ARCHITECTURE.md
+copilot-instructions.md
+.github/copilot-instructions.md
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index c1ca6cd37..daaee6b34 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,7 +2,7 @@ ARG APP_INSIGHTS_AGENT_VERSION=3.5.2
# Application image
-FROM hmctspublic.azurecr.io/base/java:21-distroless
+FROM hmctsprod.azurecr.io/base/java:21-distroless
COPY lib/applicationinsights.json /opt/app/
COPY build/libs/adoption-cos-api.jar /opt/app/
diff --git a/bin/functionalTest/application.yaml b/bin/functionalTest/application.yaml
index be694f928..ded49e636 100644
--- a/bin/functionalTest/application.yaml
+++ b/bin/functionalTest/application.yaml
@@ -41,6 +41,7 @@ uk:
LOCAL_COURT_APPLICATION_SUBMITTED: '2960d8dd-ab3e-4265-a71d-2d81d0fd84c8'
CITIZEN_DRAFT_APPLICATION_EXPIRING_ALERT: ''
+
s2s-authorised:
services: ${S2S_AUTHORISED_SERVICES:ccd_data}
@@ -77,7 +78,7 @@ case_document_am:
docmosis:
templates:
english:
- ADOPTION_APPLICATION_SUMMARY: FL-ADO-APP-ENG-00953.docx
+ ADOPTION_APPLICATION_SUMMARY: FL-ADO-APP-ENG-00953-R2.docx
welsh:
ADOPTION_APPLICATION_SUMMARY: FL-ADO-APP-WEL-00955.docx
diff --git a/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-added.json b/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-added.json
index fa7c09455..2dc165907 100644
--- a/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-added.json
+++ b/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-added.json
@@ -5,8 +5,9 @@
"value": {
"siblingId": "1646222663145",
"siblingRelation": "Brother",
- "siblingPoType": "some order",
- "siblingPoNumber": "1001"
+ "siblingPoType": "Adoption order",
+ "siblingPoNumber": "1001",
+ "siblingPlacementOtherType": ""
}
},
{
@@ -14,8 +15,9 @@
"value": {
"siblingId": "1646222699254",
"siblingRelation": "Sister",
- "siblingPoType": "some other order",
- "siblingPoNumber": "23456"
+ "siblingPoType": "Other",
+ "siblingPoNumber": "23456",
+ "siblingPlacementOtherType": "other type"
}
}
],
@@ -134,7 +136,7 @@
"value": {
"placementOrderId": "1646222494045",
"placementOrderDate": "2021-12-12",
- "placementOrderType": "some order2",
+ "placementOrderType": "Adoption order",
"placementOrderCourt": "london court",
"placementOrderNumber": "12345"
}
@@ -212,6 +214,8 @@
],
"solicitorName": null,
"selectedSiblingId": "1646222699254",
+ "selectedSiblingRelation": "Sister",
+ "selectedSiblingPoType": "Adoption order",
"solicitorPhoneNumber": null,
"birthFatherAddressCountry": null,
"applicant2AddressTown": "NOTTINGHAM",
diff --git a/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-failed.json b/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-failed.json
index 0de5272d1..969e28422 100644
--- a/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-failed.json
+++ b/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-failed.json
@@ -5,8 +5,9 @@
"value": {
"siblingId": "1646222663145",
"siblingRelation": "Brother",
- "siblingPoType": "some order",
- "siblingPoNumber": "1001"
+ "siblingPoType": "Adoption order",
+ "siblingPoNumber": "1001",
+ "siblingPlacementOtherType": ""
}
},
{
@@ -14,8 +15,9 @@
"value": {
"siblingId": "1646222699254",
"siblingRelation": "Sister",
- "siblingPoType": "some other order",
- "siblingPoNumber": "23456"
+ "siblingPoType": "Other",
+ "siblingPoNumber": "23456",
+ "siblingPlacementOtherType": "other type"
}
}
],
@@ -134,7 +136,7 @@
"value": {
"placementOrderId": "1646222494045",
"placementOrderDate": "2021-12-12",
- "placementOrderType": "some order2",
+ "placementOrderType": "Adoption order",
"placementOrderCourt": "london court",
"placementOrderNumber": "12345"
}
@@ -212,6 +214,8 @@
],
"solicitorName": null,
"selectedSiblingId": "1646222699254",
+ "selectedSiblingRelation": "Sister",
+ "selectedSiblingPoType": "Adoption order",
"solicitorPhoneNumber": null,
"birthFatherAddressCountry": null,
"applicant2AddressTown": "NOTTINGHAM",
diff --git a/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-not-ready.json b/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-not-ready.json
index 03f75ae9b..2fc27754c 100644
--- a/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-not-ready.json
+++ b/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-not-ready.json
@@ -5,8 +5,9 @@
"value": {
"siblingId": "1646222663145",
"siblingRelation": "Brother",
- "siblingPoType": "some order",
- "siblingPoNumber": "1001"
+ "siblingPoType": "Adoption order",
+ "siblingPoNumber": "1001",
+ "siblingPlacementOtherType": ""
}
},
{
@@ -14,8 +15,9 @@
"value": {
"siblingId": "1646222699254",
"siblingRelation": "Sister",
- "siblingPoType": "some other order",
- "siblingPoNumber": "23456"
+ "siblingPoType": "Other",
+ "siblingPoNumber": "23456",
+ "siblingPlacementOtherType": "other type"
}
}
],
@@ -134,7 +136,7 @@
"value": {
"placementOrderId": "1646222494045",
"placementOrderDate": "2021-12-12",
- "placementOrderType": "some order2",
+ "placementOrderType": "Adoption order",
"placementOrderCourt": "london court",
"placementOrderNumber": "12345"
}
@@ -212,6 +214,8 @@
],
"solicitorName": null,
"selectedSiblingId": "1646222699254",
+ "selectedSiblingRelation": "Sister",
+ "selectedSiblingPoType": "Adoption order",
"solicitorPhoneNumber": null,
"birthFatherAddressCountry": null,
"applicant2AddressTown": "NOTTINGHAM",
diff --git a/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-ready.json b/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-ready.json
index 6cb5ff350..66ccd318e 100644
--- a/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-ready.json
+++ b/bin/functionalTest/casedata/ccd-callback-casedata-application-payment-ready.json
@@ -5,8 +5,9 @@
"value": {
"siblingId": "1646222663145",
"siblingRelation": "Brother",
- "siblingPoType": "some order",
- "siblingPoNumber": "1001"
+ "siblingPoType": "Adoption order",
+ "siblingPoNumber": "1001",
+ "siblingPlacementOtherType": ""
}
},
{
@@ -14,8 +15,9 @@
"value": {
"siblingId": "1646222699254",
"siblingRelation": "Sister",
- "siblingPoType": "some other order",
- "siblingPoNumber": "23456"
+ "siblingPoType": "Other",
+ "siblingPoNumber": "23456",
+ "siblingPlacementOtherType": "other type"
}
}
],
@@ -135,7 +137,7 @@
"value": {
"placementOrderId": "1646222494045",
"placementOrderDate": "2021-12-12",
- "placementOrderType": "some order2",
+ "placementOrderType": "Adoption order",
"placementOrderCourt": "london court",
"placementOrderNumber": "12345"
}
@@ -213,6 +215,8 @@
],
"solicitorName": null,
"selectedSiblingId": "1646222699254",
+ "selectedSiblingRelation": "Sister",
+ "selectedSiblingPoType": "Adoption order",
"solicitorPhoneNumber": null,
"birthFatherAddressCountry": null,
"applicant2AddressTown": "NOTTINGHAM",
@@ -242,6 +246,11 @@
"Irish",
"Other"
],
+ "childLocalAuthority": "la",
+ "childLocalAuthorityEmail": "abc@gov.uk",
+ "childSocialWorkerEmail": "abc@gov.uk",
+ "childSocialWorkerName": "null",
+ "childSocialWorkerPhoneNumber": "1234567890",
"applicant2Email": null,
"otherParentAddressCounty": "CITY OF WESTMINSTER",
"applicant2LanguagePreference": null,
diff --git a/bin/functionalTest/casedata/ccd-callback-casedata-application-validation-failed.json b/bin/functionalTest/casedata/ccd-callback-casedata-application-validation-failed.json
index f11892136..51f051c84 100644
--- a/bin/functionalTest/casedata/ccd-callback-casedata-application-validation-failed.json
+++ b/bin/functionalTest/casedata/ccd-callback-casedata-application-validation-failed.json
@@ -5,8 +5,9 @@
"value": {
"siblingId": "1646222663145",
"siblingRelation": "Brother",
- "siblingPoType": "some order",
- "siblingPoNumber": "1001"
+ "siblingPoType": "Adoption order",
+ "siblingPoNumber": "1001",
+ "siblingPlacementOtherType": ""
}
},
{
@@ -14,8 +15,9 @@
"value": {
"siblingId": "1646222699254",
"siblingRelation": "Sister",
- "siblingPoType": "some other order",
- "siblingPoNumber": "23456"
+ "siblingPoType": "Other",
+ "siblingPoNumber": "23456",
+ "siblingPlacementOtherType": "other type"
}
}
],
@@ -134,7 +136,7 @@
"value": {
"placementOrderId": "1646222494045",
"placementOrderDate": "2021-12-12",
- "placementOrderType": "some order2",
+ "placementOrderType": "Adoption order",
"placementOrderCourt": "london court",
"placementOrderNumber": "12345"
}
@@ -212,6 +214,8 @@
],
"solicitorName": null,
"selectedSiblingId": "1646222699254",
+ "selectedSiblingRelation": "Sister",
+ "selectedSiblingPoType": "Adoption order",
"solicitorPhoneNumber": null,
"birthFatherAddressCountry": null,
"applicant2AddressTown": "NOTTINGHAM",
diff --git a/bin/functionalTest/casedata/ccd-callback-casedata-application.json b/bin/functionalTest/casedata/ccd-callback-casedata-application.json
index e8dd53148..8456c3c60 100644
--- a/bin/functionalTest/casedata/ccd-callback-casedata-application.json
+++ b/bin/functionalTest/casedata/ccd-callback-casedata-application.json
@@ -5,8 +5,9 @@
"value": {
"siblingId": "1646222663145",
"siblingRelation": "Brother",
- "siblingPoType": "some order",
- "siblingPoNumber": "1001"
+ "siblingPoType": "Adoption order",
+ "siblingPoNumber": "1001",
+ "siblingPlacementOtherType": ""
}
},
{
@@ -14,8 +15,9 @@
"value": {
"siblingId": "1646222699254",
"siblingRelation": "Sister",
- "siblingPoType": "some other order",
- "siblingPoNumber": "23456"
+ "siblingPoType": "Other",
+ "siblingPoNumber": "23456",
+ "siblingPlacementOtherType": "other type"
}
}
],
@@ -134,7 +136,7 @@
"value": {
"placementOrderId": "1646222494045",
"placementOrderDate": "2021-12-12",
- "placementOrderType": "some order2",
+ "placementOrderType": "Adoption order",
"placementOrderCourt": "london court",
"placementOrderNumber": "12345"
}
@@ -212,6 +214,8 @@
],
"solicitorName": null,
"selectedSiblingId": "1646222699254",
+ "selectedSiblingRelation": "Sister",
+ "selectedSiblingPoType": "Adoption order",
"solicitorPhoneNumber": null,
"birthFatherAddressCountry": null,
"applicant2AddressTown": "NOTTINGHAM",
@@ -247,4 +251,5 @@
"applicant2LanguagePreference": null,
"birthMotherOccupation": "Teacher",
"applicant1AddressSameAsApplicant1": null
+
}
diff --git a/bin/functionalTest/casedata/request/request-caseworker-add-notes-about-to-submit.json b/bin/functionalTest/casedata/request/request-caseworker-add-notes-about-to-submit.json
new file mode 100644
index 000000000..805998b6b
--- /dev/null
+++ b/bin/functionalTest/casedata/request/request-caseworker-add-notes-about-to-submit.json
@@ -0,0 +1,255 @@
+{
+ "siblings": [
+ {
+ "id": "1646222663145",
+ "value": {
+ "siblingId": "1646222663145",
+ "siblingRelation": "brother",
+ "siblingPoType": "adoptionOrder",
+ "siblingPoNumber": "1001",
+ "siblingPlacementOtherType": ""
+ }
+ },
+ {
+ "id": "1646222699254",
+ "value": {
+ "siblingId": "1646222699254",
+ "siblingRelation": "sister",
+ "siblingPoType": "other",
+ "siblingPoNumber": "23456",
+ "siblingPlacementOtherType": "other type"
+ }
+ }
+ ],
+ "otherParentAddressNotKnownReason": "",
+ "otherParentNationality": null,
+ "birthFatherAddressKnown": "Yes",
+ "birthFatherNotAliveReason": "",
+ "birthFatherOccupation": "unknown",
+ "hyphenatedCaseRef": "1234-5678-9012-3456",
+ "birthMotherFirstName": "Mother",
+ "birthMotherNameOnCertificate": null,
+ "applicant2StatementOfTruth": null,
+ "birthMotherAddressNotKnownReason": "Some reason",
+ "solicitorFirm": null,
+ "childrenLastName": "child",
+ "otherParentAddressKnown": "Yes",
+ "applicant1EmailAddress": "abid@gmail.co",
+ "applicant2AddressCountry": "NOTTINGHAM CITY",
+ "childrenDateOfBirth": "2015-12-12",
+ "applicant1Email": "citizen.automation@mailinator.com",
+ "applicant2EmailAddress": "someone@gmail.com",
+ "otherParentFirstName": "other",
+ "birthFatherOtherNationalities": [],
+ "documentsUploaded": [],
+ "otherParentNotAliveReason": null,
+ "childrenAdditionalNationalities": [
+ {
+ "id": "3b81bf8b-96ad-4001-a5cf-66f2af99a79c",
+ "value": {
+ "country": "China"
+ }
+ },
+ {
+ "id": "82b96f32-3f85-4b69-abf6-fd4321ca7501",
+ "value": {
+ "country": "India"
+ }
+ }
+ ],
+ "familyCourtEmailId": "adoptionproject@mailinator.com",
+ "birthFatherNameOnCertificate": "Yes",
+ "applicant2Address1": "2 WHITE ROSE WR2, BROAD STREET",
+ "birthFatherAddressNotKnownReason": "",
+ "applicant2Address2": "",
+ "documentsGenerated": [],
+ "birthFatherFirstName": "Father",
+ "dateChildMovedIn": "2021-10-12",
+ "applicant1AddressPostCode": "NG1 1JB",
+ "localAuthorityName": "laname",
+ "localAuthorityContactName": "contact name1",
+ "localAuthorityPhoneNumber": "01234567890",
+ "localAuthorityContactEmail": "agency1@email.co.uk",
+ "adopAgencyOrLaName": "agency1",
+ "adopAgencyOrLaContactName": "contact name1",
+ "adopAgencyOrLaPhoneNumber": "01234567890",
+ "adopAgencyAddressLine1": "address",
+ "adopAgencyTown": "town",
+ "adopAgencyPostcode": "aa14aa",
+ "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
+ "applicant1ContactDetailsConsent": "Yes",
+ "applicant2Nationality": null,
+ "applicant1LanguagePreference": "ENGLISH",
+ "birthMotherAddressPostCode": "NG1 1JB",
+ "birthMotherOtherNationalities": [],
+ "otherParentOtherNationalities": [],
+ "applyingWith": "withSpouseOrCivilPartner",
+ "applicant1AdditionalNationalities": [],
+ "applicant2LastName": "sasass",
+ "applicant1Nationality": null,
+ "applicant2ContactDetailsConsent": "Yes",
+ "applicant1PhoneNumber": "0987654321",
+ "applicant2AdditionalNames": [],
+ "childrenLastNameAfterAdoption": "child",
+ "applicant1SotFullName": null,
+ "hasAnotherAdopAgencyOrLA": "No",
+ "socialWorkerEmail": "socialw@email.com",
+ "socialWorkerPhoneNumber": "01234567893",
+ "addAnotherSiblingPlacementOrder": "No",
+ "createdDate": null,
+ "childLocalAuthority": "la",
+ "applicant2Occupation": "tester",
+ "applicant2PhoneNumber": "12121212121",
+ "applicant1ContactDetails": null,
+ "findFamilyCourt": "Yes",
+ "applicant2SotFullName": null,
+ "birthFatherAddressTown": "LONDON",
+ "applicant1Address1": "1 TRIVETT SQUARE",
+ "applicant1Address2": "",
+ "applicant2AdditionalNationalities": [],
+ "dueDate": null,
+ "childrenOtherSexAtBirth": "something",
+ "solicitorEmail": null,
+ "otherParentAddressTown": "LONDON",
+ "birthMotherNotAliveReason": "",
+ "otherParentAddressPostCode": "SW1A 1AA",
+ "applicant1AddressCountry": "NOTTINGHAM CITY",
+ "placementOrderCourt": "xyz",
+ "familyCourtName": "xyz",
+ "birthMotherAddressTown": "NOTTINGHAM",
+ "birthFatherAddress3": null,
+ "birthFatherAddress2": "",
+ "birthFatherAddress1": "BUCKINGHAM PALACE",
+ "applicant1CannotUpload": "Yes",
+ "placementOrders": [
+ {
+ "id": "6e59287f-a337-49ba-ae45-c1f8bfe72f25",
+ "value": {
+ "placementOrderId": "1646222468418",
+ "placementOrderDate": "2021-12-12",
+ "placementOrderCourt": "xyz",
+ "placementOrderNumber": "123456"
+ }
+ },
+ {
+ "id": "a341637f-c3f8-4a00-9d6f-c560cea7a677",
+ "value": {
+ "placementOrderId": "1646222494045",
+ "placementOrderDate": "2021-12-12",
+ "placementOrderType": "Adoption Order",
+ "placementOrderCourt": "london court",
+ "placementOrderNumber": "12345"
+ }
+ }
+ ],
+ "otherParentOccupation": null,
+ "birthMotherAddressCounty": "NOTTINGHAM CITY",
+ "applicant2ContactDetails": null,
+ "birthFatherStillAlive": "Yes",
+ "applicant2AddressPostCode": "NG1 3AL",
+ "applicant2FirstName": "second",
+ "applicant1DocumentsUploaded": [
+ {
+ "id": "c283880e-068e-450a-b44d-e72a6191847b",
+ "value": {
+ "documentEmailContent": null,
+ "documentLink": {
+ "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1",
+ "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary"
+ },
+ "documentDateAdded": null,
+ "documentComment": "Uploaded by applicant",
+ "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "documentType": null,
+ "documentFileId": null
+ }
+ }
+ ],
+ "addAnotherPlacementOrder": "No",
+ "selectedPlacementOrderId": "1646222468418",
+ "applicant1Occupation": "Software Engineer",
+ "adoptionDocument": {},
+ "socialWorkerName": "social worker",
+ "applicant1FirstName": "Abid1",
+ "otherParentAddressCountry": null,
+ "birthFatherLastName": "Father",
+ "birthFatherNationality": [
+ "British"
+ ],
+ "applicant2HasOtherNames": "No",
+ "applicant1AddressTown": "NOTTINGHAM",
+ "applicationFeeOrderSummary": {},
+ "birthMotherAddress1": "2 TRIVETT SQUARE",
+ "applicant1HasOtherNames": "No",
+ "applicant1LastName": "sayyad",
+ "applicant1DateOfBirth": "1990-12-12",
+ "birthMotherAddressKnown": "Yes",
+ "dateSubmitted": null,
+ "pcqId": "9c04ea3a-c614-4eac-8361-ac75fb59f9dc",
+ "applicant2DateOfBirth": "1990-12-12",
+ "birthFatherAddressCounty": "CITY OF WESTMINSTER",
+ "birthMotherAddress2": "",
+ "birthMotherAddress3": null,
+ "applicant1CannotUploadSupportingDocument": [
+ "birthOrAdoptionCertificate"
+ ],
+ "birthMotherAddressCountry": null,
+ "otherParentLastName": "parent",
+ "applicant1AdditionalNames": [
+ {
+ "id": "f736c59c-1a13-4a74-b6f4-ca202891dd94",
+ "value": {
+ "lastNames": "bbb1",
+ "firstNames": "aaa"
+ }
+ },
+ {
+ "id": "81fdf807-5a47-48ca-ab64-828563dd427e",
+ "value": {
+ "lastNames": "wwww",
+ "firstNames": "aaa"
+ }
+ }
+ ],
+ "solicitorName": null,
+ "selectedSiblingId": "1646222699254",
+ "selectedSiblingRelation": "sister",
+ "selectedSiblingPoType": "adoptionOrder",
+ "solicitorPhoneNumber": null,
+ "birthFatherAddressCountry": null,
+ "applicant2AddressTown": "NOTTINGHAM",
+ "applicant2AddressSameAsApplicant1": "No",
+ "childrenSexAtBirth": "other",
+ "selectedAdoptionAgencyId": "1646222614256",
+ "otherApplicantRelation": "",
+ "applicant1StatementOfTruth": null,
+ "hasSiblings": "Yes",
+ "childrenFirstNameAfterAdoption": "child",
+ "birthFatherAddressPostCode": "SW1A 1AA",
+ "otherParentAddress1": "BUCKINGHAM PALACE",
+ "otherParentAddress2": "",
+ "otherParentNameOnCertificate": null,
+ "birthMotherLastName": "Mother",
+ "otherParentAddress3": null,
+ "otherParentStillAlive": "Yes",
+ "applicationPayments": [],
+ "childrenFirstName": "child",
+ "birthMotherNationality": [
+ "British",
+ "Irish"
+ ],
+ "solicitorHelpingWithApplication": null,
+ "birthMotherStillAlive": "Yes",
+ "childrenNationality": [
+ "British",
+ "Irish",
+ "Other"
+ ],
+ "applicant2Email": null,
+ "otherParentAddressCounty": "CITY OF WESTMINSTER",
+ "applicant2LanguagePreference": null,
+ "birthMotherOccupation": "Teacher",
+ "applicant1AddressSameAsApplicant1": null
+
+}
diff --git a/bin/functionalTest/casedata/response-application-payment-added.json b/bin/functionalTest/casedata/response-application-payment-added.json
index 8077bd88f..858588c76 100644
--- a/bin/functionalTest/casedata/response-application-payment-added.json
+++ b/bin/functionalTest/casedata/response-application-payment-added.json
@@ -2,17 +2,13 @@
"data": {
"addAnotherPlacementOrder": "No",
"addAnotherSiblingPlacementOrder": "No",
- "localAuthorityName": "laname",
- "localAuthorityContactName": "contact name1",
- "localAuthorityPhoneNumber": "01234567890",
- "localAuthorityContactEmail": "agency1@email.co.uk",
- "adopAgencyOrLaName": "agency1",
+ "adopAgencyAddressLine1": "address",
+ "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
"adopAgencyOrLaContactName": "contact name1",
+ "adopAgencyOrLaName": "agency1",
"adopAgencyOrLaPhoneNumber": "01234567890",
- "adopAgencyAddressLine1": "address",
- "adopAgencyTown": "town",
"adopAgencyPostcode": "aa14aa",
- "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
+ "adopAgencyTown": "town",
"adoptionDocument": {
"documentComment": null,
"documentDateAdded": null,
@@ -53,23 +49,23 @@
"applicant1ContactDetailsConsent": "Yes",
"applicant1DateOfBirth": "1990-12-12",
"applicant1DocumentsUploaded": [
- {
+ {
"id": "c283880e-068e-450a-b44d-e72a6191847b",
"value": {
- "documentEmailContent": null,
- "documentLink": {
- "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1",
- "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary"
- },
- "documentDateAdded": null,
- "documentComment": "Uploaded by applicant",
- "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "documentType": null,
- "documentFileId": null
+ "documentComment": "Uploaded by applicant",
+ "documentDateAdded": null,
+ "documentEmailContent": null,
+ "documentFileId": null,
+ "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "documentLink": {
+ "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary",
+ "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1"
+ },
+ "documentType": null
}
- }
-],
+ }
+ ],
"applicant1Email": "citizen.automation@mailinator.com",
"applicant1EmailAddress": "abid@gmail.co",
"applicant1FirstName": "Abid1",
@@ -103,12 +99,38 @@
"applicant2PhoneNumber": "12121212121",
"applicant2SotFullName": null,
"applicant2StatementOfTruth": null,
+ "applicantLocalAuthority": "LA",
+ "applicantLocalAuthorityEmail": "la@email.gov.uk",
+ "applicantSocialWorkerEmail": "applicant.socialworker@la.gov.uk",
+ "applicantSocialWorkerName": "Applicant Social Worker",
+ "applicantSocialWorkerPhoneNumber": "01234567890",
"applicationFeeOrderSummary": {
- "Fees": null,
- "PaymentReference": null,
- "PaymentTotal": null
+ "Fees": [
+ {
+ "value": {
+ "FeeAmount": "1234",
+ "FeeCode": "A58",
+ "FeeVersion": "1"
+ }
+ }
+ ],
+ "PaymentTotal": "183"
},
- "applicationPayments": [],
+ "applicationPayments": [
+ {
+ "id": "12",
+ "value": {
+ "amount": 183,
+ "channel": "online",
+ "created": "2021-11-02T02:50:12.208Z",
+ "feeCode": "A58",
+ "reference": "1234",
+ "status": "success",
+ "transactionId": "1234",
+ "updated": "2021-11-02T02:50:12.208Z"
+ }
+ }
+ ],
"applyingWith": "withSpouseOrCivilPartner",
"birthFatherAddress1": "BUCKINGHAM PALACE",
"birthFatherAddress2": "",
@@ -149,6 +171,11 @@
"birthMotherOccupation": "Teacher",
"birthMotherOtherNationalities": [],
"birthMotherStillAlive": "Yes",
+ "childLocalAuthority": "la",
+ "childLocalAuthorityEmail": "abc@gov.uk",
+ "childSocialWorkerEmail": "abc@gov.uk",
+ "childSocialWorkerName": "null",
+ "childSocialWorkerPhoneNumber": "1234567890",
"childrenAdditionalNationalities": [
{
"id": "3b81bf8b-96ad-4001-a5cf-66f2af99a79c",
@@ -182,45 +209,48 @@
{
"id": "${json-unit.any-string}",
"value": {
+ "documentComment": null,
+ "documentDateAdded": null,
"documentEmailContent": null,
+ "documentFileId": "${json-unit.any-string}",
+ "documentFileName": "${json-unit.any-string}",
"documentLink": {
- "document_url": "${json-unit.any-string}",
+ "document_binary_url": "${json-unit.any-string}",
"document_filename": "${json-unit.any-string}",
- "document_binary_url": "${json-unit.any-string}"
+ "document_url": "${json-unit.any-string}"
},
- "documentDateAdded": null,
- "documentComment": null,
- "documentFileName": "${json-unit.any-string}",
- "documentType": "applicationSummaryEn",
- "documentFileId": "${json-unit.any-string}"
+ "documentType": "applicationSummaryEn"
}
},
{
"id": "${json-unit.any-string}",
"value": {
+ "documentComment": null,
+ "documentDateAdded": null,
"documentEmailContent": null,
+ "documentFileId": "${json-unit.any-string}",
+ "documentFileName": "${json-unit.any-string}",
"documentLink": {
- "document_url": "${json-unit.any-string}",
+ "document_binary_url": "${json-unit.any-string}",
"document_filename": "${json-unit.any-string}",
- "document_binary_url": "${json-unit.any-string}"
+ "document_url": "${json-unit.any-string}"
},
- "documentDateAdded": null,
- "documentComment": null,
- "documentFileName": "${json-unit.any-string}",
- "documentType": "applicationSummaryCy",
- "documentFileId": "${json-unit.any-string}"
+ "documentType": "applicationSummaryCy"
}
}
],
"documentsUploaded": [],
"dueDate": "${json-unit.any-string}",
"familyCourtEmailId": "adoptionproject@mailinator.com",
- "placementOrderCourt": "xyz",
"familyCourtName": "xyz",
"findFamilyCourt": "Yes",
"hasAnotherAdopAgencyOrLA": "No",
"hasSiblings": "Yes",
"hyphenatedCaseRef": "1234-5678-9012-3456",
+ "localAuthorityContactEmail": "agency1@email.co.uk",
+ "localAuthorityContactName": "contact name1",
+ "localAuthorityName": "laname",
+ "localAuthorityPhoneNumber": "01234567890",
"otherApplicantRelation": "",
"otherParentAddress1": "BUCKINGHAM PALACE",
"otherParentAddress2": "",
@@ -240,6 +270,7 @@
"otherParentOtherNationalities": [],
"otherParentStillAlive": "Yes",
"pcqId": "9c04ea3a-c614-4eac-8361-ac75fb59f9dc",
+ "placementOrderCourt": "xyz",
"placementOrders": [
{
"id": "6e59287f-a337-49ba-ae45-c1f8bfe72f25",
@@ -258,64 +289,37 @@
"placementOrderDate": "2021-12-12",
"placementOrderId": "1646222494045",
"placementOrderNumber": "12345",
- "placementOrderType": "some order2"
+ "placementOrderType": "Adoption order"
}
}
],
"selectedAdoptionAgencyId": "1646222614256",
"selectedPlacementOrderId": "1646222468418",
"selectedSiblingId": "1646222699254",
+ "selectedSiblingPoType": "Adoption order",
+ "selectedSiblingRelation": "Sister",
"siblings": [
{
"id": "1646222663145",
"value": {
"siblingId": "1646222663145",
- "siblingRelation": "Brother",
- "siblingPoType": "some order",
- "siblingPoNumber": "1001"
+ "siblingPlacementOtherType": "",
+ "siblingPoNumber": "1001",
+ "siblingPoType": "Adoption order",
+ "siblingRelation": "Brother"
}
},
{
"id": "1646222699254",
"value": {
"siblingId": "1646222699254",
- "siblingRelation": "Sister",
- "siblingPoType": "some other order",
- "siblingPoNumber": "23456"
+ "siblingPlacementOtherType": "other type",
+ "siblingPoNumber": "23456",
+ "siblingPoType": "Other",
+ "siblingRelation": "Sister"
}
}
],
- "applicationPayments": [
- {
- "id": "12",
- "value": {
- "created": "2021-11-02T02:50:12.208Z",
- "updated": "2021-11-02T02:50:12.208Z",
- "feeCode": "A58",
- "amount": 183,
- "status": "success",
- "channel": "online",
- "reference": "1234",
- "transactionId": "1234"
- }
- }
- ],
- "applicationFeeOrderSummary": {
- "PaymentTotal": "183",
- "Fees": [
- {
- "value": {
- "FeeAmount": "1234",
- "FeeCode": "A58",
- "FeeVersion": "1"
- }
- }
- ]
- },
- "socialWorkerEmail": "socialw@email.com",
- "socialWorkerName": "social worker",
- "socialWorkerPhoneNumber": "01234567893",
- "childLocalAuthority": "la",
"solicitorEmail": null,
"solicitorFirm": null,
"solicitorHelpingWithApplication": null,
diff --git a/bin/functionalTest/casedata/response-application-payment-failed.json b/bin/functionalTest/casedata/response-application-payment-failed.json
index 4445b77cc..d93f18b73 100644
--- a/bin/functionalTest/casedata/response-application-payment-failed.json
+++ b/bin/functionalTest/casedata/response-application-payment-failed.json
@@ -2,17 +2,13 @@
"data": {
"addAnotherPlacementOrder": "No",
"addAnotherSiblingPlacementOrder": "No",
- "localAuthorityName": "laname",
- "localAuthorityContactName": "contact name1",
- "localAuthorityPhoneNumber": "01234567890",
- "localAuthorityContactEmail": "agency1@email.co.uk",
- "adopAgencyOrLaName": "agency1",
+ "adopAgencyAddressLine1": "address",
+ "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
"adopAgencyOrLaContactName": "contact name1",
+ "adopAgencyOrLaName": "agency1",
"adopAgencyOrLaPhoneNumber": "01234567890",
- "adopAgencyAddressLine1": "address",
- "adopAgencyTown": "town",
"adopAgencyPostcode": "aa14aa",
- "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
+ "adopAgencyTown": "town",
"adoptionDocument": {
"documentComment": null,
"documentDateAdded": null,
@@ -53,23 +49,23 @@
"applicant1ContactDetailsConsent": "Yes",
"applicant1DateOfBirth": "1990-12-12",
"applicant1DocumentsUploaded": [
- {
+ {
"id": "c283880e-068e-450a-b44d-e72a6191847b",
"value": {
- "documentEmailContent": null,
- "documentLink": {
- "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1",
- "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary"
- },
- "documentDateAdded": null,
- "documentComment": "Uploaded by applicant",
- "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "documentType": null,
- "documentFileId": null
+ "documentComment": "Uploaded by applicant",
+ "documentDateAdded": null,
+ "documentEmailContent": null,
+ "documentFileId": null,
+ "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "documentLink": {
+ "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary",
+ "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1"
+ },
+ "documentType": null
}
- }
-],
+ }
+ ],
"applicant1Email": "citizen.automation@mailinator.com",
"applicant1EmailAddress": "abid@gmail.co",
"applicant1FirstName": "Abid1",
@@ -103,12 +99,40 @@
"applicant2PhoneNumber": "12121212121",
"applicant2SotFullName": null,
"applicant2StatementOfTruth": null,
+ "applicantLocalAuthority": "LA",
+ "applicantLocalAuthorityEmail": "la@email.gov.uk",
+ "applicantSocialWorkerEmail": "applicant.socialworker@la.gov.uk",
+ "applicantSocialWorkerName": "Applicant Social Worker",
+ "applicantSocialWorkerPhoneNumber": "01234567890",
"applicationFeeOrderSummary": {
- "Fees": null,
+ "Fees": [
+ {
+ "value": {
+ "FeeAmount": "1234",
+ "FeeCode": "A58",
+ "FeeDescription": null,
+ "FeeVersion": "1"
+ }
+ }
+ ],
"PaymentReference": null,
- "PaymentTotal": null
+ "PaymentTotal": "183"
},
- "applicationPayments": [],
+ "applicationPayments": [
+ {
+ "id": "12",
+ "value": {
+ "amount": 183,
+ "channel": "online",
+ "created": "2021-11-02T02:50:12.208Z",
+ "feeCode": "A58",
+ "reference": "1234",
+ "status": "declined",
+ "transactionId": "1234",
+ "updated": "2021-11-02T02:50:12.208Z"
+ }
+ }
+ ],
"applyingWith": "withSpouseOrCivilPartner",
"birthFatherAddress1": "BUCKINGHAM PALACE",
"birthFatherAddress2": "",
@@ -149,6 +173,11 @@
"birthMotherOccupation": "Teacher",
"birthMotherOtherNationalities": [],
"birthMotherStillAlive": "Yes",
+ "childLocalAuthority": "la",
+ "childLocalAuthorityEmail": "abc@gov.uk",
+ "childSocialWorkerEmail": "abc@gov.uk",
+ "childSocialWorkerName": "null",
+ "childSocialWorkerPhoneNumber": "1234567890",
"childrenAdditionalNationalities": [
{
"id": "3b81bf8b-96ad-4001-a5cf-66f2af99a79c",
@@ -178,17 +207,19 @@
"createdDate": null,
"dateChildMovedIn": "2021-10-12",
"dateSubmitted": null,
- "documentsGenerated": [
- ],
+ "documentsGenerated": [],
"documentsUploaded": [],
"dueDate": null,
"familyCourtEmailId": "adoptionproject@mailinator.com",
- "placementOrderCourt": "xyz",
"familyCourtName": "xyz",
"findFamilyCourt": "Yes",
"hasAnotherAdopAgencyOrLA": "No",
"hasSiblings": "Yes",
"hyphenatedCaseRef": "1234-5678-9012-3456",
+ "localAuthorityContactEmail": "agency1@email.co.uk",
+ "localAuthorityContactName": "contact name1",
+ "localAuthorityName": "laname",
+ "localAuthorityPhoneNumber": "01234567890",
"otherApplicantRelation": "",
"otherParentAddress1": "BUCKINGHAM PALACE",
"otherParentAddress2": "",
@@ -208,6 +239,7 @@
"otherParentOtherNationalities": [],
"otherParentStillAlive": "Yes",
"pcqId": "9c04ea3a-c614-4eac-8361-ac75fb59f9dc",
+ "placementOrderCourt": "xyz",
"placementOrders": [
{
"id": "6e59287f-a337-49ba-ae45-c1f8bfe72f25",
@@ -226,66 +258,37 @@
"placementOrderDate": "2021-12-12",
"placementOrderId": "1646222494045",
"placementOrderNumber": "12345",
- "placementOrderType": "some order2"
+ "placementOrderType": "Adoption order"
}
}
],
"selectedAdoptionAgencyId": "1646222614256",
"selectedPlacementOrderId": "1646222468418",
"selectedSiblingId": "1646222699254",
+ "selectedSiblingPoType": "Adoption order",
+ "selectedSiblingRelation": "Sister",
"siblings": [
{
"id": "1646222663145",
"value": {
"siblingId": "1646222663145",
- "siblingRelation": "Brother",
- "siblingPoType": "some order",
- "siblingPoNumber": "1001"
+ "siblingPlacementOtherType": "",
+ "siblingPoNumber": "1001",
+ "siblingPoType": "Adoption order",
+ "siblingRelation": "Brother"
}
},
{
"id": "1646222699254",
"value": {
"siblingId": "1646222699254",
- "siblingRelation": "Sister",
- "siblingPoType": "some other order",
- "siblingPoNumber": "23456"
- }
- }
- ],
- "applicationPayments": [
- {
- "id": "12",
- "value": {
- "created": "2021-11-02T02:50:12.208Z",
- "updated": "2021-11-02T02:50:12.208Z",
- "feeCode": "A58",
- "amount": 183,
- "status": "declined",
- "channel": "online",
- "reference": "1234",
- "transactionId": "1234"
+ "siblingPlacementOtherType": "other type",
+ "siblingPoNumber": "23456",
+ "siblingPoType": "Other",
+ "siblingRelation": "Sister"
}
}
],
- "applicationFeeOrderSummary": {
- "PaymentTotal": "183",
- "PaymentReference": null,
- "Fees": [
- {
- "value": {
- "FeeAmount": "1234",
- "FeeCode": "A58",
- "FeeDescription":null,
- "FeeVersion": "1"
- }
- }
- ]
- },
- "socialWorkerEmail": "socialw@email.com",
- "socialWorkerName": "social worker",
- "socialWorkerPhoneNumber": "01234567893",
- "childLocalAuthority": "la",
"solicitorEmail": null,
"solicitorFirm": null,
"solicitorHelpingWithApplication": null,
diff --git a/bin/functionalTest/casedata/response-application-payment-not-ready.json b/bin/functionalTest/casedata/response-application-payment-not-ready.json
index 74664fd89..d765fac09 100644
--- a/bin/functionalTest/casedata/response-application-payment-not-ready.json
+++ b/bin/functionalTest/casedata/response-application-payment-not-ready.json
@@ -2,17 +2,13 @@
"data": {
"addAnotherPlacementOrder": "No",
"addAnotherSiblingPlacementOrder": "No",
- "localAuthorityName": "laname",
- "localAuthorityContactName": "contact name1",
- "localAuthorityPhoneNumber": "01234567890",
- "localAuthorityContactEmail": "agency1@email.co.uk",
- "adopAgencyOrLaName": "agency1",
+ "adopAgencyAddressLine1": "address",
+ "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
"adopAgencyOrLaContactName": "contact name1",
+ "adopAgencyOrLaName": "agency1",
"adopAgencyOrLaPhoneNumber": "01234567890",
- "adopAgencyAddressLine1": "address",
- "adopAgencyTown": "town",
"adopAgencyPostcode": "aa14aa",
- "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
+ "adopAgencyTown": "town",
"adoptionDocument": {
"documentComment": null,
"documentDateAdded": null,
@@ -46,28 +42,29 @@
"applicant1AddressSameAsApplicant1": null,
"applicant1AddressTown": "NOTTINGHAM",
"applicant1CannotUpload": "Yes",
- "applicant1CannotUploadSupportingDocument": ["birthOrAdoptionCertificate"],
+ "applicant1CannotUploadSupportingDocument": ["birthOrAdoptionCertificate"
+ ],
"applicant1ContactDetails": null,
"applicant1ContactDetailsConsent": "Yes",
"applicant1DateOfBirth": "1990-12-12",
"applicant1DocumentsUploaded": [
- {
+ {
"id": "c283880e-068e-450a-b44d-e72a6191847b",
"value": {
- "documentEmailContent": null,
- "documentLink": {
- "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1",
- "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary"
- },
- "documentDateAdded": null,
- "documentComment": "Uploaded by applicant",
- "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "documentType": null,
- "documentFileId": null
+ "documentComment": "Uploaded by applicant",
+ "documentDateAdded": null,
+ "documentEmailContent": null,
+ "documentFileId": null,
+ "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "documentLink": {
+ "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary",
+ "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1"
+ },
+ "documentType": null
}
- }
-],
+ }
+ ],
"applicant1Email": "citizen.automation@mailinator.com",
"applicant1EmailAddress": "abid@gmail.co",
"applicant1FirstName": "Abid1",
@@ -101,6 +98,11 @@
"applicant2PhoneNumber": "12121212121",
"applicant2SotFullName": null,
"applicant2StatementOfTruth": null,
+ "applicantLocalAuthority": null,
+ "applicantLocalAuthorityEmail": null,
+ "applicantSocialWorkerEmail": null,
+ "applicantSocialWorkerName": null,
+ "applicantSocialWorkerPhoneNumber": null,
"applicationFeeOrderSummary": {
"Fees": null,
"PaymentReference": null,
@@ -118,6 +120,8 @@
"birthFatherAddressPostCode": "SW1A 1AA",
"birthFatherAddressTown": "LONDON",
"birthFatherFirstName": "Father",
+ "birthFatherIdentityKnown": null,
+ "birthFatherLastAddressDate": null,
"birthFatherLastName": "Father",
"birthFatherNameOnCertificate": "Yes",
"birthFatherNationality": ["British"
@@ -136,14 +140,21 @@
"birthMotherAddressPostCode": "NG1 1JB",
"birthMotherAddressTown": "NOTTINGHAM",
"birthMotherFirstName": "Mother",
+ "birthMotherIdentityKnown": null,
+ "birthMotherLastAddressDate": null,
"birthMotherLastName": "Mother",
"birthMotherNameOnCertificate": null,
- "birthMotherNationality": ["Irish", "British"
+ "birthMotherNationality": ["British", "Irish"
],
"birthMotherNotAliveReason": "",
"birthMotherOccupation": "Teacher",
"birthMotherOtherNationalities": [],
"birthMotherStillAlive": "Yes",
+ "childLocalAuthority": "la",
+ "childLocalAuthorityEmail": null,
+ "childSocialWorkerEmail": null,
+ "childSocialWorkerName": null,
+ "childSocialWorkerPhoneNumber": null,
"childrenAdditionalNationalities": [
{
"id": "3b81bf8b-96ad-4001-a5cf-66f2af99a79c",
@@ -163,7 +174,7 @@
"childrenFirstNameAfterAdoption": "child",
"childrenLastName": "child",
"childrenLastNameAfterAdoption": "child",
- "childrenNationality": ["Irish", "British", "Other"
+ "childrenNationality": ["British", "Irish", "Other"
],
"childrenOtherSexAtBirth": "something",
"childrenSexAtBirth": "other",
@@ -174,12 +185,16 @@
"documentsUploaded": [],
"dueDate": null,
"familyCourtEmailId": "adoptionproject@mailinator.com",
- "placementOrderCourt": "xyz",
"familyCourtName": "xyz",
"findFamilyCourt": "Yes",
"hasAnotherAdopAgencyOrLA": "No",
"hasSiblings": "Yes",
"hyphenatedCaseRef": "1234-5678-9012-3456",
+ "localAuthorityContactEmail": "agency1@email.co.uk",
+ "localAuthorityContactName": "contact name1",
+ "localAuthorityName": "laname",
+ "localAuthorityPhoneNumber": "01234567890",
+ "message": null,
"otherApplicantRelation": "",
"otherParentAddress1": "BUCKINGHAM PALACE",
"otherParentAddress2": "",
@@ -191,6 +206,8 @@
"otherParentAddressPostCode": "SW1A 1AA",
"otherParentAddressTown": "LONDON",
"otherParentFirstName": "other",
+ "otherParentIdentityKnown": null,
+ "otherParentLastAddressDate": null,
"otherParentLastName": "parent",
"otherParentNameOnCertificate": null,
"otherParentNationality": null,
@@ -199,6 +216,7 @@
"otherParentOtherNationalities": [],
"otherParentStillAlive": "Yes",
"pcqId": "9c04ea3a-c614-4eac-8361-ac75fb59f9dc",
+ "placementOrderCourt": "xyz",
"placementOrders": [
{
"id": "6e59287f-a337-49ba-ae45-c1f8bfe72f25",
@@ -217,21 +235,24 @@
"placementOrderDate": "2021-12-12",
"placementOrderId": "1646222494045",
"placementOrderNumber": "12345",
- "placementOrderType": "some order2"
+ "placementOrderType": "Adoption order"
}
}
],
"selectedAdoptionAgencyId": "1646222614256",
"selectedPlacementOrderId": "1646222468418",
"selectedSiblingId": "1646222699254",
+ "selectedSiblingRelation": "Sister",
+ "selectedSiblingPoType": "Adoption order",
"siblings": [
{
"id": "1646222663145",
"value": {
"siblingId": "1646222663145",
"siblingRelation": "Brother",
- "siblingPoType": "some order",
- "siblingPoNumber": "1001"
+ "siblingPoType": "Adoption order",
+ "siblingPoNumber": "1001",
+ "siblingPlacementOtherType": ""
}
},
{
@@ -239,20 +260,20 @@
"value": {
"siblingId": "1646222699254",
"siblingRelation": "Sister",
- "siblingPoType": "some other order",
- "siblingPoNumber": "23456"
+ "siblingPoType": "Other",
+ "siblingPoNumber": "23456",
+ "siblingPlacementOtherType": "other type"
}
}
],
- "socialWorkerEmail": "socialw@email.com",
- "socialWorkerName": "social worker",
- "socialWorkerPhoneNumber": "01234567893",
- "childLocalAuthority": "la",
+ "socialWorkerDetails": null,
"solicitorEmail": null,
"solicitorFirm": null,
"solicitorHelpingWithApplication": null,
"solicitorName": null,
- "solicitorPhoneNumber": null
+ "solicitorPhoneNumber": null,
+ "status": null,
+ "typeOfAdoption": null
},
"errors": ["Statement of truth must be accepted by the applicant1","Applicant1SotFullName cannot be empty or null","Statement of truth must be accepted by the applicant2","Applicant2SotFullName cannot be empty or null"],
"state": null,
diff --git a/bin/functionalTest/casedata/response-application-payment-ready.json b/bin/functionalTest/casedata/response-application-payment-ready.json
index 30f6a7a0b..d663390ec 100644
--- a/bin/functionalTest/casedata/response-application-payment-ready.json
+++ b/bin/functionalTest/casedata/response-application-payment-ready.json
@@ -144,6 +144,16 @@
"birthMotherOccupation": "Teacher",
"birthMotherOtherNationalities": [],
"birthMotherStillAlive": "Yes",
+ "childLocalAuthority": "la",
+ "childLocalAuthorityEmail": "abc@gov.uk",
+ "childSocialWorkerEmail": "abc@gov.uk",
+ "childSocialWorkerName": "null",
+ "childSocialWorkerPhoneNumber": "1234567890",
+ "applicantLocalAuthority": null,
+ "applicantLocalAuthorityEmail": null,
+ "applicantSocialWorkerEmail": null,
+ "applicantSocialWorkerName": null,
+ "applicantSocialWorkerPhoneNumber": null,
"childrenAdditionalNationalities": [
{
"id": "3b81bf8b-96ad-4001-a5cf-66f2af99a79c",
@@ -217,21 +227,24 @@
"placementOrderDate": "2021-12-12",
"placementOrderId": "1646222494045",
"placementOrderNumber": "12345",
- "placementOrderType": "some order2"
+ "placementOrderType": "Adoption order"
}
}
],
"selectedAdoptionAgencyId": "1646222614256",
"selectedPlacementOrderId": "1646222468418",
"selectedSiblingId": "1646222699254",
+ "selectedSiblingRelation": "Sister",
+ "selectedSiblingPoType": "Adoption order",
"siblings": [
{
"id": "1646222663145",
"value": {
"siblingId": "1646222663145",
"siblingRelation": "Brother",
- "siblingPoType": "some order",
- "siblingPoNumber": "1001"
+ "siblingPoType": "Adoption order",
+ "siblingPoNumber": "1001",
+ "siblingPlacementOtherType": ""
}
},
{
@@ -239,15 +252,12 @@
"value": {
"siblingId": "1646222699254",
"siblingRelation": "Sister",
- "siblingPoType": "some other order",
- "siblingPoNumber": "23456"
+ "siblingPoType": "Other",
+ "siblingPoNumber": "23456",
+ "siblingPlacementOtherType": "other type"
}
}
],
- "socialWorkerEmail": "socialw@email.com",
- "socialWorkerName": "social worker",
- "socialWorkerPhoneNumber": "01234567893",
- "childLocalAuthority": "la",
"solicitorEmail": null,
"solicitorFirm": null,
"solicitorHelpingWithApplication": null,
diff --git a/bin/functionalTest/casedata/response-application-validation-failed.json b/bin/functionalTest/casedata/response-application-validation-failed.json
index 42d3836a7..7e9c29368 100644
--- a/bin/functionalTest/casedata/response-application-validation-failed.json
+++ b/bin/functionalTest/casedata/response-application-validation-failed.json
@@ -2,17 +2,13 @@
"data": {
"addAnotherPlacementOrder": "No",
"addAnotherSiblingPlacementOrder": "No",
- "localAuthorityName": "laname",
- "localAuthorityContactName": "contact name1",
- "localAuthorityPhoneNumber": "01234567890",
- "localAuthorityContactEmail": "agency1@email.co.uk",
- "adopAgencyOrLaName": "agency1",
+ "adopAgencyAddressLine1": "address",
+ "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
"adopAgencyOrLaContactName": "contact name1",
+ "adopAgencyOrLaName": "agency1",
"adopAgencyOrLaPhoneNumber": "01234567890",
- "adopAgencyAddressLine1": "address",
- "adopAgencyTown": "town",
"adopAgencyPostcode": "aa14aa",
- "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
+ "adopAgencyTown": "town",
"adoptionDocument": {
"documentComment": null,
"documentDateAdded": null,
@@ -53,23 +49,23 @@
"applicant1ContactDetailsConsent": "Yes",
"applicant1DateOfBirth": "1990-12-12",
"applicant1DocumentsUploaded": [
- {
+ {
"id": "c283880e-068e-450a-b44d-e72a6191847b",
"value": {
- "documentEmailContent": null,
- "documentLink": {
- "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1",
- "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary"
- },
- "documentDateAdded": null,
- "documentComment": "Uploaded by applicant",
- "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "documentType": null,
- "documentFileId": null
+ "documentComment": "Uploaded by applicant",
+ "documentDateAdded": null,
+ "documentEmailContent": null,
+ "documentFileId": null,
+ "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "documentLink": {
+ "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary",
+ "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1"
+ },
+ "documentType": null
}
- }
-],
+ }
+ ],
"applicant1Email": "citizen.automation@mailinator.com",
"applicant1EmailAddress": "abid@gmail.co",
"applicant1FirstName": "Abid1",
@@ -103,12 +99,40 @@
"applicant2PhoneNumber": "12121212121",
"applicant2SotFullName": null,
"applicant2StatementOfTruth": null,
+ "applicantLocalAuthority": "LA",
+ "applicantLocalAuthorityEmail": "la@email.gov.uk",
+ "applicantSocialWorkerEmail": "applicant.socialworker@la.gov.uk",
+ "applicantSocialWorkerName": "Applicant Social Worker",
+ "applicantSocialWorkerPhoneNumber": "01234567890",
"applicationFeeOrderSummary": {
- "Fees": null,
+ "Fees": [
+ {
+ "value": {
+ "FeeAmount": "1234",
+ "FeeCode": "A58",
+ "FeeDescription": null,
+ "FeeVersion": "1"
+ }
+ }
+ ],
"PaymentReference": null,
- "PaymentTotal": null
+ "PaymentTotal": "0"
},
- "applicationPayments": [],
+ "applicationPayments": [
+ {
+ "id": "12",
+ "value": {
+ "amount": 183,
+ "channel": "online",
+ "created": "2021-11-02T02:50:12.208Z",
+ "feeCode": "A58",
+ "reference": "1234",
+ "status": "success",
+ "transactionId": "1234",
+ "updated": "2021-11-02T02:50:12.208Z"
+ }
+ }
+ ],
"applyingWith": "withSpouseOrCivilPartner",
"birthFatherAddress1": "BUCKINGHAM PALACE",
"birthFatherAddress2": "",
@@ -149,6 +173,11 @@
"birthMotherOccupation": "Teacher",
"birthMotherOtherNationalities": [],
"birthMotherStillAlive": "Yes",
+ "childLocalAuthority": "la",
+ "childLocalAuthorityEmail": "abc@gov.uk",
+ "childSocialWorkerEmail": "abc@gov.uk",
+ "childSocialWorkerName": "null",
+ "childSocialWorkerPhoneNumber": "1234567890",
"childrenAdditionalNationalities": [
{
"id": "3b81bf8b-96ad-4001-a5cf-66f2af99a79c",
@@ -178,17 +207,19 @@
"createdDate": null,
"dateChildMovedIn": "2021-10-12",
"dateSubmitted": null,
- "documentsGenerated": [
- ],
+ "documentsGenerated": [],
"documentsUploaded": [],
"dueDate": null,
"familyCourtEmailId": "adoptionproject@mailinator.com",
- "placementOrderCourt": "xyz",
"familyCourtName": "xyz",
"findFamilyCourt": "Yes",
"hasAnotherAdopAgencyOrLA": "No",
"hasSiblings": "Yes",
"hyphenatedCaseRef": "1234-5678-9012-3456",
+ "localAuthorityContactEmail": "agency1@email.co.uk",
+ "localAuthorityContactName": "contact name1",
+ "localAuthorityName": "laname",
+ "localAuthorityPhoneNumber": "01234567890",
"otherApplicantRelation": "",
"otherParentAddress1": "BUCKINGHAM PALACE",
"otherParentAddress2": "",
@@ -208,6 +239,7 @@
"otherParentOtherNationalities": [],
"otherParentStillAlive": "Yes",
"pcqId": "9c04ea3a-c614-4eac-8361-ac75fb59f9dc",
+ "placementOrderCourt": "xyz",
"placementOrders": [
{
"id": "6e59287f-a337-49ba-ae45-c1f8bfe72f25",
@@ -226,73 +258,46 @@
"placementOrderDate": "2021-12-12",
"placementOrderId": "1646222494045",
"placementOrderNumber": "12345",
- "placementOrderType": "some order2"
+ "placementOrderType": "Adoption order"
}
}
],
"selectedAdoptionAgencyId": "1646222614256",
"selectedPlacementOrderId": "1646222468418",
"selectedSiblingId": "1646222699254",
+ "selectedSiblingPoType": "Adoption order",
+ "selectedSiblingRelation": "Sister",
"siblings": [
{
"id": "1646222663145",
"value": {
"siblingId": "1646222663145",
- "siblingRelation": "Brother",
- "siblingPoType": "some order",
- "siblingPoNumber": "1001"
+ "siblingPlacementOtherType": "",
+ "siblingPoNumber": "1001",
+ "siblingPoType": "Adoption order",
+ "siblingRelation": "Brother"
}
},
{
"id": "1646222699254",
"value": {
"siblingId": "1646222699254",
- "siblingRelation": "Sister",
- "siblingPoType": "some other order",
- "siblingPoNumber": "23456"
- }
- }
- ],
- "applicationPayments": [
- {
- "id": "12",
- "value": {
- "created": "2021-11-02T02:50:12.208Z",
- "updated": "2021-11-02T02:50:12.208Z",
- "feeCode": "A58",
- "amount": 183,
- "status": "success",
- "channel": "online",
- "reference": "1234",
- "transactionId": "1234"
+ "siblingPlacementOtherType": "other type",
+ "siblingPoNumber": "23456",
+ "siblingPoType": "Other",
+ "siblingRelation": "Sister"
}
}
],
- "applicationFeeOrderSummary": {
- "PaymentTotal": "0",
- "PaymentReference": null,
- "Fees": [
- {
- "value": {
- "FeeAmount": "1234",
- "FeeCode": "A58",
- "FeeDescription":null,
- "FeeVersion": "1"
- }
- }
- ]
- },
- "socialWorkerEmail": "socialw@email.com",
- "socialWorkerName": "social worker",
- "socialWorkerPhoneNumber": "01234567893",
- "childLocalAuthority": "la",
"solicitorEmail": null,
"solicitorFirm": null,
"solicitorHelpingWithApplication": null,
"solicitorName": null,
"solicitorPhoneNumber": null
},
- "errors": ["Payment incomplete"],
+ "errors": [
+ "Payment incomplete"
+ ],
"state": null,
"warnings": null
}
diff --git a/bin/functionalTest/casedata/response-application.json b/bin/functionalTest/casedata/response-application.json
index 36187faf2..f52725386 100644
--- a/bin/functionalTest/casedata/response-application.json
+++ b/bin/functionalTest/casedata/response-application.json
@@ -2,17 +2,13 @@
"data": {
"addAnotherPlacementOrder": "No",
"addAnotherSiblingPlacementOrder": "No",
- "localAuthorityName": "laname",
- "localAuthorityContactName": "contact name1",
- "localAuthorityPhoneNumber": "01234567890",
- "localAuthorityContactEmail": "agency1@email.co.uk",
- "adopAgencyOrLaName": "agency1",
+ "adopAgencyAddressLine1": "address",
+ "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
"adopAgencyOrLaContactName": "contact name1",
+ "adopAgencyOrLaName": "agency1",
"adopAgencyOrLaPhoneNumber": "01234567890",
- "adopAgencyAddressLine1": "address",
- "adopAgencyTown": "town",
"adopAgencyPostcode": "aa14aa",
- "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
+ "adopAgencyTown": "town",
"adoptionDocument": {
"documentComment": null,
"documentDateAdded": null,
@@ -46,28 +42,29 @@
"applicant1AddressSameAsApplicant1": null,
"applicant1AddressTown": "NOTTINGHAM",
"applicant1CannotUpload": "Yes",
- "applicant1CannotUploadSupportingDocument": ["birthOrAdoptionCertificate"],
+ "applicant1CannotUploadSupportingDocument": ["birthOrAdoptionCertificate"
+ ],
"applicant1ContactDetails": null,
"applicant1ContactDetailsConsent": "Yes",
"applicant1DateOfBirth": "1990-12-12",
"applicant1DocumentsUploaded": [
- {
+ {
"id": "c283880e-068e-450a-b44d-e72a6191847b",
"value": {
- "documentEmailContent": null,
- "documentLink": {
- "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1",
- "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary"
- },
- "documentDateAdded": null,
- "documentComment": "Uploaded by applicant",
- "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "documentType": null,
- "documentFileId": null
+ "documentComment": "Uploaded by applicant",
+ "documentDateAdded": null,
+ "documentEmailContent": null,
+ "documentFileId": null,
+ "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "documentLink": {
+ "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary",
+ "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1"
+ },
+ "documentType": null
}
- }
-],
+ }
+ ],
"applicant1Email": "citizen.automation@mailinator.com",
"applicant1EmailAddress": "abid@gmail.co",
"applicant1FirstName": "Abid1",
@@ -101,6 +98,11 @@
"applicant2PhoneNumber": "12121212121",
"applicant2SotFullName": null,
"applicant2StatementOfTruth": null,
+ "applicantLocalAuthority": null,
+ "applicantLocalAuthorityEmail": null,
+ "applicantSocialWorkerEmail": null,
+ "applicantSocialWorkerName": null,
+ "applicantSocialWorkerPhoneNumber": null,
"applicationFeeOrderSummary": {
"Fees": null,
"PaymentReference": null,
@@ -118,6 +120,8 @@
"birthFatherAddressPostCode": "SW1A 1AA",
"birthFatherAddressTown": "LONDON",
"birthFatherFirstName": "Father",
+ "birthFatherIdentityKnown": null,
+ "birthFatherLastAddressDate": null,
"birthFatherLastName": "Father",
"birthFatherNameOnCertificate": "Yes",
"birthFatherNationality": ["British"
@@ -136,14 +140,21 @@
"birthMotherAddressPostCode": "NG1 1JB",
"birthMotherAddressTown": "NOTTINGHAM",
"birthMotherFirstName": "Mother",
+ "birthMotherIdentityKnown": null,
+ "birthMotherLastAddressDate": null,
"birthMotherLastName": "Mother",
"birthMotherNameOnCertificate": null,
- "birthMotherNationality": ["Irish", "British"
+ "birthMotherNationality": ["British", "Irish"
],
"birthMotherNotAliveReason": "",
"birthMotherOccupation": "Teacher",
"birthMotherOtherNationalities": [],
"birthMotherStillAlive": "Yes",
+ "childLocalAuthority": "la",
+ "childLocalAuthorityEmail": null,
+ "childSocialWorkerEmail": null,
+ "childSocialWorkerName": null,
+ "childSocialWorkerPhoneNumber": null,
"childrenAdditionalNationalities": [
{
"id": "3b81bf8b-96ad-4001-a5cf-66f2af99a79c",
@@ -163,7 +174,7 @@
"childrenFirstNameAfterAdoption": "child",
"childrenLastName": "child",
"childrenLastNameAfterAdoption": "child",
- "childrenNationality": ["Irish", "British", "Other"
+ "childrenNationality": ["British", "Irish", "Other"
],
"childrenOtherSexAtBirth": "something",
"childrenSexAtBirth": "other",
@@ -174,12 +185,16 @@
"documentsUploaded": [],
"dueDate": null,
"familyCourtEmailId": "adoptionproject@mailinator.com",
- "placementOrderCourt": "xyz",
"familyCourtName": "xyz",
"findFamilyCourt": "Yes",
"hasAnotherAdopAgencyOrLA": "No",
"hasSiblings": "Yes",
"hyphenatedCaseRef": "1234-5678-9012-3456",
+ "localAuthorityContactEmail": "agency1@email.co.uk",
+ "localAuthorityContactName": "contact name1",
+ "localAuthorityName": "laname",
+ "localAuthorityPhoneNumber": "01234567890",
+ "message": null,
"otherApplicantRelation": "",
"otherParentAddress1": "BUCKINGHAM PALACE",
"otherParentAddress2": "",
@@ -191,6 +206,8 @@
"otherParentAddressPostCode": "SW1A 1AA",
"otherParentAddressTown": "LONDON",
"otherParentFirstName": "other",
+ "otherParentIdentityKnown": null,
+ "otherParentLastAddressDate": null,
"otherParentLastName": "parent",
"otherParentNameOnCertificate": null,
"otherParentNationality": null,
@@ -199,6 +216,7 @@
"otherParentOtherNationalities": [],
"otherParentStillAlive": "Yes",
"pcqId": "9c04ea3a-c614-4eac-8361-ac75fb59f9dc",
+ "placementOrderCourt": "xyz",
"placementOrders": [
{
"id": "6e59287f-a337-49ba-ae45-c1f8bfe72f25",
@@ -217,21 +235,24 @@
"placementOrderDate": "2021-12-12",
"placementOrderId": "1646222494045",
"placementOrderNumber": "12345",
- "placementOrderType": "some order2"
+ "placementOrderType": "Adoption order"
}
}
],
"selectedAdoptionAgencyId": "1646222614256",
"selectedPlacementOrderId": "1646222468418",
"selectedSiblingId": "1646222699254",
+ "selectedSiblingRelation": "Sister",
+ "selectedSiblingPoType": "Adoption order",
"siblings": [
{
"id": "1646222663145",
"value": {
"siblingId": "1646222663145",
"siblingRelation": "Brother",
- "siblingPoType": "some order",
- "siblingPoNumber": "1001"
+ "siblingPoType": "Adoption order",
+ "siblingPoNumber": "1001",
+ "siblingPlacementOtherType": ""
}
},
{
@@ -239,20 +260,20 @@
"value": {
"siblingId": "1646222699254",
"siblingRelation": "Sister",
- "siblingPoType": "some other order",
- "siblingPoNumber": "23456"
+ "siblingPoType": "Other",
+ "siblingPoNumber": "23456",
+ "siblingPlacementOtherType": "other type"
}
}
],
- "socialWorkerEmail": "socialw@email.com",
- "socialWorkerName": "social worker",
- "socialWorkerPhoneNumber": "01234567893",
- "childLocalAuthority": "la",
+ "socialWorkerDetails": null,
"solicitorEmail": null,
"solicitorFirm": null,
"solicitorHelpingWithApplication": null,
"solicitorName": null,
- "solicitorPhoneNumber": null
+ "solicitorPhoneNumber": null,
+ "status": "Draft",
+ "typeOfAdoption": null
},
"errors": null,
"state": null,
diff --git a/bin/functionalTest/casedata/response/response-caseworker-add-notes-about-to-submit.json b/bin/functionalTest/casedata/response/response-caseworker-add-notes-about-to-submit.json
new file mode 100644
index 000000000..bcd833a77
--- /dev/null
+++ b/bin/functionalTest/casedata/response/response-caseworker-add-notes-about-to-submit.json
@@ -0,0 +1,281 @@
+{
+ "data": {
+ "addAnotherPlacementOrder": "No",
+ "addAnotherSiblingPlacementOrder": "No",
+ "localAuthorityName": "laname",
+ "localAuthorityContactName": "contact name1",
+ "localAuthorityPhoneNumber": "01234567890",
+ "localAuthorityContactEmail": "agency1@email.co.uk",
+ "adopAgencyOrLaName": "agency1",
+ "adopAgencyOrLaContactName": "contact name1",
+ "adopAgencyOrLaPhoneNumber": "01234567890",
+ "adopAgencyAddressLine1": "address",
+ "adopAgencyTown": "town",
+ "adopAgencyPostcode": "aa14aa",
+ "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
+ "adoptionDocument": {
+ "documentComment": null,
+ "documentDateAdded": null,
+ "documentEmailContent": null,
+ "documentFileId": null,
+ "documentFileName": null,
+ "documentLink": null,
+ "documentType": null
+ },
+ "applicant1AdditionalNames": [
+ {
+ "id": "f736c59c-1a13-4a74-b6f4-ca202891dd94",
+ "value": {
+ "firstNames": "aaa",
+ "lastNames": "bbb1"
+ }
+ },
+ {
+ "id": "81fdf807-5a47-48ca-ab64-828563dd427e",
+ "value": {
+ "firstNames": "aaa",
+ "lastNames": "wwww"
+ }
+ }
+ ],
+ "applicant1AdditionalNationalities": [],
+ "applicant1Address1": "1 TRIVETT SQUARE",
+ "applicant1Address2": "",
+ "applicant1AddressCountry": "NOTTINGHAM CITY",
+ "applicant1AddressPostCode": "NG1 1JB",
+ "applicant1AddressSameAsApplicant1": null,
+ "applicant1AddressTown": "NOTTINGHAM",
+ "applicant1CannotUpload": "Yes",
+ "applicant1CannotUploadSupportingDocument": ["birthOrAdoptionCertificate"],
+ "applicant1ContactDetails": null,
+ "applicant1ContactDetailsConsent": "Yes",
+ "applicant1DateOfBirth": "1990-12-12",
+ "applicant1DocumentsUploaded": [
+ {
+ "id": "c283880e-068e-450a-b44d-e72a6191847b",
+ "value": {
+ "documentEmailContent": null,
+ "documentLink": {
+ "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1",
+ "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary"
+ },
+ "documentDateAdded": null,
+ "documentComment": "Uploaded by applicant",
+ "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "documentType": null,
+ "documentFileId": null
+ }
+ }
+ ],
+ "applicant1Email": "citizen.automation@mailinator.com",
+ "applicant1EmailAddress": "abid@gmail.co",
+ "applicant1FirstName": "Abid1",
+ "applicant1HasOtherNames": "No",
+ "applicant1LanguagePreference": "ENGLISH",
+ "applicant1LastName": "sayyad",
+ "applicant1Nationality": null,
+ "applicant1Occupation": "Software Engineer",
+ "applicant1PhoneNumber": "0987654321",
+ "applicant1SotFullName": "null",
+ "applicant1StatementOfTruth": "Yes",
+ "applicant2AdditionalNames": [],
+ "applicant2AdditionalNationalities": [],
+ "applicant2Address1": "2 WHITE ROSE WR2, BROAD STREET",
+ "applicant2Address2": "",
+ "applicant2AddressCountry": "NOTTINGHAM CITY",
+ "applicant2AddressPostCode": "NG1 3AL",
+ "applicant2AddressSameAsApplicant1": "No",
+ "applicant2AddressTown": "NOTTINGHAM",
+ "applicant2ContactDetails": null,
+ "applicant2ContactDetailsConsent": "Yes",
+ "applicant2DateOfBirth": "1990-12-12",
+ "applicant2Email": null,
+ "applicant2EmailAddress": "someone@gmail.com",
+ "applicant2FirstName": "second",
+ "applicant2HasOtherNames": "No",
+ "applicant2LanguagePreference": null,
+ "applicant2LastName": "sasass",
+ "applicant2Nationality": null,
+ "applicant2Occupation": "tester",
+ "applicant2PhoneNumber": "12121212121",
+ "applicant2SotFullName": "null",
+ "applicant2StatementOfTruth": "Yes",
+ "applicationFeeOrderSummary": {
+ "Fees": null,
+ "PaymentReference": null,
+ "PaymentTotal": null
+ },
+ "applicationPayments": [],
+ "applyingWith": "withSpouseOrCivilPartner",
+ "birthFatherAddress1": "BUCKINGHAM PALACE",
+ "birthFatherAddress2": "",
+ "birthFatherAddress3": null,
+ "birthFatherAddressCountry": null,
+ "birthFatherAddressCounty": "CITY OF WESTMINSTER",
+ "birthFatherAddressKnown": "Yes",
+ "birthFatherAddressNotKnownReason": "",
+ "birthFatherAddressPostCode": "SW1A 1AA",
+ "birthFatherAddressTown": "LONDON",
+ "birthFatherFirstName": "Father",
+ "birthFatherLastName": "Father",
+ "birthFatherNameOnCertificate": "Yes",
+ "birthFatherNationality": ["British"
+ ],
+ "birthFatherNotAliveReason": "",
+ "birthFatherOccupation": "unknown",
+ "birthFatherOtherNationalities": [],
+ "birthFatherStillAlive": "Yes",
+ "birthMotherAddress1": "2 TRIVETT SQUARE",
+ "birthMotherAddress2": "",
+ "birthMotherAddress3": null,
+ "birthMotherAddressCountry": null,
+ "birthMotherAddressCounty": "NOTTINGHAM CITY",
+ "birthMotherAddressKnown": "Yes",
+ "birthMotherAddressNotKnownReason": "Some reason",
+ "birthMotherAddressPostCode": "NG1 1JB",
+ "birthMotherAddressTown": "NOTTINGHAM",
+ "birthMotherFirstName": "Mother",
+ "birthMotherLastName": "Mother",
+ "birthMotherNameOnCertificate": null,
+ "birthMotherNationality": ["Irish", "British"
+ ],
+ "birthMotherNotAliveReason": "",
+ "birthMotherOccupation": "Teacher",
+ "birthMotherOtherNationalities": [],
+ "birthMotherStillAlive": "Yes",
+ "childLocalAuthority": "la",
+ "childLocalAuthorityEmail": "abc@gov.uk",
+ "childSocialWorkerEmail": "abc@gov.uk",
+ "childSocialWorkerName": "null",
+ "childSocialWorkerPhoneNumber": "1234567890",
+ "applicantLocalAuthority": null,
+ "applicantLocalAuthorityEmail": null,
+ "applicantSocialWorkerEmail": null,
+ "applicantSocialWorkerName": null,
+ "applicantSocialWorkerPhoneNumber": null,
+ "childrenAdditionalNationalities": [
+ {
+ "id": "3b81bf8b-96ad-4001-a5cf-66f2af99a79c",
+ "value": {
+ "country": "China"
+ }
+ },
+ {
+ "id": "82b96f32-3f85-4b69-abf6-fd4321ca7501",
+ "value": {
+ "country": "India"
+ }
+ }
+ ],
+ "childrenDateOfBirth": "2015-12-12",
+ "childrenFirstName": "child",
+ "childrenFirstNameAfterAdoption": "child",
+ "childrenLastName": "child",
+ "childrenLastNameAfterAdoption": "child",
+ "childrenNationality": ["Irish", "British", "Other"
+ ],
+ "childrenOtherSexAtBirth": "something",
+ "childrenSexAtBirth": "other",
+ "createdDate": null,
+ "dateChildMovedIn": "2021-10-12",
+ "dateSubmitted": null,
+ "documentsGenerated": [],
+ "documentsUploaded": [],
+ "dueDate": null,
+ "familyCourtEmailId": "adoptionproject@mailinator.com",
+ "placementOrderCourt": "xyz",
+ "familyCourtName": "xyz",
+ "findFamilyCourt": "Yes",
+ "hasAnotherAdopAgencyOrLA": "No",
+ "hasSiblings": "Yes",
+ "hyphenatedCaseRef": "1234-5678-9012-3456",
+ "otherApplicantRelation": "",
+ "otherParentAddress1": "BUCKINGHAM PALACE",
+ "otherParentAddress2": "",
+ "otherParentAddress3": null,
+ "otherParentAddressCountry": null,
+ "otherParentAddressCounty": "CITY OF WESTMINSTER",
+ "otherParentAddressKnown": "Yes",
+ "otherParentAddressNotKnownReason": "",
+ "otherParentAddressPostCode": "SW1A 1AA",
+ "otherParentAddressTown": "LONDON",
+ "otherParentFirstName": "other",
+ "otherParentLastName": "parent",
+ "otherParentNameOnCertificate": null,
+ "otherParentNationality": null,
+ "otherParentNotAliveReason": null,
+ "otherParentOccupation": null,
+ "otherParentOtherNationalities": [],
+ "otherParentStillAlive": "Yes",
+ "pcqId": "9c04ea3a-c614-4eac-8361-ac75fb59f9dc",
+ "placementOrders": [
+ {
+ "id": "6e59287f-a337-49ba-ae45-c1f8bfe72f25",
+ "value": {
+ "placementOrderCourt": "xyz",
+ "placementOrderDate": "2021-12-12",
+ "placementOrderId": "1646222468418",
+ "placementOrderNumber": "123456",
+ "placementOrderType": null
+ }
+ },
+ {
+ "id": "a341637f-c3f8-4a00-9d6f-c560cea7a677",
+ "value": {
+ "placementOrderCourt": "london court",
+ "placementOrderDate": "2021-12-12",
+ "placementOrderId": "1646222494045",
+ "placementOrderNumber": "12345",
+ "placementOrderType": "Adoption Order"
+ }
+ }
+ ],
+ "selectedAdoptionAgencyId": "1646222614256",
+ "selectedPlacementOrderId": "1646222468418",
+ "selectedSiblingId": "1646222699254",
+ "selectedSiblingRelation": "sister",
+ "selectedSiblingPoType": "adoptionOrder",
+ "siblings": [
+ {
+ "id": "1646222663145",
+ "value": {
+ "siblingId": "1646222663145",
+ "siblingRelation": "brother",
+ "siblingPoType": "adoptionOrder",
+ "siblingPoNumber": "1001",
+ "siblingPlacementOtherType": ""
+ }
+ },
+ {
+ "id": "1646222699254",
+ "value": {
+ "siblingId": "1646222699254",
+ "siblingRelation": "sister",
+ "siblingPoType": "other",
+ "siblingPoNumber": "23456",
+ "siblingPlacementOtherType": "other type"
+ }
+ }
+ ],
+ "solicitorEmail": null,
+ "solicitorFirm": null,
+ "solicitorHelpingWithApplication": null,
+ "solicitorName": null,
+ "solicitorPhoneNumber": null,
+ "caseNote": [
+ {
+ "id": "1",
+ "value": {
+ "author": "User Test",
+ "date": "${json-unit.any-string}",
+ "subject": "TEST_SUBJECT",
+ "note":"TEST_NOTE"
+ }
+ }
+ ]
+ },
+ "errors": null,
+ "state": "Submitted",
+ "warnings": null
+}
diff --git a/build.gradle b/build.gradle
index e47d658ed..a05462abe 100644
--- a/build.gradle
+++ b/build.gradle
@@ -21,6 +21,7 @@ plugins {
id 'idea'
id 'pmd'
id 'jacoco'
+ id 'io.spring.dependency-management' version '1.1.7'
id 'org.owasp.dependencycheck' version '9.1.0'
id 'org.sonarqube' version '5.0.0.4638'
id 'org.springframework.boot' version '3.4.11'
@@ -30,6 +31,12 @@ plugins {
id 'au.com.dius.pact' version '4.3.8'
}
+// This is cheating workaround to how Platops Jenkins pipeline detecting Java version
+// For more details on how the pipeline detect and setup Java version,
+// Ref: cnp-jenkins-library src/uk/gov/hmcts/contino/GradleBuilder.groovy function setupToolVersion()
+// We will need to move our nested Gradle build script to this root script in the near future
+var pipelineJavaVersion = "JavaLanguageVersion.of(21)"
+
apply plugin: 'cz.habarta.typescript-generator'
apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'io.spring.dependency-management'
@@ -45,6 +52,16 @@ ext['elasticsearch.version'] = '7.17.3'
ext['snakeyaml.version'] = '2.0'
ext['jackson.version'] = '2.15.2'
+java {
+ toolchain {
+ languageVersion = JavaLanguageVersion.of(21)
+ }
+}
+
+application {
+ mainClass.set('uk.gov.hmcts.reform.adoption.Application')
+}
+
sourceSets {
functionalTest {
java {
@@ -79,8 +96,8 @@ java {
idea {
module {
- testSourceDirs += file('src/integrationTest/java')
- testSourceDirs += file('src/functionalTest/java')
+ testSources.from file('src/integrationTest/java')
+ testSources.from file('src/functionalTest/java')
}
}
@@ -94,7 +111,7 @@ configurations {
contractTestImplementation.extendsFrom testImplementation
}
-tasks.withType(JavaCompile) {
+tasks.withType(JavaCompile).configureEach {
options.compilerArgs << "-Xlint:unchecked" << "-Werror"
}
@@ -114,17 +131,20 @@ test {
failFast = true
useJUnitPlatform()
}
-task integration(type: Test) {
+
+tasks.register('integration', Test) {
description = "Runs integration tests"
group = "Verification"
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
failFast = true
}
+
task yarnInstall(type: Exec) {
workingDir '.'
commandLine 'yarn', 'install'
}
+
task smoke(type: Test,dependsOn: ':yarnInstall') {
description = "Runs Smoke Tests"
doLast {
@@ -142,6 +162,7 @@ task functional(type: Test,dependsOn: ':yarnInstall') {
}
}
}
+
task highLevelDataSetup(type: JavaExec) {
mainClass.set("uk.gov.hmcts.reform.adoption.common.ccd.HighLevelDataSetupApp")
classpath += sourceSets.main.runtimeClasspath
@@ -352,10 +373,7 @@ dependencies {
}
implementation group: 'com.github.hmcts', name: 'ccd-client', version: '4.9.2'
implementation group: 'com.github.hmcts', name: 'idam-java-client', version: '3.0.4'
- implementation group: 'com.github.hmcts', name: 'java-logging', version: '6.1.9'
- implementation group: 'com.github.hmcts.java-logging', name: 'logging-appinsights', version: '6.1.9'
- // required by logging-appinsights
- implementation group: 'net.logstash.logback', name: 'logstash-logback-encoder', version: '8.1'
+ implementation group: 'com.github.hmcts', name: 'java-logging', version: '8.0.0'
// send-letter-client requires upgrade but causes gradle dependency exceptions ADOP-2686
implementation group: 'com.github.hmcts', name: 'send-letter-client', version: '4.0.4'
@@ -574,8 +592,24 @@ generateCCDConfig.doLast {
}
}
+def contractTestConstantsFile = file('src/contractTest/java/uk/gov/hmcts/reform/adoption/ContractTestConstants.java')
+if (!contractTestConstantsFile.exists()) {
+ throw new GradleException("Missing ContractTestConstants.java for pacticipant alignment.")
+}
+def contractTestConstantsMatcher = (contractTestConstantsFile.text =~ /CONSUMER_NAME\s*=\s*"([^"]+)"/)
+if (!contractTestConstantsMatcher.find()) {
+ throw new GradleException("Unable to read CONSUMER_NAME from ContractTestConstants.java for pacticipant alignment.")
+}
+def contractTestConsumerName = contractTestConstantsMatcher.group(1)
+def pactBrokerUrl = System.getenv("PACT_BROKER_FULL_URL")
+ ?: project.findProperty('pact.broker.url')?.toString()
+ ?: project.findProperty('pactbroker.url')?.toString()
+def pactBranchName = System.getenv("PACT_BRANCH_NAME") ?: 'Dev'
+// Use a different variable name to avoid Groovy DELEGATE_FIRST shadowing inside pact {} closures
+def resolvedBrokerUrl = pactBrokerUrl
+
project.ext {
- pacticipant = 'sscs_tribunalsCaseApi'
+ pacticipant = contractTestConsumerName
pacticipantVersion = getCheckedOutGitCommitHash()
}
@@ -583,20 +617,35 @@ task runAndPublishConsumerPactTests(type: Test){
logger.lifecycle("Runs pact Tests")
testClassesDirs = sourceSets.contractTest.output.classesDirs
classpath = sourceSets.contractTest.runtimeClasspath
-
}
runAndPublishConsumerPactTests.dependsOn contract
runAndPublishConsumerPactTests.finalizedBy pactPublish
+tasks.named('pactPublish') {
+ doFirst {
+ logger.lifecycle("pactPublish doFirst: resolvedBrokerUrl='${resolvedBrokerUrl}'")
+ logger.lifecycle("pactPublish doFirst: pact.publish.pactBrokerUrl='${project.pact?.publish?.pactBrokerUrl}'")
+ logger.lifecycle("pactPublish doFirst: pact.broker.pactBrokerUrl='${project.pact?.broker?.pactBrokerUrl}'")
+ }
+ onlyIf {
+ if (!resolvedBrokerUrl) {
+ logger.lifecycle("No pact broker URL configured; skipping pactPublish.")
+ return false
+ }
+ return true
+ }
+}
+
pact {
broker {
- pactBrokerUrl = System.getenv("PACT_BROKER_FULL_URL") ?: 'http://localhost:80'
+ it.pactBrokerUrl = resolvedBrokerUrl ?: 'http://localhost:80'
}
publish {
- pactDirectory = 'pacts'
- tags = [System.getenv("PACT_BRANCH_NAME") ?:'Dev']
- version = project.pacticipantVersion
+ it.pactDirectory = 'pacts'
+ it.pactBrokerUrl = resolvedBrokerUrl ?: 'http://localhost:80'
+ it.tags = [pactBranchName]
+ it.consumerVersion = project.pacticipantVersion
}
}
@@ -640,4 +689,3 @@ bootWithCCD {
}
authMode = uk.gov.hmcts.rse.AuthMode.AAT
}
-
diff --git a/charts/adoption-cos-api/Chart.yaml b/charts/adoption-cos-api/Chart.yaml
index 26f05e488..31669f0e1 100644
--- a/charts/adoption-cos-api/Chart.yaml
+++ b/charts/adoption-cos-api/Chart.yaml
@@ -3,27 +3,27 @@ appVersion: "1.0"
description: A Helm chart for adoption-cos-api App
name: adoption-cos-api
home: https://github.com/hmcts/adoption-cos-api
-version: 0.0.57
+version: 0.0.58
maintainers:
- name: HMCTS Adoption team
dependencies:
- name: java
version: 5.3.0
- repository: 'oci://hmctspublic.azurecr.io/helm'
+ repository: 'oci://hmctsprod.azurecr.io/helm'
- name: ccd
version: 9.2.2
- repository: 'oci://hmctspublic.azurecr.io/helm'
+ repository: 'oci://hmctsprod.azurecr.io/helm'
tags:
- ccd-idam-pr
- name: xui-webapp
version: ~1.0.0
- repository: 'oci://hmctspublic.azurecr.io/helm'
+ repository: 'oci://hmctsprod.azurecr.io/helm'
condition: xui-webapp.enabled
- name: ccd-case-document-am-api
version: 1.7.17
- repository: 'oci://hmctspublic.azurecr.io/helm'
+ repository: 'oci://hmctsprod.azurecr.io/helm'
condition: ccd-case-document-am-api.enabled
- name: postgresql
version: 1.1.0
- repository: 'oci://hmctspublic.azurecr.io/helm'
+ repository: 'oci://hmctsprod.azurecr.io/helm'
condition: postgresql.enabled
diff --git a/charts/adoption-cos-api/values.preview.template.yaml b/charts/adoption-cos-api/values.preview.template.yaml
index 5f0ed4d26..9c7369549 100644
--- a/charts/adoption-cos-api/values.preview.template.yaml
+++ b/charts/adoption-cos-api/values.preview.template.yaml
@@ -118,6 +118,8 @@ ccd:
am:
secrets:
- role-assignment-service-LD-SDK-KEY
+ environment:
+ JAVA_OPTS: "-XX:MaxRAMPercentage=65.0 --add-opens=java.base/java.lang=ALL-UNNAMED"
ccd-definition-store-api:
java:
@@ -142,7 +144,7 @@ ccd:
ccd-admin-web:
nodejs:
disableKeyVaults: true
- image: hmctspublic.azurecr.io/ccd/admin-web:latest
+ image: hmctsprod.azurecr.io/ccd/admin-web:latest
ingressHost: admin-web-${SERVICE_FQDN}
environment:
USER_PROFILE_DB_HOST: '{{ tpl .Values.global.postgresHostname $}}'
@@ -168,13 +170,13 @@ ccd:
replicas: 1
logstash:
- image: "hmctspublic.azurecr.io/imported/logstash/logstash"
+ image: "hmctsprod.azurecr.io/imported/logstash/logstash"
imageTag: "7.16.1"
imagePullPolicy: "IfNotPresent"
logstashJavaOpts: "-Xmx1g -Xms512M"
extraInitContainers: |
- name: download-postgres-jdbc
- image: hmctspublic.azurecr.io/curl:7.70.0
+ image: hmctsprod.azurecr.io/curl:7.70.0
command: ['curl', '-L', 'https://jdbc.postgresql.org/download/postgresql-42.2.18.jar', '-o', '/logstash-lib/postgresql.jar']
volumeMounts:
- name: logstash-lib
@@ -344,7 +346,7 @@ xui-webapp:
nodejs:
imagePullPolicy: Always
releaseNameOverride: ${SERVICE_NAME}-xui-webapp
- image: hmctspublic.azurecr.io/xui/webapp:latest
+ image: hmctsprod.azurecr.io/xui/webapp:latest
ingressHost: xui-${SERVICE_FQDN}
environment:
HEALTH_CCD_COMPONENT_API: http://${SERVICE_NAME}-ccd-api-gw/health
@@ -366,7 +368,7 @@ ccd-case-document-am-api:
disableKeyVaults: true
releaseNameOverride: ${SERVICE_NAME}-ccd-case-document-am-api
imagePullPolicy: Always
- image: hmctspublic.azurecr.io/ccd/case-document-am-api:latest
+ image: hmctsprod.azurecr.io/ccd/case-document-am-api:latest
ingressHost: ccd-case-document-am-api-${SERVICE_FQDN}
environment:
CASE_DOCUMENT_S2S_AUTHORISED_SERVICES: ccd_case_document_am_api,ccd_gw,xui_webapp,ccd_data,bulk_scan_processor,dg_docassembly_api,bulk_scan_orchestrator,adoption_cos_api,adoption_web
diff --git a/charts/adoption-cos-api/values.yaml b/charts/adoption-cos-api/values.yaml
index 408dafa9f..f78972d4d 100644
--- a/charts/adoption-cos-api/values.yaml
+++ b/charts/adoption-cos-api/values.yaml
@@ -12,7 +12,7 @@ ccd-case-document-am-api:
java:
applicationPort: 4550
- image: hmctspublic.azurecr.io/adoption/cos-api:latest
+ image: hmctsprod.azurecr.io/adoption/cos-api:latest
ingressHost: adoption-cos-api-{{ .Values.global.environment }}.service.core-compute-{{ .Values.global.environment }}.internal
aadIdentityName: adoption
keyVaults:
diff --git a/config/owasp/suppressions.xml b/config/owasp/suppressions.xml
index 433536d77..aa4922403 100644
--- a/config/owasp/suppressions.xml
+++ b/config/owasp/suppressions.xml
@@ -50,6 +50,48 @@
^pkg:maven/org\.apache\.logging\.log4j/log4j\-core@.*$
CVE-2025-68161
+
+
+ ^pkg:maven/org\.apache\.tomcat\.embed/tomcat\-embed\-core@.*$
+ CVE-2025-66614
+
+
+
+ ^pkg:maven/org\.apache\.tomcat\.embed/tomcat\-embed\-core@.*$
+ CVE-2026-24733
+
+
+
+ ^pkg:maven/org\.apache\.tomcat\.embed/tomcat\-embed\-core@.*$
+ CVE-2026-24734
+
+
+
+ ^pkg:maven/org\.apache\.tomcat\.embed/tomcat\-embed\-websocket@.*$
+ CVE-2025-66614
+
+
+
+ ^pkg:maven/org\.apache\.tomcat\.embed/tomcat\-embed\-websocket@.*$
+ CVE-2026-24733
+
+
+
+ ^pkg:maven/org\.apache\.tomcat\.embed/tomcat\-embed\-websocket@.*$
+ CVE-2026-24734
+
headers = Maps.newHashMap();
headers.put("Authorization", AUTH_TOKEN);
@@ -65,7 +66,8 @@ public RequestResponsePact downloadBinaryPact(PactDslWithProvider builder) throw
@Test
@PactTestFor(pactMethod = "downloadBinaryPact")
- public void verifyDownloadBinary() throws JSONException {
+ public void verifyDownloadBinary(MockServer mockServer) throws JSONException {
+ MockServerReadiness.awaitReady("127.0.0.1", mockServer.getPort());
when(authTokenGenerator.generate()).thenReturn(SOME_SERVICE_AUTHORIZATION_TOKEN);
ResponseEntity> response = caseDocumentClient.getDocumentBinary(
AUTH_TOKEN,
diff --git a/src/contractTest/java/uk/gov/hmcts/reform/adoption/ContractTestConstants.java b/src/contractTest/java/uk/gov/hmcts/reform/adoption/ContractTestConstants.java
new file mode 100644
index 000000000..4c8308ced
--- /dev/null
+++ b/src/contractTest/java/uk/gov/hmcts/reform/adoption/ContractTestConstants.java
@@ -0,0 +1,8 @@
+package uk.gov.hmcts.reform.adoption;
+
+public final class ContractTestConstants {
+ public static final String CONSUMER_NAME = "adoption_cos_api";
+
+ private ContractTestConstants() {
+ }
+}
diff --git a/src/contractTest/java/uk/gov/hmcts/reform/adoption/IdamApiConsumerTest.java b/src/contractTest/java/uk/gov/hmcts/reform/adoption/IdamApiConsumerTest.java
index fe033c696..8efa94fae 100644
--- a/src/contractTest/java/uk/gov/hmcts/reform/adoption/IdamApiConsumerTest.java
+++ b/src/contractTest/java/uk/gov/hmcts/reform/adoption/IdamApiConsumerTest.java
@@ -3,6 +3,7 @@
import au.com.dius.pact.consumer.dsl.PactDslJsonBody;
import au.com.dius.pact.consumer.dsl.PactDslJsonRootValue;
import au.com.dius.pact.consumer.dsl.PactDslWithProvider;
+import au.com.dius.pact.consumer.MockServer;
import au.com.dius.pact.consumer.junit5.PactTestFor;
import au.com.dius.pact.core.model.RequestResponsePact;
import au.com.dius.pact.core.model.annotations.Pact;
@@ -24,7 +25,7 @@
public class IdamApiConsumerTest extends IdamConsumerTestBase {
- @Pact(provider = "idamApi_oidc", consumer = "adoption_cos_api")
+ @Pact(provider = "idamApi_oidc", consumer = ContractTestConstants.CONSUMER_NAME)
public RequestResponsePact generatePactForUserInfo(PactDslWithProvider builder) throws JSONException {
return builder
@@ -39,7 +40,7 @@ public RequestResponsePact generatePactForUserInfo(PactDslWithProvider builder)
.toPact();
}
- @Pact(provider = "idamApi_oidc", consumer = "adoption_cos_api")
+ @Pact(provider = "idamApi_oidc", consumer = ContractTestConstants.CONSUMER_NAME)
public RequestResponsePact generatePactForToken(PactDslWithProvider builder) {
Map responseheaders = ImmutableMap.builder()
@@ -68,7 +69,8 @@ public RequestResponsePact generatePactForToken(PactDslWithProvider builder) {
@Test
@PactTestFor(pactMethod = "generatePactForUserInfo")
- public void verifyIdamUserDetailsRolesPactUserInfo() {
+ public void verifyIdamUserDetailsRolesPactUserInfo(MockServer mockServer) {
+ awaitMockServerReady(mockServer);
UserInfo userInfo = idamApi.retrieveUserInfo(SOME_AUTHORIZATION_TOKEN);
assertNotNull(userInfo.getUid());
assertNotNull(userInfo.getSub());
@@ -81,8 +83,8 @@ public void verifyIdamUserDetailsRolesPactUserInfo() {
@Test
@PactTestFor(pactMethod = "generatePactForToken")
- public void verifyIdamUserDetailsRolesPactToken() {
-
+ public void verifyIdamUserDetailsRolesPactToken(MockServer mockServer) {
+ awaitMockServerReady(mockServer);
TokenResponse token = idamApi.generateOpenIdToken(buildTokenRequestMap());
assertNotNull("Token is expected", token.accessToken);
}
diff --git a/src/contractTest/java/uk/gov/hmcts/reform/adoption/IdamConsumerTestBase.java b/src/contractTest/java/uk/gov/hmcts/reform/adoption/IdamConsumerTestBase.java
index d9ed15f18..8744b763b 100644
--- a/src/contractTest/java/uk/gov/hmcts/reform/adoption/IdamConsumerTestBase.java
+++ b/src/contractTest/java/uk/gov/hmcts/reform/adoption/IdamConsumerTestBase.java
@@ -5,12 +5,12 @@
import au.com.dius.pact.core.model.annotations.PactFolder;
import org.apache.http.client.fluent.Executor;
import org.junit.jupiter.api.AfterEach;
-import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
+import au.com.dius.pact.consumer.MockServer;
import uk.gov.hmcts.reform.idam.client.IdamApi;
@ExtendWith(PactConsumerTestExt.class)
@@ -22,7 +22,6 @@
})
public abstract class IdamConsumerTestBase {
- public static final int SLEEP_TIME = 2000;
protected static final String SOME_AUTHORIZATION_TOKEN = "Bearer UserAuthToken";
@Autowired
protected IdamApi idamApi;
@@ -33,9 +32,8 @@ public abstract class IdamConsumerTestBase {
@Value("${idam.client.secret}")
protected String clientSecret;
- @BeforeEach
- public void prepareTest() throws Exception {
- Thread.sleep(SLEEP_TIME);
+ protected void awaitMockServerReady(MockServer mockServer) {
+ MockServerReadiness.awaitReady("127.0.0.1", mockServer.getPort());
}
@AfterEach
diff --git a/src/contractTest/java/uk/gov/hmcts/reform/adoption/MockServerReadiness.java b/src/contractTest/java/uk/gov/hmcts/reform/adoption/MockServerReadiness.java
new file mode 100644
index 000000000..dd73b9507
--- /dev/null
+++ b/src/contractTest/java/uk/gov/hmcts/reform/adoption/MockServerReadiness.java
@@ -0,0 +1,66 @@
+package uk.gov.hmcts.reform.adoption;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.net.Socket;
+import java.time.Duration;
+import java.time.Instant;
+
+public final class MockServerReadiness {
+ private static final Duration DEFAULT_TIMEOUT = Duration.ofSeconds(10);
+ private static final Duration DEFAULT_POLL_INTERVAL = Duration.ofMillis(200);
+ private static final Duration READY_STABILITY = Duration.ofSeconds(2);
+
+ private MockServerReadiness() {
+ }
+
+ public static void awaitReady(String host, int port) {
+ awaitReady(host, port, DEFAULT_TIMEOUT, DEFAULT_POLL_INTERVAL);
+ }
+
+ static void awaitReady(String host, int port, Duration timeout, Duration pollInterval) {
+ Instant deadline = Instant.now().plus(timeout);
+ IOException lastException = null;
+ Instant firstStableConnect = null;
+
+ while (Instant.now().isBefore(deadline)) {
+ boolean connected = false;
+ try (Socket socket = new Socket()) {
+ socket.connect(new InetSocketAddress(host, port), (int) pollInterval.toMillis());
+ connected = true;
+ } catch (IOException ex) {
+ lastException = ex;
+ }
+
+ if (connected) {
+ if (firstStableConnect == null) {
+ firstStableConnect = Instant.now();
+ }
+ if (Duration.between(firstStableConnect, Instant.now()).compareTo(READY_STABILITY) >= 0) {
+ return;
+ }
+ } else {
+ firstStableConnect = null;
+ }
+
+ pause(pollInterval);
+ }
+
+ String message = String.format(
+ "Pact mock server on %s:%d did not become ready within %d ms",
+ host,
+ port,
+ timeout.toMillis()
+ );
+ throw new AssertionError(message, lastException);
+ }
+
+ private static void pause(Duration pollInterval) {
+ try {
+ Thread.sleep(pollInterval.toMillis());
+ } catch (InterruptedException ex) {
+ Thread.currentThread().interrupt();
+ throw new AssertionError("Mock server readiness check was interrupted", ex);
+ }
+ }
+}
diff --git a/src/functionalTest/java/uk/gov/hmcts/reform/adoption/citizen/ApplicationPaymentFT.java b/src/functionalTest/java/uk/gov/hmcts/reform/adoption/citizen/ApplicationPaymentFT.java
index 5e92ec541..1e0164475 100644
--- a/src/functionalTest/java/uk/gov/hmcts/reform/adoption/citizen/ApplicationPaymentFT.java
+++ b/src/functionalTest/java/uk/gov/hmcts/reform/adoption/citizen/ApplicationPaymentFT.java
@@ -1,9 +1,26 @@
package uk.gov.hmcts.reform.adoption.citizen;
+import io.restassured.response.Response;
+import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.TestPropertySource;
import uk.gov.hmcts.reform.adoption.testutil.FunctionalTest;
+import java.io.IOException;
+import java.util.Map;
+
+import static net.javacrumbs.jsonunit.assertj.JsonAssertions.assertThatJson;
+import static net.javacrumbs.jsonunit.assertj.JsonAssertions.json;
+import static net.javacrumbs.jsonunit.core.Option.IGNORING_ARRAY_ORDER;
+import static net.javacrumbs.jsonunit.core.Option.IGNORING_EXTRA_ARRAY_ITEMS;
+import static net.javacrumbs.jsonunit.core.Option.IGNORING_EXTRA_FIELDS;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.springframework.http.HttpStatus.OK;
+import static uk.gov.hmcts.reform.adoption.adoptioncase.event.CitizenAddPayment.CITIZEN_ADD_PAYMENT;
+import static uk.gov.hmcts.reform.adoption.testutil.TestConstants.ABOUT_TO_SUBMIT_URL;
+import static uk.gov.hmcts.reform.adoption.testutil.TestDataHelper.caseData;
+import static uk.gov.hmcts.reform.adoption.testutil.TestDataHelper.expectedResponse;
+
@TestPropertySource("classpath:application.yaml")
@SpringBootTest
public class ApplicationPaymentFT extends FunctionalTest {
@@ -15,49 +32,49 @@ public class ApplicationPaymentFT extends FunctionalTest {
private static final String RESPONSE_FAILED_VALIDATION = "classpath:casedata/response-application-validation-failed.json";
private static final String RESPONSE_FAILED_PAYMENT = "classpath:casedata/response-application-payment-failed.json";
- // @Test
- // public void shouldUpdateCaseStateInCcdToSubmittedAndGenerateDocumentAndNotifications() throws IOException {
- // Map request = caseData(REQUEST);
- //
- // Response response = triggerCallback(request, CITIZEN_ADD_PAYMENT, ABOUT_TO_SUBMIT_URL);
- //
- // assertThat(response.getStatusCode()).isEqualTo(OK.value());
- //
- // assertThatJson(response.asString())
- // .when(IGNORING_EXTRA_FIELDS)
- // .when(IGNORING_ARRAY_ORDER)
- // .when(IGNORING_EXTRA_ARRAY_ITEMS)
- // .isEqualTo(json(expectedResponse(RESPONSE)));
- // }
-
- // @Test
- // public void shouldUpdateCaseStateInCcdToDraftInCaseOfFailedPaymentAndNoDocumentsGeneratedAndNoNotificationsSent()
- // throws IOException {
- // Map request = caseData(REQUEST_FAILED_PAYMENT);
- //
- // Response response = triggerCallback(request, CITIZEN_ADD_PAYMENT, ABOUT_TO_SUBMIT_URL);
- //
- // assertThat(response.getStatusCode()).isEqualTo(OK.value());
- //
- // assertThatJson(response.asString())
- // .when(IGNORING_EXTRA_FIELDS)
- // .when(IGNORING_ARRAY_ORDER)
- // .isEqualTo(json(expectedResponse(RESPONSE_FAILED_PAYMENT)));
- // }
- //
- //
- // @Test
- // public void shouldThrowErrorIfValidationFailsAndNoDocumentsGeneratedAndNoNotificationsSent()
- // throws IOException {
- // Map request = caseData(REQUEST_FAILED_VALIDATION);
- //
- // Response response = triggerCallback(request, CITIZEN_ADD_PAYMENT, ABOUT_TO_SUBMIT_URL);
- //
- // assertThat(response.getStatusCode()).isEqualTo(OK.value());
- //
- // assertThatJson(response.asString())
- // .when(IGNORING_EXTRA_FIELDS)
- // .when(IGNORING_ARRAY_ORDER)
- // .isEqualTo(json(expectedResponse(RESPONSE_FAILED_VALIDATION)));
- // }
+ @Test
+ public void shouldUpdateCaseStateInCcdToSubmittedAndGenerateDocumentAndNotifications() throws IOException {
+ Map request = caseData(REQUEST);
+
+ Response response = triggerCallback(request, CITIZEN_ADD_PAYMENT, ABOUT_TO_SUBMIT_URL);
+
+ assertThat(response.getStatusCode()).isEqualTo(OK.value());
+
+ assertThatJson(response.asString())
+ .when(IGNORING_EXTRA_FIELDS)
+ .when(IGNORING_ARRAY_ORDER)
+ .when(IGNORING_EXTRA_ARRAY_ITEMS)
+ .isEqualTo(json(expectedResponse(RESPONSE)));
+ }
+
+ @Test
+ public void shouldUpdateCaseStateInCcdToDraftInCaseOfFailedPaymentAndNoDocumentsGeneratedAndNoNotificationsSent()
+ throws IOException {
+ Map request = caseData(REQUEST_FAILED_PAYMENT);
+
+ Response response = triggerCallback(request, CITIZEN_ADD_PAYMENT, ABOUT_TO_SUBMIT_URL);
+
+ assertThat(response.getStatusCode()).isEqualTo(OK.value());
+
+ assertThatJson(response.asString())
+ .when(IGNORING_EXTRA_FIELDS)
+ .when(IGNORING_ARRAY_ORDER)
+ .isEqualTo(json(expectedResponse(RESPONSE_FAILED_PAYMENT)));
+ }
+
+
+ @Test
+ public void shouldThrowErrorIfValidationFailsAndNoDocumentsGeneratedAndNoNotificationsSent()
+ throws IOException {
+ Map request = caseData(REQUEST_FAILED_VALIDATION);
+
+ Response response = triggerCallback(request, CITIZEN_ADD_PAYMENT, ABOUT_TO_SUBMIT_URL);
+
+ assertThat(response.getStatusCode()).isEqualTo(OK.value());
+
+ assertThatJson(response.asString())
+ .when(IGNORING_EXTRA_FIELDS)
+ .when(IGNORING_ARRAY_ORDER)
+ .isEqualTo(json(expectedResponse(RESPONSE_FAILED_VALIDATION)));
+ }
}
diff --git a/src/functionalTest/resources/casedata/response-application-payment-added.json b/src/functionalTest/resources/casedata/response-application-payment-added.json
index d6bce0cb7..858588c76 100644
--- a/src/functionalTest/resources/casedata/response-application-payment-added.json
+++ b/src/functionalTest/resources/casedata/response-application-payment-added.json
@@ -2,17 +2,13 @@
"data": {
"addAnotherPlacementOrder": "No",
"addAnotherSiblingPlacementOrder": "No",
- "localAuthorityName": "laname",
- "localAuthorityContactName": "contact name1",
- "localAuthorityPhoneNumber": "01234567890",
- "localAuthorityContactEmail": "agency1@email.co.uk",
- "adopAgencyOrLaName": "agency1",
+ "adopAgencyAddressLine1": "address",
+ "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
"adopAgencyOrLaContactName": "contact name1",
+ "adopAgencyOrLaName": "agency1",
"adopAgencyOrLaPhoneNumber": "01234567890",
- "adopAgencyAddressLine1": "address",
- "adopAgencyTown": "town",
"adopAgencyPostcode": "aa14aa",
- "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
+ "adopAgencyTown": "town",
"adoptionDocument": {
"documentComment": null,
"documentDateAdded": null,
@@ -53,23 +49,23 @@
"applicant1ContactDetailsConsent": "Yes",
"applicant1DateOfBirth": "1990-12-12",
"applicant1DocumentsUploaded": [
- {
+ {
"id": "c283880e-068e-450a-b44d-e72a6191847b",
"value": {
- "documentEmailContent": null,
- "documentLink": {
- "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1",
- "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary"
- },
- "documentDateAdded": null,
- "documentComment": "Uploaded by applicant",
- "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "documentType": null,
- "documentFileId": null
+ "documentComment": "Uploaded by applicant",
+ "documentDateAdded": null,
+ "documentEmailContent": null,
+ "documentFileId": null,
+ "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "documentLink": {
+ "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary",
+ "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1"
+ },
+ "documentType": null
}
- }
-],
+ }
+ ],
"applicant1Email": "citizen.automation@mailinator.com",
"applicant1EmailAddress": "abid@gmail.co",
"applicant1FirstName": "Abid1",
@@ -103,12 +99,38 @@
"applicant2PhoneNumber": "12121212121",
"applicant2SotFullName": null,
"applicant2StatementOfTruth": null,
+ "applicantLocalAuthority": "LA",
+ "applicantLocalAuthorityEmail": "la@email.gov.uk",
+ "applicantSocialWorkerEmail": "applicant.socialworker@la.gov.uk",
+ "applicantSocialWorkerName": "Applicant Social Worker",
+ "applicantSocialWorkerPhoneNumber": "01234567890",
"applicationFeeOrderSummary": {
- "Fees": null,
- "PaymentReference": null,
- "PaymentTotal": null
+ "Fees": [
+ {
+ "value": {
+ "FeeAmount": "1234",
+ "FeeCode": "A58",
+ "FeeVersion": "1"
+ }
+ }
+ ],
+ "PaymentTotal": "183"
},
- "applicationPayments": [],
+ "applicationPayments": [
+ {
+ "id": "12",
+ "value": {
+ "amount": 183,
+ "channel": "online",
+ "created": "2021-11-02T02:50:12.208Z",
+ "feeCode": "A58",
+ "reference": "1234",
+ "status": "success",
+ "transactionId": "1234",
+ "updated": "2021-11-02T02:50:12.208Z"
+ }
+ }
+ ],
"applyingWith": "withSpouseOrCivilPartner",
"birthFatherAddress1": "BUCKINGHAM PALACE",
"birthFatherAddress2": "",
@@ -149,6 +171,11 @@
"birthMotherOccupation": "Teacher",
"birthMotherOtherNationalities": [],
"birthMotherStillAlive": "Yes",
+ "childLocalAuthority": "la",
+ "childLocalAuthorityEmail": "abc@gov.uk",
+ "childSocialWorkerEmail": "abc@gov.uk",
+ "childSocialWorkerName": "null",
+ "childSocialWorkerPhoneNumber": "1234567890",
"childrenAdditionalNationalities": [
{
"id": "3b81bf8b-96ad-4001-a5cf-66f2af99a79c",
@@ -182,45 +209,48 @@
{
"id": "${json-unit.any-string}",
"value": {
+ "documentComment": null,
+ "documentDateAdded": null,
"documentEmailContent": null,
+ "documentFileId": "${json-unit.any-string}",
+ "documentFileName": "${json-unit.any-string}",
"documentLink": {
- "document_url": "${json-unit.any-string}",
+ "document_binary_url": "${json-unit.any-string}",
"document_filename": "${json-unit.any-string}",
- "document_binary_url": "${json-unit.any-string}"
+ "document_url": "${json-unit.any-string}"
},
- "documentDateAdded": null,
- "documentComment": null,
- "documentFileName": "${json-unit.any-string}",
- "documentType": "applicationSummaryEn",
- "documentFileId": "${json-unit.any-string}"
+ "documentType": "applicationSummaryEn"
}
},
{
"id": "${json-unit.any-string}",
"value": {
+ "documentComment": null,
+ "documentDateAdded": null,
"documentEmailContent": null,
+ "documentFileId": "${json-unit.any-string}",
+ "documentFileName": "${json-unit.any-string}",
"documentLink": {
- "document_url": "${json-unit.any-string}",
+ "document_binary_url": "${json-unit.any-string}",
"document_filename": "${json-unit.any-string}",
- "document_binary_url": "${json-unit.any-string}"
+ "document_url": "${json-unit.any-string}"
},
- "documentDateAdded": null,
- "documentComment": null,
- "documentFileName": "${json-unit.any-string}",
- "documentType": "applicationSummaryCy",
- "documentFileId": "${json-unit.any-string}"
+ "documentType": "applicationSummaryCy"
}
}
],
"documentsUploaded": [],
"dueDate": "${json-unit.any-string}",
"familyCourtEmailId": "adoptionproject@mailinator.com",
- "placementOrderCourt": "xyz",
"familyCourtName": "xyz",
"findFamilyCourt": "Yes",
"hasAnotherAdopAgencyOrLA": "No",
"hasSiblings": "Yes",
"hyphenatedCaseRef": "1234-5678-9012-3456",
+ "localAuthorityContactEmail": "agency1@email.co.uk",
+ "localAuthorityContactName": "contact name1",
+ "localAuthorityName": "laname",
+ "localAuthorityPhoneNumber": "01234567890",
"otherApplicantRelation": "",
"otherParentAddress1": "BUCKINGHAM PALACE",
"otherParentAddress2": "",
@@ -240,6 +270,7 @@
"otherParentOtherNationalities": [],
"otherParentStillAlive": "Yes",
"pcqId": "9c04ea3a-c614-4eac-8361-ac75fb59f9dc",
+ "placementOrderCourt": "xyz",
"placementOrders": [
{
"id": "6e59287f-a337-49ba-ae45-c1f8bfe72f25",
@@ -265,67 +296,30 @@
"selectedAdoptionAgencyId": "1646222614256",
"selectedPlacementOrderId": "1646222468418",
"selectedSiblingId": "1646222699254",
- "selectedSiblingRelation": "Sister",
"selectedSiblingPoType": "Adoption order",
+ "selectedSiblingRelation": "Sister",
"siblings": [
{
"id": "1646222663145",
"value": {
"siblingId": "1646222663145",
- "siblingRelation": "Brother",
- "siblingPoType": "Adoption order",
+ "siblingPlacementOtherType": "",
"siblingPoNumber": "1001",
- "siblingPlacementOtherType": ""
+ "siblingPoType": "Adoption order",
+ "siblingRelation": "Brother"
}
},
{
"id": "1646222699254",
"value": {
"siblingId": "1646222699254",
- "siblingRelation": "Sister",
- "siblingPoType": "Other",
+ "siblingPlacementOtherType": "other type",
"siblingPoNumber": "23456",
- "siblingPlacementOtherType": "other type"
- }
- }
- ],
- "applicationPayments": [
- {
- "id": "12",
- "value": {
- "created": "2021-11-02T02:50:12.208Z",
- "updated": "2021-11-02T02:50:12.208Z",
- "feeCode": "A58",
- "amount": 183,
- "status": "success",
- "channel": "online",
- "reference": "1234",
- "transactionId": "1234"
+ "siblingPoType": "Other",
+ "siblingRelation": "Sister"
}
}
],
- "applicationFeeOrderSummary": {
- "PaymentTotal": "183",
- "Fees": [
- {
- "value": {
- "FeeAmount": "1234",
- "FeeCode": "A58",
- "FeeVersion": "1"
- }
- }
- ]
- },
- "childLocalAuthority": "la",
- "childLocalAuthorityEmail": "abc@gov.uk",
- "childSocialWorkerEmail": "abc@gov.uk",
- "childSocialWorkerName": "null",
- "childSocialWorkerPhoneNumber": "1234567890",
- "applicantLocalAuthority": null,
- "applicantLocalAuthorityEmail": null,
- "applicantSocialWorkerEmail": null,
- "applicantSocialWorkerName": null,
- "applicantSocialWorkerPhoneNumber": null,
"solicitorEmail": null,
"solicitorFirm": null,
"solicitorHelpingWithApplication": null,
diff --git a/src/functionalTest/resources/casedata/response-application-payment-failed.json b/src/functionalTest/resources/casedata/response-application-payment-failed.json
index d6da25ca6..d93f18b73 100644
--- a/src/functionalTest/resources/casedata/response-application-payment-failed.json
+++ b/src/functionalTest/resources/casedata/response-application-payment-failed.json
@@ -2,17 +2,13 @@
"data": {
"addAnotherPlacementOrder": "No",
"addAnotherSiblingPlacementOrder": "No",
- "localAuthorityName": "laname",
- "localAuthorityContactName": "contact name1",
- "localAuthorityPhoneNumber": "01234567890",
- "localAuthorityContactEmail": "agency1@email.co.uk",
- "adopAgencyOrLaName": "agency1",
+ "adopAgencyAddressLine1": "address",
+ "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
"adopAgencyOrLaContactName": "contact name1",
+ "adopAgencyOrLaName": "agency1",
"adopAgencyOrLaPhoneNumber": "01234567890",
- "adopAgencyAddressLine1": "address",
- "adopAgencyTown": "town",
"adopAgencyPostcode": "aa14aa",
- "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
+ "adopAgencyTown": "town",
"adoptionDocument": {
"documentComment": null,
"documentDateAdded": null,
@@ -53,23 +49,23 @@
"applicant1ContactDetailsConsent": "Yes",
"applicant1DateOfBirth": "1990-12-12",
"applicant1DocumentsUploaded": [
- {
+ {
"id": "c283880e-068e-450a-b44d-e72a6191847b",
"value": {
- "documentEmailContent": null,
- "documentLink": {
- "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1",
- "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary"
- },
- "documentDateAdded": null,
- "documentComment": "Uploaded by applicant",
- "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "documentType": null,
- "documentFileId": null
+ "documentComment": "Uploaded by applicant",
+ "documentDateAdded": null,
+ "documentEmailContent": null,
+ "documentFileId": null,
+ "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "documentLink": {
+ "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary",
+ "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1"
+ },
+ "documentType": null
}
- }
-],
+ }
+ ],
"applicant1Email": "citizen.automation@mailinator.com",
"applicant1EmailAddress": "abid@gmail.co",
"applicant1FirstName": "Abid1",
@@ -103,12 +99,40 @@
"applicant2PhoneNumber": "12121212121",
"applicant2SotFullName": null,
"applicant2StatementOfTruth": null,
+ "applicantLocalAuthority": "LA",
+ "applicantLocalAuthorityEmail": "la@email.gov.uk",
+ "applicantSocialWorkerEmail": "applicant.socialworker@la.gov.uk",
+ "applicantSocialWorkerName": "Applicant Social Worker",
+ "applicantSocialWorkerPhoneNumber": "01234567890",
"applicationFeeOrderSummary": {
- "Fees": null,
+ "Fees": [
+ {
+ "value": {
+ "FeeAmount": "1234",
+ "FeeCode": "A58",
+ "FeeDescription": null,
+ "FeeVersion": "1"
+ }
+ }
+ ],
"PaymentReference": null,
- "PaymentTotal": null
+ "PaymentTotal": "183"
},
- "applicationPayments": [],
+ "applicationPayments": [
+ {
+ "id": "12",
+ "value": {
+ "amount": 183,
+ "channel": "online",
+ "created": "2021-11-02T02:50:12.208Z",
+ "feeCode": "A58",
+ "reference": "1234",
+ "status": "declined",
+ "transactionId": "1234",
+ "updated": "2021-11-02T02:50:12.208Z"
+ }
+ }
+ ],
"applyingWith": "withSpouseOrCivilPartner",
"birthFatherAddress1": "BUCKINGHAM PALACE",
"birthFatherAddress2": "",
@@ -149,6 +173,11 @@
"birthMotherOccupation": "Teacher",
"birthMotherOtherNationalities": [],
"birthMotherStillAlive": "Yes",
+ "childLocalAuthority": "la",
+ "childLocalAuthorityEmail": "abc@gov.uk",
+ "childSocialWorkerEmail": "abc@gov.uk",
+ "childSocialWorkerName": "null",
+ "childSocialWorkerPhoneNumber": "1234567890",
"childrenAdditionalNationalities": [
{
"id": "3b81bf8b-96ad-4001-a5cf-66f2af99a79c",
@@ -178,17 +207,19 @@
"createdDate": null,
"dateChildMovedIn": "2021-10-12",
"dateSubmitted": null,
- "documentsGenerated": [
- ],
+ "documentsGenerated": [],
"documentsUploaded": [],
"dueDate": null,
"familyCourtEmailId": "adoptionproject@mailinator.com",
- "placementOrderCourt": "xyz",
"familyCourtName": "xyz",
"findFamilyCourt": "Yes",
"hasAnotherAdopAgencyOrLA": "No",
"hasSiblings": "Yes",
"hyphenatedCaseRef": "1234-5678-9012-3456",
+ "localAuthorityContactEmail": "agency1@email.co.uk",
+ "localAuthorityContactName": "contact name1",
+ "localAuthorityName": "laname",
+ "localAuthorityPhoneNumber": "01234567890",
"otherApplicantRelation": "",
"otherParentAddress1": "BUCKINGHAM PALACE",
"otherParentAddress2": "",
@@ -208,6 +239,7 @@
"otherParentOtherNationalities": [],
"otherParentStillAlive": "Yes",
"pcqId": "9c04ea3a-c614-4eac-8361-ac75fb59f9dc",
+ "placementOrderCourt": "xyz",
"placementOrders": [
{
"id": "6e59287f-a337-49ba-ae45-c1f8bfe72f25",
@@ -233,69 +265,30 @@
"selectedAdoptionAgencyId": "1646222614256",
"selectedPlacementOrderId": "1646222468418",
"selectedSiblingId": "1646222699254",
- "selectedSiblingRelation": "Sister",
"selectedSiblingPoType": "Adoption order",
+ "selectedSiblingRelation": "Sister",
"siblings": [
{
"id": "1646222663145",
"value": {
"siblingId": "1646222663145",
- "siblingRelation": "Brother",
- "siblingPoType": "Adoption order",
+ "siblingPlacementOtherType": "",
"siblingPoNumber": "1001",
- "siblingPlacementOtherType": ""
+ "siblingPoType": "Adoption order",
+ "siblingRelation": "Brother"
}
},
{
"id": "1646222699254",
"value": {
"siblingId": "1646222699254",
- "siblingRelation": "Sister",
- "siblingPoType": "Other",
+ "siblingPlacementOtherType": "other type",
"siblingPoNumber": "23456",
- "siblingPlacementOtherType": "other type"
- }
- }
- ],
- "applicationPayments": [
- {
- "id": "12",
- "value": {
- "created": "2021-11-02T02:50:12.208Z",
- "updated": "2021-11-02T02:50:12.208Z",
- "feeCode": "A58",
- "amount": 183,
- "status": "declined",
- "channel": "online",
- "reference": "1234",
- "transactionId": "1234"
+ "siblingPoType": "Other",
+ "siblingRelation": "Sister"
}
}
],
- "applicationFeeOrderSummary": {
- "PaymentTotal": "183",
- "PaymentReference": null,
- "Fees": [
- {
- "value": {
- "FeeAmount": "1234",
- "FeeCode": "A58",
- "FeeDescription":null,
- "FeeVersion": "1"
- }
- }
- ]
- },
- "childLocalAuthority": "la",
- "childLocalAuthorityEmail": "abc@gov.uk",
- "childSocialWorkerEmail": "abc@gov.uk",
- "childSocialWorkerName": "null",
- "childSocialWorkerPhoneNumber": "1234567890",
- "applicantLocalAuthority": null,
- "applicantLocalAuthorityEmail": null,
- "applicantSocialWorkerEmail": null,
- "applicantSocialWorkerName": null,
- "applicantSocialWorkerPhoneNumber": null,
"solicitorEmail": null,
"solicitorFirm": null,
"solicitorHelpingWithApplication": null,
diff --git a/src/functionalTest/resources/casedata/response-application-validation-failed.json b/src/functionalTest/resources/casedata/response-application-validation-failed.json
index c5553bda5..7e9c29368 100644
--- a/src/functionalTest/resources/casedata/response-application-validation-failed.json
+++ b/src/functionalTest/resources/casedata/response-application-validation-failed.json
@@ -2,17 +2,13 @@
"data": {
"addAnotherPlacementOrder": "No",
"addAnotherSiblingPlacementOrder": "No",
- "localAuthorityName": "laname",
- "localAuthorityContactName": "contact name1",
- "localAuthorityPhoneNumber": "01234567890",
- "localAuthorityContactEmail": "agency1@email.co.uk",
- "adopAgencyOrLaName": "agency1",
+ "adopAgencyAddressLine1": "address",
+ "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
"adopAgencyOrLaContactName": "contact name1",
+ "adopAgencyOrLaName": "agency1",
"adopAgencyOrLaPhoneNumber": "01234567890",
- "adopAgencyAddressLine1": "address",
- "adopAgencyTown": "town",
"adopAgencyPostcode": "aa14aa",
- "adopAgencyOrLaContactEmail": "agency1@email.co.uk",
+ "adopAgencyTown": "town",
"adoptionDocument": {
"documentComment": null,
"documentDateAdded": null,
@@ -53,23 +49,23 @@
"applicant1ContactDetailsConsent": "Yes",
"applicant1DateOfBirth": "1990-12-12",
"applicant1DocumentsUploaded": [
- {
+ {
"id": "c283880e-068e-450a-b44d-e72a6191847b",
"value": {
- "documentEmailContent": null,
- "documentLink": {
- "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1",
- "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary"
- },
- "documentDateAdded": null,
- "documentComment": "Uploaded by applicant",
- "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
- "documentType": null,
- "documentFileId": null
+ "documentComment": "Uploaded by applicant",
+ "documentDateAdded": null,
+ "documentEmailContent": null,
+ "documentFileId": null,
+ "documentFileName": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "documentLink": {
+ "document_binary_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1/binary",
+ "document_filename": "adoption-application--1234567890123456-2022-03-29:23:55.pdf",
+ "document_url": "http://dm-store-aat.service.core-compute-aat.internal/documents/a54c625a-82da-44c7-a06a-b4af4c09f8b1"
+ },
+ "documentType": null
}
- }
-],
+ }
+ ],
"applicant1Email": "citizen.automation@mailinator.com",
"applicant1EmailAddress": "abid@gmail.co",
"applicant1FirstName": "Abid1",
@@ -103,12 +99,40 @@
"applicant2PhoneNumber": "12121212121",
"applicant2SotFullName": null,
"applicant2StatementOfTruth": null,
+ "applicantLocalAuthority": "LA",
+ "applicantLocalAuthorityEmail": "la@email.gov.uk",
+ "applicantSocialWorkerEmail": "applicant.socialworker@la.gov.uk",
+ "applicantSocialWorkerName": "Applicant Social Worker",
+ "applicantSocialWorkerPhoneNumber": "01234567890",
"applicationFeeOrderSummary": {
- "Fees": null,
+ "Fees": [
+ {
+ "value": {
+ "FeeAmount": "1234",
+ "FeeCode": "A58",
+ "FeeDescription": null,
+ "FeeVersion": "1"
+ }
+ }
+ ],
"PaymentReference": null,
- "PaymentTotal": null
+ "PaymentTotal": "0"
},
- "applicationPayments": [],
+ "applicationPayments": [
+ {
+ "id": "12",
+ "value": {
+ "amount": 183,
+ "channel": "online",
+ "created": "2021-11-02T02:50:12.208Z",
+ "feeCode": "A58",
+ "reference": "1234",
+ "status": "success",
+ "transactionId": "1234",
+ "updated": "2021-11-02T02:50:12.208Z"
+ }
+ }
+ ],
"applyingWith": "withSpouseOrCivilPartner",
"birthFatherAddress1": "BUCKINGHAM PALACE",
"birthFatherAddress2": "",
@@ -149,6 +173,11 @@
"birthMotherOccupation": "Teacher",
"birthMotherOtherNationalities": [],
"birthMotherStillAlive": "Yes",
+ "childLocalAuthority": "la",
+ "childLocalAuthorityEmail": "abc@gov.uk",
+ "childSocialWorkerEmail": "abc@gov.uk",
+ "childSocialWorkerName": "null",
+ "childSocialWorkerPhoneNumber": "1234567890",
"childrenAdditionalNationalities": [
{
"id": "3b81bf8b-96ad-4001-a5cf-66f2af99a79c",
@@ -178,17 +207,19 @@
"createdDate": null,
"dateChildMovedIn": "2021-10-12",
"dateSubmitted": null,
- "documentsGenerated": [
- ],
+ "documentsGenerated": [],
"documentsUploaded": [],
"dueDate": null,
"familyCourtEmailId": "adoptionproject@mailinator.com",
- "placementOrderCourt": "xyz",
"familyCourtName": "xyz",
"findFamilyCourt": "Yes",
"hasAnotherAdopAgencyOrLA": "No",
"hasSiblings": "Yes",
"hyphenatedCaseRef": "1234-5678-9012-3456",
+ "localAuthorityContactEmail": "agency1@email.co.uk",
+ "localAuthorityContactName": "contact name1",
+ "localAuthorityName": "laname",
+ "localAuthorityPhoneNumber": "01234567890",
"otherApplicantRelation": "",
"otherParentAddress1": "BUCKINGHAM PALACE",
"otherParentAddress2": "",
@@ -208,6 +239,7 @@
"otherParentOtherNationalities": [],
"otherParentStillAlive": "Yes",
"pcqId": "9c04ea3a-c614-4eac-8361-ac75fb59f9dc",
+ "placementOrderCourt": "xyz",
"placementOrders": [
{
"id": "6e59287f-a337-49ba-ae45-c1f8bfe72f25",
@@ -233,76 +265,39 @@
"selectedAdoptionAgencyId": "1646222614256",
"selectedPlacementOrderId": "1646222468418",
"selectedSiblingId": "1646222699254",
- "selectedSiblingRelation": "Sister",
"selectedSiblingPoType": "Adoption order",
+ "selectedSiblingRelation": "Sister",
"siblings": [
{
"id": "1646222663145",
"value": {
"siblingId": "1646222663145",
- "siblingRelation": "Brother",
- "siblingPoType": "Adoption order",
+ "siblingPlacementOtherType": "",
"siblingPoNumber": "1001",
- "siblingPlacementOtherType": ""
+ "siblingPoType": "Adoption order",
+ "siblingRelation": "Brother"
}
},
{
"id": "1646222699254",
"value": {
"siblingId": "1646222699254",
- "siblingRelation": "Sister",
- "siblingPoType": "Other",
+ "siblingPlacementOtherType": "other type",
"siblingPoNumber": "23456",
- "siblingPlacementOtherType": "other type"
- }
- }
- ],
- "applicationPayments": [
- {
- "id": "12",
- "value": {
- "created": "2021-11-02T02:50:12.208Z",
- "updated": "2021-11-02T02:50:12.208Z",
- "feeCode": "A58",
- "amount": 183,
- "status": "success",
- "channel": "online",
- "reference": "1234",
- "transactionId": "1234"
+ "siblingPoType": "Other",
+ "siblingRelation": "Sister"
}
}
],
- "applicationFeeOrderSummary": {
- "PaymentTotal": "0",
- "PaymentReference": null,
- "Fees": [
- {
- "value": {
- "FeeAmount": "1234",
- "FeeCode": "A58",
- "FeeDescription":null,
- "FeeVersion": "1"
- }
- }
- ]
- },
- "childLocalAuthority": "la",
- "childLocalAuthorityEmail": "abc@gov.uk",
- "childSocialWorkerEmail": "abc@gov.uk",
- "childSocialWorkerName": "null",
- "childSocialWorkerPhoneNumber": "1234567890",
- "applicantLocalAuthority": null,
- "applicantLocalAuthorityEmail": null,
- "applicantSocialWorkerEmail": null,
- "applicantSocialWorkerName": null,
- "applicantSocialWorkerPhoneNumber": null,
"solicitorEmail": null,
"solicitorFirm": null,
"solicitorHelpingWithApplication": null,
"solicitorName": null,
"solicitorPhoneNumber": null
},
- "errors": ["Payment incomplete"],
+ "errors": [
+ "Payment incomplete"
+ ],
"state": null,
"warnings": null
}