Skip to content

Commit

Permalink
DTSPB-4293 Added Ad Colligenda Bona case type changes (#2882)
Browse files Browse the repository at this point in the history
* DTSPB-4293 Added Ad Colligenda Bona case type changes

* DTSPB-4293 Added validation for Ad Colligenda case type selection

* DTSPB-4293 Fix checkstyle

* DTSPB-4293 Fix error message

* Revert "DTSPB-4293 Fix error message"

This reverts commit 3df1c68.

* DTSPB-4293 Added logs

* DTSPB-4293 changed path

* DTSPB-4293 Fix FT

* DTSPB-4293 Fix FT

* DTSPB-4293 Fix Sonar issue

* DTSPB-4293 Fix FT

* DTSPB-4293 Fix FT

* DTSPB-4293 Fix FT

* DTSPB-4293 Removed logs

* DTSPB-4293 Addressing review comments

* DTSPB-4293 Revert local commit

* DTSPB-4293 Fix Checkstyle and test

* DTSPB-4293 Fix FT

* DTSPB-4293 Merge error

* DTSPB-4293 Merge error

* DTSPB-4293 Merge error

* DTSPB-4293 Merge error

* DTSPB-4293 Remove draft documents when generating Grant documents

* DTSPB-4293 Check style

* DTSPB-4293 Commons version

* DTSPB-4293 chnaged the label

* DTSPB-4293 Fixed Functional test
  • Loading branch information
IswaryaPepakayala authored Jan 9, 2025
1 parent dae1dca commit 1bbf8e9
Show file tree
Hide file tree
Showing 44 changed files with 2,748 additions and 157 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def versions = [
lombok : '1.18.36',
mapStruct : '1.2.0.Final',
pact_version : '4.1.34',
probateCommonsVersion : '2.0.31',
probateCommonsVersion : '2.0.33',
probatePactCommonsVersion : '1.0.2',
restAssured : '5.5.0',
serenity : '4.2.9',
Expand Down
9 changes: 9 additions & 0 deletions ccdImports/configFiles/CCD_Probate_Backoffice/FixedLists.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,28 +112,36 @@
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "intestacyGrantDraft", "ListElement": "Intestacy Grant Draft"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "admonWillGrant", "ListElement": "Admon Will Grant"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "admonWillGrantDraft", "ListElement": "Admon Will Grant Draft"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "adColligendaBonaGrant", "ListElement": "Ad Colligenda Bona Grant"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "adColligendaBonaGrantDraft", "ListElement": "Ad Colligenda Bona Grant Draft"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "caveatStopped", "ListElement": "caveat Stopped"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "grantCoversheet", "ListElement": "Cover Sheet"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "grantCover", "ListElement": "Grant Cover Sheet"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "grantRaised", "ListElement": "Grant Raised"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "digitalGrantReissueDraft", "ListElement": "Digital Grant Reissue Draft"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "intestacyGrantReissueDraft", "ListElement": "Intestacy Grant Reissue Draft"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "admonWillGrantReissueDraft", "ListElement": "Admon Will Grant Reissue Draft"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "adColligendaBonaGrantReissueDraft", "ListElement": "Ad Colligenda Bona Grant Reissue Draft"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "digitalGrantReissue", "ListElement": "Digital Grant Reissue"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "intestacyGrantReissue", "ListElement": "Intestacy Grant Reissue"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "admonWillGrantReissue", "ListElement": "Admon Will Grant Reissue"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "adColligendaBonaGrantReissue", "ListElement": "Ad Colligenda Bona Grant Reissue"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshDigitalGrant", "ListElement": "Welsh Digital Grant"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshDigitalGrantDraft", "ListElement": "Welsh Digital Grant Draft"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshIntestacyGrant", "ListElement": "Welsh Intestacy Grant"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshIntestacyGrantDraft", "ListElement": "Welsh Intestacy Grant Draft"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshAdmonWillGrant", "ListElement": "Welsh Admon Will Grant"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshAdmonWillGrantDraft", "ListElement": "Welsh Admon Will Grant Draft"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshAdColligendaBonaGrant", "ListElement": "Welsh Ad Colligenda Bona Grant"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshAdColligendaBonaGrantDraft", "ListElement": "Welsh Ad Colligenda Bona Grant Draft"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshDigitalGrantReissueDraft", "ListElement": "Welsh Digital Grant Reissue Draft"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshIntestacyGrantReissueDraft", "ListElement": "Welsh Intestacy Grant Reissue Draft"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshAdmonWillGrantReissueDraft", "ListElement": "Welsh Admon Will Grant Reissue Draft"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshAdColligendaBonaGrantReissueDraft", "ListElement": "Welsh Ad Colligenda Bona Grant Reissue Draft"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshDigitalGrantReissue", "ListElement": "Welsh Digital Grant Reissue"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshIntestacyGrantReissue", "ListElement": "Welsh Intestacy Grant Reissue"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshAdmonWillGrantReissue", "ListElement": "Welsh Admon Will Grant Reissue"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshAdColligendaBonaGrantReissue", "ListElement": "Welsh Ad Colligenda Bona Grant Reissue"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "sotInformationRequest", "ListElement": "Legal Statement Information Request"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "statementOfTruth", "ListElement": "Legal Statement"},
{"LiveFrom": "01/01/2017", "ID": "probateDocumentTypeEnum", "ListElementCode": "welshStatementOfTruth", "ListElement": "Legal Statement"},
Expand Down Expand Up @@ -204,6 +212,7 @@
{"LiveFrom": "06/01/2017", "ID": "caseTypeFixedList", "ListElementCode": "intestacy", "ListElement": "Intestacy"},
{"LiveFrom": "06/01/2017", "ID": "caseTypeFixedList", "ListElementCode": "admonWill", "ListElement": "Admon Will"},
{"LiveFrom": "06/01/2017", "ID": "caseTypeFixedList", "ListElementCode": "edgeCase", "ListElement": "Edge Case"},
{"LiveFrom": "06/01/2017", "ID": "caseTypeFixedList", "ListElementCode": "adColligendaBona", "ListElement": "Ad Colligenda Bona"},
{"LiveFrom": "06/01/2017", "ID": "paperPaymentMethodFixedList", "ListElementCode": "debitOrCredit", "ListElement": "Debit or Credit card"},
{"LiveFrom": "06/01/2017", "ID": "paperPaymentMethodFixedList", "ListElementCode": "cheque", "ListElement": "Cheque or Postal order"},
{"LiveFrom": "06/01/2017", "ID": "paperPaymentMethodFixedList", "ListElementCode": "cash", "ListElement": "Cash"},
Expand Down
38 changes: 26 additions & 12 deletions src/contractTest/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,21 @@ docmosis:
grantCoversheet:
templateName: FL-PRB-GNO-ENG-00024.docx
digitalGrantReissueDraft:
templateName: FL-PRB-GRP-ENG-01294.doc
templateName: FL-PRB-GRP-ENG-01295.doc
intestacyGrantReissueDraft:
templateName: FL-PRB-GRP-ENG-01294.doc
templateName: FL-PRB-GRP-ENG-01295.doc
admonWillGrantReissueDraft:
templateName: FL-PRB-GRP-ENG-01294.doc
templateName: FL-PRB-GRP-ENG-01295.doc
adColligendaBonaGrantReissueDraft:
templateName: FL-PRB-GRP-ENG-01295.doc
digitalGrantReissue:
templateName: FL-PRB-GRP-ENG-01294.doc
templateName: FL-PRB-GRP-ENG-01295.doc
intestacyGrantReissue:
templateName: FL-PRB-GRP-ENG-01294.doc
templateName: FL-PRB-GRP-ENG-01295.doc
admonWillGrantReissue:
templateName: FL-PRB-GRP-ENG-01294.doc
templateName: FL-PRB-GRP-ENG-01295.doc
adColligendaBonaGrantReissue:
templateName: FL-PRB-GRP-ENG-01295.doc
sotInformationRequest:
templateName: FL-PRB-GNO-ENG-00085.doc
sentEmail:
Expand All @@ -88,17 +92,21 @@ docmosis:
assembledLetter:
templateName: FL-PRB-GNO-ENG-00133.docx
welshDigitalGrant:
templateName: FL-PRB-GRP-WEL-00235.doc
templateName: FL-PRB-GRP-WEL-00236.doc
welshIntestacyGrant:
templateName: FL-PRB-GRP-WEL-00235.doc
templateName: FL-PRB-GRP-WEL-00236.doc
welshAdmonWillGrant:
templateName: FL-PRB-GRP-WEL-00235.doc
templateName: FL-PRB-GRP-WEL-00236.doc
welshAdColligendaBonaGrant:
templateName: FL-PRB-GRP-WEL-00236.doc
welshDigitalGrantDraft:
templateName: FL-PRB-GRP-WEL-00235.doc
templateName: FL-PRB-GRP-WEL-00236.doc
welshIntestacyGrantDraft:
templateName: FL-PRB-GRP-WEL-00235.doc
templateName: FL-PRB-GRP-WEL-00236.doc
welshAdmonWillGrantDraft:
templateName: FL-PRB-GRP-WEL-00235.doc
templateName: FL-PRB-GRP-WEL-00236.doc
welshAdColligendaBonaGrantDraft:
templateName: FL-PRB-GRP-WEL-00236.doc

fee.api:
url: http://localhost:4411
Expand Down Expand Up @@ -314,30 +322,36 @@ documents:
intestacy: INTESTACY_GRANT_REISSUE
admonWill: ADMON_WILL_GRANT_REISSUE
gop: DIGITAL_GRANT_REISSUE
adColligendaBona: AD_COLLIGENDA_BONA_GRANT_REISSUE
grant:
intestacy: INTESTACY_GRANT
admonWill: ADMON_WILL_GRANT
gop: DIGITAL_GRANT
adColligendaBona: AD_COLLIGENDA_BONA_GRANT
preview:
reissue:
intestacy: INTESTACY_GRANT_REISSUE_DRAFT
admonWill: ADMON_WILL_GRANT_REISSUE_DRAFT
gop: DIGITAL_GRANT_REISSUE_DRAFT
adColligendaBona: AD_COLLIGENDA_BONA_GRANT_REISSUE_DRAFT
grant:
intestacy: INTESTACY_GRANT_DRAFT
admonWill: ADMON_WILL_GRANT_DRAFT
gop: DIGITAL_GRANT_DRAFT
adColligendaBona: AD_COLLIGENDA_BONA_GRANT_DRAFT
welsh:
final:
grant:
intestacy: WELSH_INTESTACY_GRANT
admonWill: WELSH_ADMON_WILL_GRANT
gop: WELSH_DIGITAL_GRANT
adColligendaBona: WELSH_AD_COLLIGENDA_BONA_GRANT
preview:
grant:
intestacy: WELSH_INTESTACY_GRANT_DRAFT
admonWill: WELSH_ADMON_WILL_GRANT_DRAFT
gop: WELSH_DIGITAL_GRANT_DRAFT
adColligendaBona: WELSH_AD_COLLIGENDA_BONA_GRANT_DRAFT

registry:
registries:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ public class GrantGenerationTests extends DocumentGenerationTestBase {
public static final String ADMON_WILL_REISSUE_JSON = "admonWillReissue.json";
public static final String INTESTACY_JSON = "intestacy.json";
public static final String INTESTACY_REISSUE_JSON = "intestacyReissue.json";
public static final String AD_COLLIGENDA_JSON = "adColligenda.json";
public static final String AD_COLLIGENDA_REISSUE_JSON = "adColligendaReissue.json";
public static final String NOVEMBER_2020 = "18th November 2020";
public static final String PROBATE_PRACTITIONER_123_LONDON_LONDON = "Probate Practitioner 123 London London";
public static final String MORE_PARTNERS_HOLDING_POWER_RESERVED_NO = "\"morePartnersHoldingPowerReserved\": \"No\"";
Expand Down Expand Up @@ -138,10 +140,15 @@ public class GrantGenerationTests extends DocumentGenerationTestBase {
"solicitorPayloadTrustCorpsNotNamedPowerReserved.json";
private static final String PARTNERS_FIRM_POWER_RESERVED_PAYLOAD =
"solicitorPayloadTrustCorpsPartnersInFirmPowerReserved.json";
private static final String AD_COLLIGENDA_PAYLOAD =
"solicitorPayloadNotificationsAdColligendaBona.json";
private static final String FRAGMENT_WITH_NO_MULTIPLE_ANDS =
"ExecutorsSmithof MyTc 19 Curtis Street Charlton Kings Swindon Glos Sn2 2JU United Kingdom of and "
+ "Fred FlintstoneApplying 7 Ashley Avenue Burnham-on-Sea Somerset SN15JU United Kingdom"
+ "The application has stated that the gross value";
private static final String AD_COLLIGENDA_GRANT_TEXT = "This is an Ad Colligenda Bona grant and is limited for the "
+ "purposes only of collecting getting in and receiving the estate and doing such acts as may be necessary "
+ "for the preservation of the same in particular, to deal with issues and if necessary to sell";

@Test
void verifySolicitorGenerateGrantShouldReturnOkResponseCode() throws IOException {
Expand All @@ -163,6 +170,15 @@ void verifySolicitorGenerateIntestacyGrantDraftShouldReturnOkResponseCode() thro
validatePostSuccess("solicitorPayloadNotificationsIntestacy.json", GENERATE_GRANT_DRAFT);
}

@Test
void verifySolicitorGenerateAdColligendaBonaGrantShouldReturnOkResponseCode() throws IOException {
validatePostSuccess(AD_COLLIGENDA_PAYLOAD, GENERATE_GRANT);
}

@Test
void verifySolicitorGenerateAdColligendaBonaGrantDraftShouldReturnOkResponseCode() throws IOException {
validatePostSuccess(AD_COLLIGENDA_PAYLOAD, GENERATE_GRANT_DRAFT);
}

@Test
void verifySolicitorGenerateAdmonWillGrantShouldReturnOkResponseCode() throws IOException {
Expand Down Expand Up @@ -438,6 +454,49 @@ void verifyGenerateAllEnglishIntestacySolicitorGrantTypesWhenDeceasedDomiciledNo
assertTrue(response.contains(expectedText));
}

@Test
void verifyGenerateAllEnglishAdColligendaPersonalGrantTypeDraft() throws IOException {
String adColligendaPayload = "/default/adColligenda/personal/";
String response = generateGrantDocument(adColligendaPayload + AD_COLLIGENDA_JSON,
GENERATE_GRANT_DRAFT);
assertTrue("Draft grant document does not contain expected text.",
response.contains(AD_COLLIGENDA_GRANT_TEXT));
}

@Test
void verifyGenerateAllEnglishAdColligendaPersonalGrantType() throws IOException {
String adColligendaPayload = "/default/adColligenda/personal/";
String response = generateGrantDocument(adColligendaPayload + AD_COLLIGENDA_JSON, GENERATE_GRANT);
assertTrue("Grant document does not contain expected text.",
response.contains(AD_COLLIGENDA_GRANT_TEXT));
}

@Test
void verifyGenerateAllEnglishAdColligendaPersonalGrantTypeReissue() throws IOException {
String adColligendaPayload = "/default/adColligenda/personal/";
String response = generateGrantDocument(adColligendaPayload + AD_COLLIGENDA_REISSUE_JSON,
GENERATE_GRANT_REISSUE);
assertTrue("Reissue grant document does not contain expected text.",
response.contains(AD_COLLIGENDA_GRANT_TEXT));
}

@Test
void verifyGenerateAllEnglishAdColligendaSolicitorGrantTypes()
throws IOException {
String adColligendaPayload = "/default/adColligenda/solicitor/";

String response = generateGrantDocument(adColligendaPayload + AD_COLLIGENDA_JSON,
GENERATE_GRANT_DRAFT);
assertTrue(response.contains(AD_COLLIGENDA_GRANT_TEXT));

response = generateGrantDocument(adColligendaPayload + AD_COLLIGENDA_JSON, GENERATE_GRANT);
assertTrue(response.contains(AD_COLLIGENDA_GRANT_TEXT));

response = generateGrantDocument(adColligendaPayload + AD_COLLIGENDA_REISSUE_JSON,
GENERATE_GRANT_REISSUE);
assertTrue(response.contains(AD_COLLIGENDA_GRANT_TEXT));
}

@Test
void verifyTrustCorpsShouldReturnOkResponseCode() throws IOException {
validatePostSuccess(TRUST_CORPS_GOP_PAYLOAD, GENERATE_GRANT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ void verifyPersonalGenerateWelshGrantIntestacy() throws IOException {
"expectedDocumentGrantIntestacyWelsh.txt");
}

@Test
void verifyPersonalGenerateWelshGrantAdColligenda() throws IOException {
verifyPersonalWelshGrantText("personalPayloadGrantAdColligendaWelsh.json",
"expectedDocumentGrantAdColligendaWelsh.txt");
}

private void verifyPersonalWelshGrantText(String payload, String expectedFile) throws IOException {
final String response = getFirstProbateDocumentsText(payload, GENERATE_GRANT);

Expand Down
Loading

0 comments on commit 1bbf8e9

Please sign in to comment.