Skip to content

Commit 87464f0

Browse files
committed
LP-909 comments and formatting
1 parent 71099da commit 87464f0

File tree

7 files changed

+27
-23
lines changed

7 files changed

+27
-23
lines changed

src/presentation/test/builder/AbstractPartnerBuilder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ abstract class AbstractPartnerBuilder {
9191
}
9292

9393
withLegalEntityRegistrationLocation(country: string) {
94-
this.data.legal_entity_registration_location = country
94+
this.data.legal_entity_registration_location = country;
9595
return this;
9696
}
9797
}

src/presentation/test/integration/postTransition/generalPartner/general-partner-check-your-answers-legal-entity.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ describe("Check Your Answers Page", () => {
2626
appDevDependencies.companyGateway.feedCompanyProfile(companyProfile.data);
2727

2828
generalPartnerLegalEntity = new GeneralPartnerBuilder()
29-
.isLegalEntity()
30-
.withDateEffectiveFrom("2024-10-10")
31-
.withLegalEntityRegistrationLocation("Wales")
32-
.build();
29+
.isLegalEntity()
30+
.withDateEffectiveFrom("2024-10-10")
31+
.withLegalEntityRegistrationLocation("Wales")
32+
.build();
3333
appDevDependencies.generalPartnerGateway.feedGeneralPartners([generalPartnerLegalEntity]);
3434
});
3535

src/presentation/test/integration/postTransition/generalPartner/general-partner-check-your-answers-person.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ describe("General Partner Check Your Answers Page", () => {
2626
appDevDependencies.companyGateway.feedCompanyProfile(companyProfile.data);
2727

2828
generalPartnerPerson = new GeneralPartnerBuilder()
29-
.isPerson()
30-
.withFormerNames("Joe Dee")
31-
.withDateEffectiveFrom("2024-10-10")
32-
.withNationality1("Welsh")
33-
.build();
29+
.isPerson()
30+
.withFormerNames("Joe Dee")
31+
.withDateEffectiveFrom("2024-10-10")
32+
.withNationality1("Welsh")
33+
.build();
3434
appDevDependencies.generalPartnerGateway.feedGeneralPartners([generalPartnerPerson]);
3535
});
3636

@@ -47,7 +47,7 @@ describe("General Partner Check Your Answers Page", () => {
4747
expect(res.text).not.toContain("WELSH -");
4848
});
4949

50-
it("should GET Check Your Answers Page Welsh text for person", async () => {
50+
it("should GET Check Your Answers Page Welsh text", async () => {
5151
setLocalesEnabled(true);
5252
const res = await request(app).get(URL + "?lang=cy");
5353

src/presentation/test/integration/postTransition/limitedPartner/limited-partner-check-your-answers-legal-entity.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ describe("Limited Partner Check Your Answers Page", () => {
2626
appDevDependencies.companyGateway.feedCompanyProfile(companyProfile.data);
2727

2828
limitedPartnerLegalEntity = new LimitedPartnerBuilder()
29-
.isLegalEntity()
30-
.withDateEffectiveFrom("2024-10-10")
31-
.withLegalEntityRegistrationLocation("Wales")
32-
.build();
29+
.isLegalEntity()
30+
.withDateEffectiveFrom("2024-10-10")
31+
.withLegalEntityRegistrationLocation("Wales")
32+
.build();
33+
3334
appDevDependencies.limitedPartnerGateway.feedLimitedPartners([limitedPartnerLegalEntity]);
3435
});
3536

src/presentation/test/integration/postTransition/limitedPartner/limited-partner-check-your-answers-person.test.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ describe("Limited Partner Check Your Answers Page for Person", () => {
2626
appDevDependencies.companyGateway.feedCompanyProfile(companyProfile.data);
2727

2828
limitedPartnerPerson = new LimitedPartnerBuilder()
29-
.isPerson()
30-
.withFormerNames("Joe Dee")
31-
.withDateEffectiveFrom("2024-10-10")
32-
.withNationality1("Welsh")
33-
.build();
29+
.isPerson()
30+
.withFormerNames("Joe Dee")
31+
.withDateEffectiveFrom("2024-10-10")
32+
.withNationality1("Welsh")
33+
.build();
34+
3435
appDevDependencies.limitedPartnerGateway.feedLimitedPartners([limitedPartnerPerson]);
3536
});
3637

@@ -57,7 +58,7 @@ describe("Limited Partner Check Your Answers Page for Person", () => {
5758
expect(res.text).toContain(cyTranslationText.checkYourAnswersPage.update.title);
5859
expect(res.text).toContain(cyTranslationText.print.buttonText);
5960
expect(res.text).toContain(cyTranslationText.print.buttonTextNoJs);
60-
expect(res.text).toContain(cyTranslationText.nationalities.welsh);
61+
expect(res.text).toContain(cyTranslationText.nationalities.welsh);
6162
testTranslations(res.text, cyTranslationText.checkYourAnswersPage.warningMessage);
6263
expect(res.text).toContain("WELSH -");
6364
});

src/presentation/test/integration/postTransition/limitedPartnership/checkYourAnswer/principal-place-of-business-address-change-check-your-answers.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe("Principal place of business address check your answers page", () => {
4040
// change links should retain the lang query parameter
4141
expect(res.text).toContain(`${ENTER_PRINCIPAL_PLACE_OF_BUSINESS_ADDRESS_TEMPLATE}?lang=en`);
4242
expect(res.text).toContain(`${WHEN_DID_THE_PRINCIPAL_PLACE_OF_BUSINESS_ADDRESS_CHANGE_TEMPLATE}?lang=en`);
43-
43+
4444
expect(res.text).toContain(enTranslationText.countries.england);
4545
});
4646

@@ -57,7 +57,7 @@ describe("Principal place of business address check your answers page", () => {
5757
// change links should retain the lang query parameter
5858
expect(res.text).toContain(`${ENTER_PRINCIPAL_PLACE_OF_BUSINESS_ADDRESS_TEMPLATE}?lang=cy`);
5959
expect(res.text).toContain(`${WHEN_DID_THE_PRINCIPAL_PLACE_OF_BUSINESS_ADDRESS_CHANGE_TEMPLATE}?lang=cy`);
60-
60+
6161
expect(res.text).toContain(cyTranslationText.countries.england);
6262
});
6363
});

src/views/includes/macros.njk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
{%- set words = localeStr.split(' ') -%}
8080
{%- set result = [] -%}
8181

82+
{# Temporary while waiting for welsh translations - need to handle 'WELSH -' keyword #}
8283
{%- if words[0] === "WELSH" -%}
8384
{%- set result = result.concat(words[0]) -%}
8485
{%- set result = result.concat(words[1]) -%}
@@ -125,6 +126,7 @@
125126
{{ term }}
126127
{% endmacro %}
127128

129+
{# Required as keys for looking up the locale #}
128130
{%- macro makeCamelCase(str) -%}
129131
{%- set str = str.replace("-", " ") -%}
130132
{%- set words = str.split(' ') -%}

0 commit comments

Comments
 (0)