Repository: companieshouse/limited-partnerships-web
Pull request #280: LP-710 General partner person correspondence address  manual entry
Author: login: mwestacott
Created: 2025-04-14T13:16:31Z | Merged: 2025-04-15T07:19:16Z

### JIRA link

https://companieshouse.atlassian.net/browse/LP-710

### Change description

* Added page for GP Person manual entry of correspondence address
* Routings changed
* Tests added
* AC1 not done as Confirmation page does not yet exist (TODO comments added to code)

### Work checklist

- [X] Tests added where applicable
- [ ] UI changes look good on mobile
- [ ] UI changes meet accessibility criteria

### Merge instructions

We are committed to keeping commit history clean, consistent and linear. To achieve this commit should be structured as follows:

```
<type>[optional scope]: <description>
```

and contain the following structural elements:

- fix: a commit that patches a bug in your codebase (this correlates with PATCH in semantic versioning),
- feat: a commit that introduces a new feature to the codebase (this correlates with MINOR in semantic versioning),
- BREAKING CHANGE: a commit that has a footer `BREAKING CHANGE:` introduces a breaking API change (correlating with MAJOR in semantic versioning). A BREAKING CHANGE can be part of commits of any type,
- types other than `fix:` and `feat:` are allowed, for example `build:`, `chore:`, `ci:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others,
- footers other than `BREAKING CHANGE: <description>` may be provided.


Diff:
diff --git a/locales/cy/translations.json b/locales/cy/translations.json
index 8e3fc417e..a5bf16e2f 100644
--- a/locales/cy/translations.json
+++ b/locales/cy/translations.json
@@ -133,6 +133,12 @@
                 "postcodeOptional": "WELSH - Postcode (optional)"
 
             },
+            "correspondenceAddress":{
+                "title": "WELSH - What is the general partner's correspondence address",
+                "titleHint1": "WELSH - This is also known as the service address.",
+                "publicInformationLine1": "WELSH - We'll show the general partner's correspondence address on the public register.",
+                "postcodeOptional": "WELSH - Postcode (optional)"
+            },
             "principalOfficeAddress": {
                 "title": "WELSH - What is the general partner's principal office address?",
                 "publicInformationLine1": "WELSH - We'll show the general partner's principal office address on the public register.",
diff --git a/locales/en/translations.json b/locales/en/translations.json
index 97335e38c..373743ab6 100644
--- a/locales/en/translations.json
+++ b/locales/en/translations.json
@@ -132,6 +132,12 @@
                 "publicInformationLine1": "We will not show the general partner's usual residential address.",
                 "postcodeOptional": "Postcode (optional)"
             },
+            "correspondenceAddress":{
+                "title": "What is the general partner's correspondence address",
+                "titleHint1": "This is also known as the service address.",
+                "publicInformationLine1": "We'll show the general partner's correspondence address on the public register.",
+                "postcodeOptional": "Postcode (optional)"
+            },
             "principalOfficeAddress": {
                 "title": "What is the general partner's principal office address?",
                 "publicInformationLine1": "We'll show the general partner's principal office address on the public register.",
diff --git a/src/presentation/controller/addressLookUp/Controller.ts b/src/presentation/controller/addressLookUp/Controller.ts
index 313ffaa33..92e33ff9e 100644
--- a/src/presentation/controller/addressLookUp/Controller.ts
+++ b/src/presentation/controller/addressLookUp/Controller.ts
@@ -214,11 +214,12 @@ class AddressLookUpController extends AbstractController {
 
         const pageRouting = super.getRouting(addressLookUpRouting, pageType, request);
 
-        const isURAorPOA =
+        const isGeneralPartnerAddress =
           pageType === AddressLookUpPageType.enterGeneralPartnerUsualResidentialAddress ||
+          pageType === AddressLookUpPageType.enterGeneralPartnerCorrespondenceAddress ||
           pageType === AddressLookUpPageType.enterGeneralPartnerPrincipalOfficeAddress;
 
-        const errors = isURAorPOA
+        const errors = isGeneralPartnerAddress
           ? null
           : this.addressService.isValidJurisdictionAndCountry(limitedPartnership?.data?.jurisdiction ?? "", country);
 
diff --git a/src/presentation/controller/addressLookUp/Routing.ts b/src/presentation/controller/addressLookUp/Routing.ts
index b98d5df63..052944d38 100644
--- a/src/presentation/controller/addressLookUp/Routing.ts
+++ b/src/presentation/controller/addressLookUp/Routing.ts
@@ -224,7 +224,8 @@ const addressRoutingPostcodeGeneralPartnerCorrespondenceAddress = {
   nextUrl: url.CHOOSE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
   pageType: AddressPageType.postcodeGeneralPartnerCorrespondenceAddress,
   data: {
-    ...correspondenceAddressCacheKeys
+    ...correspondenceAddressCacheKeys,
+    enterManualAddressPageType: AddressPageType.enterGeneralPartnerCorrespondenceAddress
   }
 };
 
@@ -239,10 +240,21 @@ const addressRoutingChooseGeneralPartnerCorrespondenceAddress = {
   }
 };
 
+const addressRoutingEnterGeneralPartnerCorrespondenceAddress = {
+  previousUrl: url.POSTCODE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  currentUrl: url.ENTER_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  nextUrl: url.CONFIRM_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  pageType: AddressPageType.enterGeneralPartnerCorrespondenceAddress,
+  data: {
+    ...correspondenceAddressCacheKeys
+  }
+};
+
 const correspondenceAddress = [
   addressRoutingTerritoryChoiceGeneralPartnerCorrespondanceAddress,
   addressRoutingPostcodeGeneralPartnerCorrespondenceAddress,
-  addressRoutingChooseGeneralPartnerCorrespondenceAddress
+  addressRoutingChooseGeneralPartnerCorrespondenceAddress,
+  addressRoutingEnterGeneralPartnerCorrespondenceAddress
 ];
 
 // principal office address - legal entity
diff --git a/src/presentation/test/integration/registration/address/enter-principal-place-of-business-address.test.ts b/src/presentation/test/integration/registration/address/enter-principal-place-of-business-address.test.ts
index 04cb8f690..f17dba7ac 100644
--- a/src/presentation/test/integration/registration/address/enter-principal-place-of-business-address.test.ts
+++ b/src/presentation/test/integration/registration/address/enter-principal-place-of-business-address.test.ts
@@ -32,6 +32,7 @@ describe("Enter Principal Place Of Business Manual Address Page", () => {
       testTranslations(res.text, enTranslationText.address.enterAddress, [
         "registeredOfficeAddress",
         "usualResidentialAddress",
+        "correspondenceAddress",
         "jurisdictionCountry",
         "principalOfficeAddress"
       ]);
@@ -47,6 +48,7 @@ describe("Enter Principal Place Of Business Manual Address Page", () => {
       testTranslations(res.text, cyTranslationText.address.enterAddress, [
         "registeredOfficeAddress",
         "usualResidentialAddress",
+        "correspondenceAddress",
         "jurisdictionCountry",
         "principalOfficeAddress"
       ]);
diff --git a/src/presentation/test/integration/registration/address/enter-registered-office-address.test.ts b/src/presentation/test/integration/registration/address/enter-registered-office-address.test.ts
index 5ffe2b18d..6f2d7c693 100644
--- a/src/presentation/test/integration/registration/address/enter-registered-office-address.test.ts
+++ b/src/presentation/test/integration/registration/address/enter-registered-office-address.test.ts
@@ -32,6 +32,7 @@ describe("Enter Registered Office Address Page", () => {
       testTranslations(res.text, enTranslationText.address.enterAddress, [
         "jurisdictionCountry",
         "usualResidentialAddress",
+        "correspondenceAddress",
         "principalPlaceOfBusinessAddress",
         "principalOfficeAddress"
       ]);
@@ -47,6 +48,7 @@ describe("Enter Registered Office Address Page", () => {
       testTranslations(res.text, cyTranslationText.address.enterAddress, [
         "jurisdictionCountry",
         "usualResidentialAddress",
+        "correspondenceAddress",
         "principalPlaceOfBusinessAddress",
         "principalOfficeAddress"
       ]);
diff --git a/src/presentation/test/integration/registration/generalPartner/address/enter-general-partner-correspondence-address.test.ts b/src/presentation/test/integration/registration/generalPartner/address/enter-general-partner-correspondence-address.test.ts
new file mode 100644
index 000000000..e87d62257
--- /dev/null
+++ b/src/presentation/test/integration/registration/generalPartner/address/enter-general-partner-correspondence-address.test.ts
@@ -0,0 +1,230 @@
+import request from "supertest";
+
+import enTranslationText from "../../../../../../../locales/en/translations.json";
+import cyTranslationText from "../../../../../../../locales/cy/translations.json";
+
+import app from "../../../app";
+
+import * as config from "config";
+import {
+  CONFIRM_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  ENTER_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  POSTCODE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  TERRITORY_CHOICE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL
+} from "../../../../../controller/addressLookUp/url";
+import { getUrl, setLocalesEnabled, testTranslations } from "../../../../utils";
+import AddressPageType from "../../../../../controller/addressLookUp/PageType";
+import { appDevDependencies } from "../../../../../../config/dev-dependencies";
+import GeneralPartnerBuilder, {
+  generalPartnerLegalEntity,
+  generalPartnerPerson
+} from "../../../../builder/GeneralPartnerBuilder";
+import { ApiErrors } from "../../../../../../domain/entities/UIErrors";
+
+describe("Enter Correspondence Address Page", () => {
+  const URL = getUrl(ENTER_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL);
+  const redirectUrl = getUrl(CONFIRM_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL);
+
+  beforeEach(() => {
+    setLocalesEnabled(false);
+
+    appDevDependencies.cacheRepository.feedCache(null);
+    appDevDependencies.generalPartnerGateway.feedGeneralPartners([]);
+  });
+
+  describe("GET Enter general partners correspondence address", () => {
+    it("should load enter general partners correspondence address page with english text", async () => {
+      setLocalesEnabled(true);
+      const generalPartner = new GeneralPartnerBuilder()
+        .withId(appDevDependencies.generalPartnerGateway.generalPartnerId)
+        .isPerson()
+        .build();
+
+      appDevDependencies.generalPartnerGateway.feedGeneralPartners([generalPartner]);
+
+      const res = await request(app).get(URL + "?lang=en");
+
+      expect(res.status).toBe(200);
+      testTranslations(res.text, enTranslationText.address.enterAddress, [
+        "registeredOfficeAddress",
+        "principalPlaceOfBusinessAddress",
+        "jurisdictionCountry",
+        "postcodeMissing",
+        "postcodeLength",
+        "usualResidentialAddress",
+        "principalOfficeAddress",
+        "postcodeOptional"
+      ]);
+      expect(res.text).not.toContain("WELSH -");
+      expect(res.text).toContain(generalPartnerPerson.forename?.toUpperCase());
+      expect(res.text).toContain(generalPartnerPerson.surname?.toUpperCase());
+      expect(res.text).not.toContain(generalPartnerLegalEntity.legal_entity_name?.toUpperCase());
+    });
+
+    it("should load enter general partners correspondence address manual entry page with welsh text", async () => {
+      setLocalesEnabled(true);
+
+      const generalPartner = new GeneralPartnerBuilder()
+        .withId(appDevDependencies.generalPartnerGateway.generalPartnerId)
+        .isPerson()
+        .build();
+
+      appDevDependencies.generalPartnerGateway.feedGeneralPartners([generalPartner]);
+      appDevDependencies.cacheRepository.feedCache({
+        [appDevDependencies.transactionGateway.transactionId]: {
+          ca_territory_choice: "overseas"
+        }
+      });
+
+      const res = await request(app).get(URL + "?lang=cy");
+
+      expect(res.status).toBe(200);
+      testTranslations(res.text, cyTranslationText.address.enterAddress, [
+        "registeredOfficeAddress",
+        "principalPlaceOfBusinessAddress",
+        "jurisdictionCountry",
+        "postcodeMissing",
+        "postcodeLength",
+        "postcode",
+        "usualResidentialAddress",
+        "principalOfficeAddress"
+      ]);
+
+      expect(res.text).toContain(generalPartnerPerson.forename?.toUpperCase());
+      expect(res.text).toContain(generalPartnerPerson.surname?.toUpperCase());
+      expect(res.text).not.toContain(generalPartnerLegalEntity.legal_entity_name?.toUpperCase());
+    });
+
+    it("should load enter general partners correspondence address manual entry page with overseas back link", async () => {
+      appDevDependencies.cacheRepository.feedCache({
+        [appDevDependencies.transactionGateway.transactionId]: {
+          ca_territory_choice: "overseas"
+        }
+      });
+
+      const backLinkUrl = getUrl(TERRITORY_CHOICE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL);
+
+      const res = await request(app).get(URL);
+      expect(res.status).toBe(200);
+
+      expect(res.text).toContain(backLinkUrl);
+    });
+
+    it("should load enter general partners correspondence address manual entry page with postcode lookup back link", async () => {
+      appDevDependencies.cacheRepository.feedCache({
+        [appDevDependencies.transactionGateway.transactionId]: {
+          ca_territory_choice: "unitedKingdom"
+        }
+      });
+      const backLinkUrl = getUrl(POSTCODE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL);
+      const res = await request(app).get(URL);
+      expect(res.status).toBe(200);
+
+      expect(res.text).toContain(backLinkUrl);
+    });
+  });
+
+  describe("POST Enter general partners correspondence address Page", () => {
+    it("should redirect and add entered address to the cache", async () => {
+      appDevDependencies.addressLookUpGateway.setError(false);
+      appDevDependencies.cacheRepository.feedCache({
+        [appDevDependencies.transactionGateway.transactionId]: {
+          ["correspondence_address"]: {
+            address_line_1: "",
+            address_line_2: "",
+            country: "",
+            locality: "",
+            postal_code: "",
+            premises: "",
+            region: ""
+          }
+        }
+      });
+      const res = await request(app).post(URL).send({
+        pageType: AddressPageType.enterGeneralPartnerCorrespondenceAddress,
+        postal_code: "",
+        premises: "4",
+        address_line_1: "DUNCALF STREET",
+        address_line_2: "",
+        locality: "STOKE-ON-TRENT",
+        country: "England"
+      });
+
+      expect(res.status).toBe(302);
+      expect(res.text).toContain(`Redirecting to ${redirectUrl}`);
+
+      const cache = appDevDependencies.cacheRepository.cache;
+      expect(cache?.[`${config.APPLICATION_CACHE_KEY}`]).toEqual({
+        [appDevDependencies.transactionGateway.transactionId]: {
+          correspondence_address: {
+            postal_code: "",
+            premises: "4",
+            address_line_1: "DUNCALF STREET",
+            address_line_2: "",
+            locality: "STOKE-ON-TRENT",
+            country: "England",
+            region: undefined
+          }
+        }
+      });
+    });
+
+    it("should redirect to the confirm general partners correspondence address page", async () => {
+      const generalPartner = new GeneralPartnerBuilder()
+        .withId(appDevDependencies.generalPartnerGateway.generalPartnerId)
+        .isPerson()
+        .build();
+
+      appDevDependencies.generalPartnerGateway.feedGeneralPartners([generalPartner]);
+
+      const res = await request(app).post(URL).send({
+        pageType: AddressPageType.enterGeneralPartnerCorrespondenceAddress,
+        addressLine1: "Mill Street"
+      });
+
+      expect(res.status).toBe(302);
+      expect(res.text).toContain(`Redirecting to ${redirectUrl}`);
+    });
+
+    it("should redirect to the error page when error occurs during Post", async () => {
+      const generalPartner = new GeneralPartnerBuilder()
+        .withId(appDevDependencies.generalPartnerGateway.generalPartnerId)
+        .isPerson()
+        .build();
+
+      appDevDependencies.generalPartnerGateway.feedGeneralPartners([generalPartner]);
+
+      const res = await request(app).post(URL).send({
+        pageType: "Invalid page type",
+        country: ""
+      });
+
+      expect(res.status).toBe(500);
+      expect(res.text).toContain(enTranslationText.errorPage.title);
+    });
+
+    it("should redirect if postcode is null", async () => {
+      const generalPartner = new GeneralPartnerBuilder()
+        .withId(appDevDependencies.generalPartnerGateway.generalPartnerId)
+        .build();
+
+      appDevDependencies.generalPartnerGateway.feedGeneralPartners([generalPartner]);
+
+      const apiErrors: ApiErrors = {
+        errors: {
+          "correspondenceAddress.postalCode": "must not be null"
+        }
+      };
+
+      appDevDependencies.generalPartnerGateway.feedErrors(apiErrors);
+
+      const res = await request(app).post(URL).send({
+        pageType: AddressPageType.confirmGeneralPartnerCorrespondenceAddress,
+        address: `{"postal_code": "","premises": "4","address_line_1": "DUNCALF STREET","address_line_2": "","locality": "STOKE-ON-TRENT","country": "England"}`
+      });
+
+      expect(res.status).toBe(302);
+      expect(res.text).not.toContain("must not be null");
+    });
+  });
+});
diff --git a/src/presentation/test/integration/registration/generalPartner/address/enter-general-partner-principal-office-address.test.ts b/src/presentation/test/integration/registration/generalPartner/address/enter-general-partner-principal-office-address.test.ts
index a6bef1387..b57a6a3f8 100644
--- a/src/presentation/test/integration/registration/generalPartner/address/enter-general-partner-principal-office-address.test.ts
+++ b/src/presentation/test/integration/registration/generalPartner/address/enter-general-partner-principal-office-address.test.ts
@@ -41,6 +41,7 @@ describe("Enter general partner's principal office manual address page", () => {
         "postcodeMissing",
         "postcodeLength",
         "usualResidentialAddress",
+        "correspondenceAddress",
         "principalOfficeAddress"
       ]);
       expect(res.text).not.toContain("WELSH -");
@@ -68,6 +69,7 @@ describe("Enter general partner's principal office manual address page", () => {
         "postcodeMissing",
         "postcodeLength",
         "usualResidentialAddress",
+        "correspondenceAddress",
         "principalOfficeAddress"
       ]);
       expect(res.text).toContain("WELSH -");
diff --git a/src/presentation/test/integration/registration/generalPartner/address/enter-general-partner-usual-residential-address.test.ts b/src/presentation/test/integration/registration/generalPartner/address/enter-general-partner-usual-residential-address.test.ts
index 49ccb68db..70230954b 100644
--- a/src/presentation/test/integration/registration/generalPartner/address/enter-general-partner-usual-residential-address.test.ts
+++ b/src/presentation/test/integration/registration/generalPartner/address/enter-general-partner-usual-residential-address.test.ts
@@ -51,6 +51,7 @@ describe("Enter Usual Residential Address Page", () => {
         "jurisdictionCountry",
         "postcodeMissing",
         "postcodeLength",
+        "correspondenceAddress",
         "principalOfficeAddress",
         "postcodeOptional"
       ]);
@@ -85,6 +86,7 @@ describe("Enter Usual Residential Address Page", () => {
         "postcodeMissing",
         "postcodeLength",
         "postcode",
+        "correspondenceAddress",
         "principalOfficeAddress"
       ]);
 
diff --git a/src/routes/addressLookUp.ts b/src/routes/addressLookUp.ts
index 1eb0fcd5f..4f4686415 100644
--- a/src/routes/addressLookUp.ts
+++ b/src/routes/addressLookUp.ts
@@ -187,6 +187,17 @@ export const addressLookUpEndpoints = (router: Router, dependencies: IDependenci
     dependencies.addressLookUpController.selectAddress()
   );
 
+  router.get(
+    url.ENTER_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+    authentication,
+    dependencies.addressLookUpController.getPageRouting()
+  );
+  router.post(
+    url.ENTER_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+    authentication,
+    dependencies.addressLookUpController.sendManualAddress()
+  );
+
   // principal office address
   router.get(
     url.TERRITORY_CHOICE_GENERAL_PARTNER_PRINCIPAL_OFFICE_ADDRESS_URL,
diff --git a/src/views/enter-general-partner-correspondence-address.njk b/src/views/enter-general-partner-correspondence-address.njk
new file mode 100644
index 000000000..fc1ce3c1b
--- /dev/null
+++ b/src/views/enter-general-partner-correspondence-address.njk
@@ -0,0 +1,89 @@
+{% extends "layout.njk" %}
+
+{% set correspondenceAddressKey = "correspondence_address" %}
+
+{% block backLink %}
+  {% set hrefValue = props.previousUrl %}
+
+  {% if props.data.cache.ca_territory_choice == "overseas" %}
+    {% set hrefValue = props.currentUrl | replace(props.pageType, "territory-choice-general-partner-correspondence-address") %}
+  {% endif %}
+
+  {{ govukBackLink({
+    text: "Back",
+    attributes: {
+      "data-event-id": "back-link"
+    },
+    href: hrefValue
+  }) }}
+{% endblock %}
+
+{% if props.data.address %}
+  {% set address = props.data.address %}
+{% elif props.data.cache[correspondenceAddressKey] %}
+  {% set address = props.data.cache[correspondenceAddressKey] %}
+{% elif props.data.limitedPartnership.data.service_address %}
+  {% set address = props.data.service_address %}
+{% else %}
+  {% set address = {} %}
+{% endif %}
+
+{% set pageTitle = i18n.address.enterAddress.correspondenceAddress.title %}
+{% set titleHint1 = i18n.address.enterAddress.correspondenceAddress.titleHint1 %}
+{% set publicRegisterInformationHeading = i18n.address.enterAddress.publicInformationTitle %}
+{% set publicRegisterInformationLine1 = i18n.address.enterAddress.correspondenceAddress.publicInformationLine1 %}
+
+{% block content %}
+  <div class="govuk-grid-row">
+    <div class="govuk-grid-column-two-thirds">
+      {% include "includes/general-partner-name.njk" %}
+
+      <fieldset class="govuk-fieldset">
+        <legend class="govuk-fieldset__legend govuk-fieldset__legend--s">
+            <h1 class="govuk-heading-xl">
+            {{ pageTitle }}
+            </h1>
+        </legend>
+
+        <p class="govuk-hint">{{ titleHint1 }}</p>
+      </fieldset>
+      
+      <form class="form" action={{ props.currentUrl }} method="post">
+        <input type="hidden" name="pageType" value={{ props.pageType }}>
+          {% include "includes/csrf_token.njk" %}
+          
+          {% if props.data.cache.ca_territory_choice == "overseas" %}
+            {% include "pages/address/enter-address-fields.njk" %}
+
+            {{ govukInput({
+              label: {
+                text: i18n.address.enterAddress.correspondenceAddress.postcodeOptional
+              },
+              classes: "govuk-input--width-10",
+              id: "postal_code",
+              name: "postal_code",
+              value: address.postal_code,
+              attributes: {
+                oninput: "validateLength(this, 15, '" + i18n.address.enterAddress.errorMessages.postcodeLength | escape + "');"
+              }
+            }) }}
+
+            {% set countryFormId = "country" %}
+            {% set countryFormName = "country" %}
+            {% set countryText = i18n.address.enterAddress.country %}
+            {% set countryFormValue = address.country %}
+            {% set countryField = address.country %}
+            {% set countryFont = "govuk-!-font-weight-regular"%}
+            {% include "includes/countries.njk" %}
+
+          {% else %}
+            {% include "pages/address/enter-address-common-fields.njk" %}
+          {% endif %}
+          
+          {% include "includes/public-register-information.njk" %}
+
+          {% include "includes/save-and-continue-button.njk" %}
+        </form>
+    </div>
+  </div> 
+{% endblock %}


Reviews:
user: login: markpit
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-14T13:52:11Z
user: login: markpit
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-14T13:53:49Z
user: login: markpit
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-14T13:54:16Z
user: login: markpit
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-14T13:55:20Z
user: login: markpit
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-14T13:56:56Z
user: login: markpit
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-14T13:58:31Z
user: login: mwestacott
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-14T14:46:47Z
user: login: markpit
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-14T15:22:42Z

Review comments:
diff_hunk: @@ -239,10 +240,18 @@ const addressRoutingChooseGeneralPartnerCorrespondenceAddress = {
   }
 };
 
+const addressRoutingEnterGeneralPartnerCorrespondenceAddress = {
+  previousUrl: url.POSTCODE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  currentUrl: url.ENTER_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  nextUrl: LIMITED_PARTNERS_URL, // TODO will be changed to confirm correspondence address (not ready)
path: src/presentation/controller/addressLookUp/Routing.ts
user: login: markpit
body: the next url can be added it is already present - CONFIRM_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL
created_at: 2025-04-14T13:52:11Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,231 @@
+import request from "supertest";
+
+import enTranslationText from "../../../../../../../locales/en/translations.json";
+import cyTranslationText from "../../../../../../../locales/cy/translations.json";
+
+import app from "../../../app";
+
+import {
+  // CONFIRM_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  ENTER_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  POSTCODE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  TERRITORY_CHOICE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL
+} from "../../../../../controller/addressLookUp/url";
+import { getUrl, setLocalesEnabled, testTranslations } from "../../../../utils";
+import AddressPageType from "../../../../../controller/addressLookUp/PageType";
+import { appDevDependencies } from "../../../../../../config/dev-dependencies";
+import GeneralPartnerBuilder, {
+  generalPartnerLegalEntity,
+  generalPartnerPerson
+} from "../../../../builder/GeneralPartnerBuilder";
+import { ApiErrors } from "../../../../../../domain/entities/UIErrors";
+
+describe("Enter Correspondence Address Page", () => {
+  const URL = getUrl(ENTER_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL);
+  // const redirectUrl = getUrl(CONFIRM_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL);
+
+  beforeEach(() => {
+    setLocalesEnabled(false);
+
+    appDevDependencies.cacheRepository.feedCache(null);
+    appDevDependencies.generalPartnerGateway.feedGeneralPartners([]);
+  });
+
+  describe("GET Enter general partners correspondence address", () => {
+    it("should load enter general partners correspondence address page with english text", async () => {
+      setLocalesEnabled(true);
+      const generalPartner = new GeneralPartnerBuilder()
+        .withId(appDevDependencies.generalPartnerGateway.generalPartnerId)
+        .isPerson()
+        .build();
+
+      appDevDependencies.generalPartnerGateway.feedGeneralPartners([generalPartner]);
+
+      const res = await request(app).get(URL + "?lang=en");
+
+      expect(res.status).toBe(200);
+      testTranslations(res.text, enTranslationText.address.enterAddress, [
+        "registeredOfficeAddress",
+        "principalPlaceOfBusinessAddress",
+        "jurisdictionCountry",
+        "postcodeMissing",
+        "postcodeLength",
+        "usualResidentialAddress",
+        "principalOfficeAddress",
+        "postcodeOptional"
+      ]);
+      expect(res.text).not.toContain("WELSH -");
+      expect(res.text).toContain(generalPartnerPerson.forename?.toUpperCase());
+      expect(res.text).toContain(generalPartnerPerson.surname?.toUpperCase());
+      expect(res.text).not.toContain(generalPartnerLegalEntity.legal_entity_name?.toUpperCase());
+    });
+
+    it("should load enter general partners correspondence address manual entry page with welsh text", async () => {
+      setLocalesEnabled(true);
+
+      const generalPartner = new GeneralPartnerBuilder()
+        .withId(appDevDependencies.generalPartnerGateway.generalPartnerId)
+        .isPerson()
+        .build();
+
+      appDevDependencies.generalPartnerGateway.feedGeneralPartners([generalPartner]);
+      appDevDependencies.cacheRepository.feedCache({
+        [appDevDependencies.transactionGateway.transactionId]: {
+          ca_territory_choice: "overseas"
+        }
+      });
+
+      const res = await request(app).get(URL + "?lang=cy");
+
+      expect(res.status).toBe(200);
+      testTranslations(res.text, cyTranslationText.address.enterAddress, [
+        "registeredOfficeAddress",
+        "principalPlaceOfBusinessAddress",
+        "jurisdictionCountry",
+        "postcodeMissing",
+        "postcodeLength",
+        "postcode",
+        "usualResidentialAddress",
+        "principalOfficeAddress"
+      ]);
+
+      expect(res.text).toContain(generalPartnerPerson.forename?.toUpperCase());
+      expect(res.text).toContain(generalPartnerPerson.surname?.toUpperCase());
+      expect(res.text).not.toContain(generalPartnerLegalEntity.legal_entity_name?.toUpperCase());
+    });
+
+    it("should load enter general partners correspondence address manual entry page with overseas back link", async () => {
+      appDevDependencies.cacheRepository.feedCache({
+        [appDevDependencies.transactionGateway.transactionId]: {
+          ca_territory_choice: "overseas"
+        }
+      });
+
+      const redirectUrl = getUrl(TERRITORY_CHOICE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL);
path: src/presentation/test/integration/registration/generalPartner/address/enter-general-partner-correspondence-address.test.ts
user: login: markpit
body: const redirectUrl should be called backLinkUrl
created_at: 2025-04-14T13:53:49Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,231 @@
+import request from "supertest";
+
+import enTranslationText from "../../../../../../../locales/en/translations.json";
+import cyTranslationText from "../../../../../../../locales/cy/translations.json";
+
+import app from "../../../app";
+
+import {
+  // CONFIRM_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  ENTER_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  POSTCODE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  TERRITORY_CHOICE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL
+} from "../../../../../controller/addressLookUp/url";
+import { getUrl, setLocalesEnabled, testTranslations } from "../../../../utils";
+import AddressPageType from "../../../../../controller/addressLookUp/PageType";
+import { appDevDependencies } from "../../../../../../config/dev-dependencies";
+import GeneralPartnerBuilder, {
+  generalPartnerLegalEntity,
+  generalPartnerPerson
+} from "../../../../builder/GeneralPartnerBuilder";
+import { ApiErrors } from "../../../../../../domain/entities/UIErrors";
+
+describe("Enter Correspondence Address Page", () => {
+  const URL = getUrl(ENTER_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL);
+  // const redirectUrl = getUrl(CONFIRM_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL);
+
+  beforeEach(() => {
+    setLocalesEnabled(false);
+
+    appDevDependencies.cacheRepository.feedCache(null);
+    appDevDependencies.generalPartnerGateway.feedGeneralPartners([]);
+  });
+
+  describe("GET Enter general partners correspondence address", () => {
+    it("should load enter general partners correspondence address page with english text", async () => {
+      setLocalesEnabled(true);
+      const generalPartner = new GeneralPartnerBuilder()
+        .withId(appDevDependencies.generalPartnerGateway.generalPartnerId)
+        .isPerson()
+        .build();
+
+      appDevDependencies.generalPartnerGateway.feedGeneralPartners([generalPartner]);
+
+      const res = await request(app).get(URL + "?lang=en");
+
+      expect(res.status).toBe(200);
+      testTranslations(res.text, enTranslationText.address.enterAddress, [
+        "registeredOfficeAddress",
+        "principalPlaceOfBusinessAddress",
+        "jurisdictionCountry",
+        "postcodeMissing",
+        "postcodeLength",
+        "usualResidentialAddress",
+        "principalOfficeAddress",
+        "postcodeOptional"
+      ]);
+      expect(res.text).not.toContain("WELSH -");
+      expect(res.text).toContain(generalPartnerPerson.forename?.toUpperCase());
+      expect(res.text).toContain(generalPartnerPerson.surname?.toUpperCase());
+      expect(res.text).not.toContain(generalPartnerLegalEntity.legal_entity_name?.toUpperCase());
+    });
+
+    it("should load enter general partners correspondence address manual entry page with welsh text", async () => {
+      setLocalesEnabled(true);
+
+      const generalPartner = new GeneralPartnerBuilder()
+        .withId(appDevDependencies.generalPartnerGateway.generalPartnerId)
+        .isPerson()
+        .build();
+
+      appDevDependencies.generalPartnerGateway.feedGeneralPartners([generalPartner]);
+      appDevDependencies.cacheRepository.feedCache({
+        [appDevDependencies.transactionGateway.transactionId]: {
+          ca_territory_choice: "overseas"
+        }
+      });
+
+      const res = await request(app).get(URL + "?lang=cy");
+
+      expect(res.status).toBe(200);
+      testTranslations(res.text, cyTranslationText.address.enterAddress, [
+        "registeredOfficeAddress",
+        "principalPlaceOfBusinessAddress",
+        "jurisdictionCountry",
+        "postcodeMissing",
+        "postcodeLength",
+        "postcode",
+        "usualResidentialAddress",
+        "principalOfficeAddress"
+      ]);
+
+      expect(res.text).toContain(generalPartnerPerson.forename?.toUpperCase());
+      expect(res.text).toContain(generalPartnerPerson.surname?.toUpperCase());
+      expect(res.text).not.toContain(generalPartnerLegalEntity.legal_entity_name?.toUpperCase());
+    });
+
+    it("should load enter general partners correspondence address manual entry page with overseas back link", async () => {
+      appDevDependencies.cacheRepository.feedCache({
+        [appDevDependencies.transactionGateway.transactionId]: {
+          ca_territory_choice: "overseas"
+        }
+      });
+
+      const redirectUrl = getUrl(TERRITORY_CHOICE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL);
+
+      const res = await request(app).get(URL);
+      expect(res.status).toBe(200);
+
+      expect(res.text).toContain(redirectUrl);
+    });
+
+    it("should load enter general partners correspondence address manual entry page with postcode lookup back link", async () => {
+      appDevDependencies.cacheRepository.feedCache({
+        [appDevDependencies.transactionGateway.transactionId]: {
+          ca_territory_choice: "unitedKingdom"
+        }
+      });
+      const redirectUrl = getUrl(POSTCODE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL);
path: src/presentation/test/integration/registration/generalPartner/address/enter-general-partner-correspondence-address.test.ts
user: login: markpit
body: backLinkUrl
created_at: 2025-04-14T13:54:16Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,231 @@
+import request from "supertest";
+
+import enTranslationText from "../../../../../../../locales/en/translations.json";
+import cyTranslationText from "../../../../../../../locales/cy/translations.json";
+
+import app from "../../../app";
+
+import {
+  // CONFIRM_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  ENTER_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  POSTCODE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL,
+  TERRITORY_CHOICE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL
+} from "../../../../../controller/addressLookUp/url";
+import { getUrl, setLocalesEnabled, testTranslations } from "../../../../utils";
+import AddressPageType from "../../../../../controller/addressLookUp/PageType";
+import { appDevDependencies } from "../../../../../../config/dev-dependencies";
+import GeneralPartnerBuilder, {
+  generalPartnerLegalEntity,
+  generalPartnerPerson
+} from "../../../../builder/GeneralPartnerBuilder";
+import { ApiErrors } from "../../../../../../domain/entities/UIErrors";
+
+describe("Enter Correspondence Address Page", () => {
+  const URL = getUrl(ENTER_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL);
+  // const redirectUrl = getUrl(CONFIRM_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL);
+
+  beforeEach(() => {
+    setLocalesEnabled(false);
+
+    appDevDependencies.cacheRepository.feedCache(null);
+    appDevDependencies.generalPartnerGateway.feedGeneralPartners([]);
+  });
+
+  describe("GET Enter general partners correspondence address", () => {
+    it("should load enter general partners correspondence address page with english text", async () => {
+      setLocalesEnabled(true);
+      const generalPartner = new GeneralPartnerBuilder()
+        .withId(appDevDependencies.generalPartnerGateway.generalPartnerId)
+        .isPerson()
+        .build();
+
+      appDevDependencies.generalPartnerGateway.feedGeneralPartners([generalPartner]);
+
+      const res = await request(app).get(URL + "?lang=en");
+
+      expect(res.status).toBe(200);
+      testTranslations(res.text, enTranslationText.address.enterAddress, [
+        "registeredOfficeAddress",
+        "principalPlaceOfBusinessAddress",
+        "jurisdictionCountry",
+        "postcodeMissing",
+        "postcodeLength",
+        "usualResidentialAddress",
+        "principalOfficeAddress",
+        "postcodeOptional"
+      ]);
+      expect(res.text).not.toContain("WELSH -");
+      expect(res.text).toContain(generalPartnerPerson.forename?.toUpperCase());
+      expect(res.text).toContain(generalPartnerPerson.surname?.toUpperCase());
+      expect(res.text).not.toContain(generalPartnerLegalEntity.legal_entity_name?.toUpperCase());
+    });
+
+    it("should load enter general partners correspondence address manual entry page with welsh text", async () => {
+      setLocalesEnabled(true);
+
+      const generalPartner = new GeneralPartnerBuilder()
+        .withId(appDevDependencies.generalPartnerGateway.generalPartnerId)
+        .isPerson()
+        .build();
+
+      appDevDependencies.generalPartnerGateway.feedGeneralPartners([generalPartner]);
+      appDevDependencies.cacheRepository.feedCache({
+        [appDevDependencies.transactionGateway.transactionId]: {
+          ca_territory_choice: "overseas"
+        }
+      });
+
+      const res = await request(app).get(URL + "?lang=cy");
+
+      expect(res.status).toBe(200);
+      testTranslations(res.text, cyTranslationText.address.enterAddress, [
+        "registeredOfficeAddress",
+        "principalPlaceOfBusinessAddress",
+        "jurisdictionCountry",
+        "postcodeMissing",
+        "postcodeLength",
+        "postcode",
+        "usualResidentialAddress",
+        "principalOfficeAddress"
+      ]);
+
+      expect(res.text).toContain(generalPartnerPerson.forename?.toUpperCase());
+      expect(res.text).toContain(generalPartnerPerson.surname?.toUpperCase());
+      expect(res.text).not.toContain(generalPartnerLegalEntity.legal_entity_name?.toUpperCase());
+    });
+
+    it("should load enter general partners correspondence address manual entry page with overseas back link", async () => {
+      appDevDependencies.cacheRepository.feedCache({
+        [appDevDependencies.transactionGateway.transactionId]: {
+          ca_territory_choice: "overseas"
+        }
+      });
+
+      const redirectUrl = getUrl(TERRITORY_CHOICE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL);
+
+      const res = await request(app).get(URL);
+      expect(res.status).toBe(200);
+
+      expect(res.text).toContain(redirectUrl);
+    });
+
+    it("should load enter general partners correspondence address manual entry page with postcode lookup back link", async () => {
+      appDevDependencies.cacheRepository.feedCache({
+        [appDevDependencies.transactionGateway.transactionId]: {
+          ca_territory_choice: "unitedKingdom"
+        }
+      });
+      const redirectUrl = getUrl(POSTCODE_GENERAL_PARTNER_CORRESPONDENCE_ADDRESS_URL);
+      const res = await request(app).get(URL);
+      expect(res.status).toBe(200);
+
+      expect(res.text).toContain(redirectUrl);
+    });
+  });
+
+  describe("POST Enter general partners correspondence address Page", () => {
+    it("should redirect and add entered address to the cache", async () => {
+      appDevDependencies.addressLookUpGateway.setError(false);
+      appDevDependencies.cacheRepository.feedCache({
+        [appDevDependencies.transactionGateway.transactionId]: {
+          ["correspondence_address"]: {
+            address_line_1: "",
+            address_line_2: "",
+            country: "",
+            locality: "",
+            postal_code: "",
+            premises: "",
+            region: ""
+          }
+        }
+      });
+      const res = await request(app).post(URL).send({
+        pageType: AddressPageType.enterGeneralPartnerCorrespondenceAddress,
+        postal_code: "",
+        premises: "4",
+        address_line_1: "DUNCALF STREET",
+        address_line_2: "",
+        locality: "STOKE-ON-TRENT",
+        country: "England"
+      });
+
+      expect(res.status).toBe(302);
+      // TODO Uncomment when correspondence address confirmation page is done
path: src/presentation/test/integration/registration/generalPartner/address/enter-general-partner-correspondence-address.test.ts
user: login: markpit
body: should be able to test this now as the url is defined already.
created_at: 2025-04-14T13:55:20Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,91 @@
+{% extends "layout.njk" %}
+
+{% set correspondenceAddressKey = "correspondence_address" %}
+
+{% block backLink %}
+  {% set hrefValue = props.previousUrl %}
+
+  {% if props.data.cache.ca_territory_choice == "overseas" %}
+    {% set hrefValue = props.currentUrl | replace(props.pageType, "territory-choice-general-partner-correspondence-address") %}
+  {% endif %}
+
+  {{ govukBackLink({
+    text: "Back",
+    attributes: {
+      "data-event-id": "back-link"
+    },
+    href: hrefValue
+  }) }}
+{% endblock %}
+
+{% if props.data.address %}
+  {% set address = props.data.address %}
+{% elif props.data.cache[correspondenceAddressKey] %}
+  {% set address = props.data.cache[correspondenceAddressKey] %}
+{% elif props.data.limitedPartnership.data.service_address %}
+  {% set address = props.data.service_address %}
+{% else %}
+  {% set address = {} %}
+{% endif %}
+
+{% set pageTitle = i18n.address.enterAddress.correspondenceAddress.title %}
+{% set titleHint1 = i18n.address.enterAddress.correspondenceAddress.titleHint1 %}
+{% set publicInformationLine1 = i18n.address.enterAddress.correspondenceAddress.publicInformationLine1 %}
+
+{% block content %}
+  <div class="govuk-grid-row">
+    <div class="govuk-grid-column-two-thirds">
+      {% include "includes/general-partner-name.njk" %}
+
+      <fieldset class="govuk-fieldset">
+        <legend class="govuk-fieldset__legend govuk-fieldset__legend--s">
+            <h1 class="govuk-heading-xl">
+            {{ pageTitle }}
+            </h1>
+        </legend>
+
+        <p class="govuk-hint">{{ titleHint1 }}</p>
+      </fieldset>
+      
+      <form class="form" action={{ props.currentUrl }} method="post">
+        <input type="hidden" name="pageType" value={{ props.pageType }}>
+          {% include "includes/csrf_token.njk" %}
+          
+          {% if props.data.cache.ca_territory_choice == "overseas" %}
+            {% include "pages/address/enter-address-fields.njk" %}
+
+            {{ govukInput({
+              label: {
+                text: i18n.address.enterAddress.correspondenceAddress.postcodeOptional
+              },
+              classes: "govuk-input--width-10",
+              id: "postal_code",
+              name: "postal_code",
+              value: address.postal_code,
+              attributes: {
+                oninput: "validateLength(this, 15, '" + i18n.address.enterAddress.errorMessages.postcodeLength | escape + "');"
+              }
+            }) }}
+
+            {% set countryFormId = "country" %}
+            {% set countryFormName = "country" %}
+            {% set countryText = i18n.address.enterAddress.country %}
+            {% set countryFormValue = address.country %}
+            {% set countryField = address.country %}
+            {% set countryFont = "govuk-!-font-weight-regular"%}
+            {% include "includes/countries.njk" %}
+
+          {% else %}
+            {% include "pages/address/enter-address-common-fields.njk" %}
+          {% endif %}
+          
+          {{ govukInsetText({
path: src/views/enter-general-partner-correspondence-address.njk
user: login: markpit
body: can you use the public-register-information include here
created_at: 2025-04-14T13:56:56Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,91 @@
+{% extends "layout.njk" %}
+
+{% set correspondenceAddressKey = "correspondence_address" %}
+
+{% block backLink %}
+  {% set hrefValue = props.previousUrl %}
+
+  {% if props.data.cache.ca_territory_choice == "overseas" %}
+    {% set hrefValue = props.currentUrl | replace(props.pageType, "territory-choice-general-partner-correspondence-address") %}
+  {% endif %}
+
+  {{ govukBackLink({
+    text: "Back",
+    attributes: {
+      "data-event-id": "back-link"
+    },
+    href: hrefValue
+  }) }}
+{% endblock %}
+
+{% if props.data.address %}
+  {% set address = props.data.address %}
+{% elif props.data.cache[correspondenceAddressKey] %}
+  {% set address = props.data.cache[correspondenceAddressKey] %}
+{% elif props.data.limitedPartnership.data.service_address %}
+  {% set address = props.data.service_address %}
+{% else %}
+  {% set address = {} %}
+{% endif %}
+
+{% set pageTitle = i18n.address.enterAddress.correspondenceAddress.title %}
+{% set titleHint1 = i18n.address.enterAddress.correspondenceAddress.titleHint1 %}
+{% set publicInformationLine1 = i18n.address.enterAddress.correspondenceAddress.publicInformationLine1 %}
path: src/views/enter-general-partner-correspondence-address.njk
user: login: markpit
body: can't see where this is used but if you use the include public-register-information then it will be needed
created_at: 2025-04-14T13:58:30Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,91 @@
+{% extends "layout.njk" %}
+
+{% set correspondenceAddressKey = "correspondence_address" %}
+
+{% block backLink %}
+  {% set hrefValue = props.previousUrl %}
+
+  {% if props.data.cache.ca_territory_choice == "overseas" %}
+    {% set hrefValue = props.currentUrl | replace(props.pageType, "territory-choice-general-partner-correspondence-address") %}
+  {% endif %}
+
+  {{ govukBackLink({
+    text: "Back",
+    attributes: {
+      "data-event-id": "back-link"
+    },
+    href: hrefValue
+  }) }}
+{% endblock %}
+
+{% if props.data.address %}
+  {% set address = props.data.address %}
+{% elif props.data.cache[correspondenceAddressKey] %}
+  {% set address = props.data.cache[correspondenceAddressKey] %}
+{% elif props.data.limitedPartnership.data.service_address %}
+  {% set address = props.data.service_address %}
+{% else %}
+  {% set address = {} %}
+{% endif %}
+
+{% set pageTitle = i18n.address.enterAddress.correspondenceAddress.title %}
+{% set titleHint1 = i18n.address.enterAddress.correspondenceAddress.titleHint1 %}
+{% set publicInformationLine1 = i18n.address.enterAddress.correspondenceAddress.publicInformationLine1 %}
path: src/views/enter-general-partner-correspondence-address.njk
user: login: mwestacott
body: Used below but will use the public-register-information include as suggested.
created_at: 2025-04-14T14:46:46Z
author_association: CONTRIBUTOR

PR comments:
user: login: ch-code-analysis
created_at: 2025-04-14T13:41:22Z
body: CI: No security warnings found
author_association: NONE
user: login: chsonarqubeprchecks[bot]
created_at: 2025-04-14T15:24:40Z
body: **SonarQube Quality Gate**

[![Quality Gate passed](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v86/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](http://code-analysis.platform.aws.chdev.org:9000/dashboard?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280)

[![Bug](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v86/common/bug-16px.png 'Bug')](http://code-analysis.platform.aws.chdev.org:9000/project/issues?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280&resolved=false&types=BUG) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v86/checks/RatingBadge/A-16px.png 'A')](http://code-analysis.platform.aws.chdev.org:9000/project/issues?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280&resolved=false&types=BUG) [0 Bugs](http://code-analysis.platform.aws.chdev.org:9000/project/issues?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280&resolved=false&types=BUG)  
[![Vulnerability](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v86/common/vulnerability-16px.png 'Vulnerability')](http://code-analysis.platform.aws.chdev.org:9000/project/issues?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280&resolved=false&types=VULNERABILITY) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v86/checks/RatingBadge/A-16px.png 'A')](http://code-analysis.platform.aws.chdev.org:9000/project/issues?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](http://code-analysis.platform.aws.chdev.org:9000/project/issues?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280&resolved=false&types=VULNERABILITY)  
[![Security Hotspot](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v86/common/security_hotspot-16px.png 'Security Hotspot')](http://code-analysis.platform.aws.chdev.org:9000/security_hotspots?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v86/checks/RatingBadge/A-16px.png 'A')](http://code-analysis.platform.aws.chdev.org:9000/security_hotspots?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280) [0 Security Hotspots](http://code-analysis.platform.aws.chdev.org:9000/security_hotspots?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280)  
[![Code Smell](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v86/common/code_smell-16px.png 'Code Smell')](http://code-analysis.platform.aws.chdev.org:9000/project/issues?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280&resolved=false&types=CODE_SMELL) [![A](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v86/checks/RatingBadge/A-16px.png 'A')](http://code-analysis.platform.aws.chdev.org:9000/project/issues?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280&resolved=false&types=CODE_SMELL) [0 Code Smells](http://code-analysis.platform.aws.chdev.org:9000/project/issues?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280&resolved=false&types=CODE_SMELL)

[![100.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v86/checks/CoverageChart/100-16px.png '100.0%')](http://code-analysis.platform.aws.chdev.org:9000/component_measures?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280&metric=new_coverage&view=list) [100.0% Coverage](http://code-analysis.platform.aws.chdev.org:9000/component_measures?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280&metric=new_coverage&view=list)  
[![0.0%](https://raw.githubusercontent.com/SonarSource/sonarqube-static-resources/master/v86/checks/Duplications/3-16px.png '0.0%')](http://code-analysis.platform.aws.chdev.org:9000/component_measures?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](http://code-analysis.platform.aws.chdev.org:9000/component_measures?id=uk.gov.companieshouse%3Alimited-partnerships-web&pullRequest=280&metric=new_duplicated_lines_density&view=list)


author_association: NONE
user: login: ch-code-analysis
created_at: 2025-04-14T15:27:18Z
body: CI: No security warnings found
author_association: NONE