Skip to content

Commit 3e3958a

Browse files
authored
Merge pull request #611 from companieshouse/lp-909-cya-welsh-translations-nationality-country
LP-909 Locales required for nationalities and countries
2 parents c036059 + a57e299 commit 3e3958a

File tree

34 files changed

+152
-60
lines changed

34 files changed

+152
-60
lines changed

src/presentation/test/builder/AbstractPartnerBuilder.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ abstract class AbstractPartnerBuilder {
8989
this.data.nationality2 = nationality2;
9090
return this;
9191
}
92+
93+
withLegalEntityRegistrationLocation(legalEntityRegistrationLocation: string) {
94+
this.data.legal_entity_registration_location = legalEntityRegistrationLocation;
95+
return this;
96+
}
9297
}
9398

9499
export default AbstractPartnerBuilder;

src/presentation/test/integration/postTransition/generalPartner/address/confirm-general-partner-correspondence-address.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ describe("Confirm General Partner Correspondence Address Page", () => {
5858
expect(res.text).toContain("Line 2");
5959
expect(res.text).toContain("Stoke-On-Trent");
6060
expect(res.text).toContain("Region");
61-
expect(res.text).toContain("England");
61+
expect(res.text).toContain(enTranslationText.countries.england);
6262
expect(res.text).toContain("ST6 3LJ");
6363
});
6464

@@ -74,7 +74,7 @@ describe("Confirm General Partner Correspondence Address Page", () => {
7474
expect(res.text).toContain("Line 2");
7575
expect(res.text).toContain("Stoke-On-Trent");
7676
expect(res.text).toContain("Region");
77-
expect(res.text).toContain("England");
77+
expect(res.text).toContain(cyTranslationText.countries.england);
7878
expect(res.text).toContain("ST6 3LJ");
7979
});
8080

src/presentation/test/integration/postTransition/generalPartner/address/confirm-general-partner-principal-office-address.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe("Confirm General Partner Principal Office Address Page", () => {
6060
expect(res.text).toContain("Line 2");
6161
expect(res.text).toContain("Stoke-On-Trent");
6262
expect(res.text).toContain("Region");
63-
expect(res.text).toContain("England");
63+
expect(res.text).toContain(enTranslationText.countries.england);
6464
expect(res.text).toContain("ST6 3LJ");
6565
});
6666

@@ -76,7 +76,7 @@ describe("Confirm General Partner Principal Office Address Page", () => {
7676
expect(res.text).toContain("Line 2");
7777
expect(res.text).toContain("Stoke-On-Trent");
7878
expect(res.text).toContain("Region");
79-
expect(res.text).toContain("England");
79+
expect(res.text).toContain(cyTranslationText.countries.england);
8080
expect(res.text).toContain("ST6 3LJ");
8181
});
8282

src/presentation/test/integration/postTransition/generalPartner/address/confirm-general-partner-usual-residential-address.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe("Confirm General Partner Usual Residential Address Page", () => {
6060
expect(res.text).toContain("Line 2");
6161
expect(res.text).toContain("Stoke-On-Trent");
6262
expect(res.text).toContain("Region");
63-
expect(res.text).toContain("England");
63+
expect(res.text).toContain(enTranslationText.countries.england);
6464
expect(res.text).toContain("ST6 3LJ");
6565
});
6666

@@ -76,7 +76,7 @@ describe("Confirm General Partner Usual Residential Address Page", () => {
7676
expect(res.text).toContain("Line 2");
7777
expect(res.text).toContain("Stoke-On-Trent");
7878
expect(res.text).toContain("Region");
79-
expect(res.text).toContain("England");
79+
expect(res.text).toContain(cyTranslationText.countries.england);
8080
expect(res.text).toContain("ST6 3LJ");
8181
});
8282

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ describe("Check Your Answers Page", () => {
2525
companyProfile = new CompanyProfileBuilder().build();
2626
appDevDependencies.companyGateway.feedCompanyProfile(companyProfile.data);
2727

28-
generalPartnerLegalEntity = new GeneralPartnerBuilder().isLegalEntity().withDateEffectiveFrom("2024-10-10").build();
28+
generalPartnerLegalEntity = new GeneralPartnerBuilder()
29+
.isLegalEntity()
30+
.withDateEffectiveFrom("2024-10-10")
31+
.withLegalEntityRegistrationLocation("Wales")
32+
.build();
2933
appDevDependencies.generalPartnerGateway.feedGeneralPartners([generalPartnerLegalEntity]);
3034
});
3135

@@ -39,6 +43,7 @@ describe("Check Your Answers Page", () => {
3943
testTranslations(res.text, enTranslationText.checkYourAnswersPage.warningMessage);
4044
expect(res.text).toContain(enTranslationText.print.buttonText);
4145
expect(res.text).toContain(enTranslationText.print.buttonTextNoJs);
46+
expect(res.text).toContain(enTranslationText.countries.wales);
4247
expect(res.text).not.toContain("WELSH -");
4348
});
4449

@@ -51,6 +56,7 @@ describe("Check Your Answers Page", () => {
5156
testTranslations(res.text, cyTranslationText.checkYourAnswersPage.warningMessage);
5257
expect(res.text).toContain(cyTranslationText.print.buttonText);
5358
expect(res.text).toContain(cyTranslationText.print.buttonTextNoJs);
59+
expect(res.text).toContain(cyTranslationText.countries.wales);
5460
expect(res.text).toContain("WELSH -");
5561
});
5662

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ describe("General Partner Check Your Answers Page", () => {
2525
const companyProfile = new CompanyProfileBuilder().build();
2626
appDevDependencies.companyGateway.feedCompanyProfile(companyProfile.data);
2727

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

@@ -38,6 +43,7 @@ describe("General Partner Check Your Answers Page", () => {
3843
expect(res.text).toContain(enTranslationText.checkYourAnswersPage.update.title);
3944
expect(res.text).toContain(enTranslationText.print.buttonText);
4045
expect(res.text).toContain(enTranslationText.print.buttonTextNoJs);
46+
expect(res.text).toContain(enTranslationText.nationalities.welsh);
4147
expect(res.text).not.toContain("WELSH -");
4248
});
4349

@@ -50,6 +56,7 @@ describe("General Partner Check Your Answers Page", () => {
5056
expect(res.text).toContain(cyTranslationText.checkYourAnswersPage.update.title);
5157
expect(res.text).toContain(cyTranslationText.print.buttonText);
5258
expect(res.text).toContain(cyTranslationText.print.buttonTextNoJs);
59+
expect(res.text).toContain(cyTranslationText.nationalities.welsh);
5360
expect(res.text).toContain("WELSH -");
5461
});
5562

src/presentation/test/integration/postTransition/limitedPartner/address/confirm-limited-partner-principal-office-address.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ describe("Confirm Limited Partner Principal Office Address Page", () => {
6060
expect(res.text).toContain("Line 2");
6161
expect(res.text).toContain("Stoke-On-Trent");
6262
expect(res.text).toContain("Region");
63-
expect(res.text).toContain("England");
63+
expect(res.text).toContain(enTranslationText.countries.england);
6464
expect(res.text).toContain("ST6 3LJ");
6565
});
6666

@@ -76,7 +76,7 @@ describe("Confirm Limited Partner Principal Office Address Page", () => {
7676
expect(res.text).toContain("Line 2");
7777
expect(res.text).toContain("Stoke-On-Trent");
7878
expect(res.text).toContain("Region");
79-
expect(res.text).toContain("England");
79+
expect(res.text).toContain(cyTranslationText.countries.england);
8080
expect(res.text).toContain("ST6 3LJ");
8181
});
8282

src/presentation/test/integration/postTransition/limitedPartner/address/confirm-limited-partner-usual-residential-address.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ describe("Confirm Limited Partner Usual Residential Address Page", () => {
5959
expect(res.text).toContain("Line 2");
6060
expect(res.text).toContain("Stoke-On-Trent");
6161
expect(res.text).toContain("Region");
62-
expect(res.text).toContain("England");
62+
expect(res.text).toContain(enTranslationText.countries.england);
6363
expect(res.text).toContain("ST6 3LJ");
6464
});
6565

@@ -75,7 +75,7 @@ describe("Confirm Limited Partner Usual Residential Address Page", () => {
7575
expect(res.text).toContain("Line 2");
7676
expect(res.text).toContain("Stoke-On-Trent");
7777
expect(res.text).toContain("Region");
78-
expect(res.text).toContain("England");
78+
expect(res.text).toContain(cyTranslationText.countries.england);
7979
expect(res.text).toContain("ST6 3LJ");
8080
});
8181

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ describe("Limited Partner Check Your Answers Page", () => {
2525
const companyProfile = new CompanyProfileBuilder().build();
2626
appDevDependencies.companyGateway.feedCompanyProfile(companyProfile.data);
2727

28-
limitedPartnerLegalEntity = new LimitedPartnerBuilder().isLegalEntity().withDateEffectiveFrom("2024-10-10").build();
28+
limitedPartnerLegalEntity = new LimitedPartnerBuilder()
29+
.isLegalEntity()
30+
.withDateEffectiveFrom("2024-10-10")
31+
.withLegalEntityRegistrationLocation("Wales")
32+
.build();
33+
2934
appDevDependencies.limitedPartnerGateway.feedLimitedPartners([limitedPartnerLegalEntity]);
3035
});
3136

@@ -38,6 +43,7 @@ describe("Limited Partner Check Your Answers Page", () => {
3843
expect(res.text).toContain(enTranslationText.checkYourAnswersPage.update.title);
3944
expect(res.text).toContain(enTranslationText.print.buttonText);
4045
expect(res.text).toContain(enTranslationText.print.buttonTextNoJs);
46+
expect(res.text).toContain(enTranslationText.countries.wales);
4147
expect(res.text).not.toContain("WELSH -");
4248
});
4349

@@ -50,6 +56,7 @@ describe("Limited Partner Check Your Answers Page", () => {
5056
expect(res.text).toContain(cyTranslationText.checkYourAnswersPage.update.title);
5157
expect(res.text).toContain(cyTranslationText.print.buttonText);
5258
expect(res.text).toContain(cyTranslationText.print.buttonTextNoJs);
59+
expect(res.text).toContain(cyTranslationText.countries.wales);
5360
expect(res.text).toContain("WELSH -");
5461
});
5562

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ describe("Limited Partner Check Your Answers Page for Person", () => {
2525
const companyProfile = new CompanyProfileBuilder().build();
2626
appDevDependencies.companyGateway.feedCompanyProfile(companyProfile.data);
2727

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

@@ -38,6 +44,7 @@ describe("Limited Partner Check Your Answers Page for Person", () => {
3844
expect(res.text).toContain(enTranslationText.checkYourAnswersPage.update.title);
3945
expect(res.text).toContain(enTranslationText.print.buttonText);
4046
expect(res.text).toContain(enTranslationText.print.buttonTextNoJs);
47+
expect(res.text).toContain(enTranslationText.nationalities.welsh);
4148
testTranslations(res.text, enTranslationText.checkYourAnswersPage.warningMessage);
4249
expect(res.text).not.toContain("WELSH -");
4350
});
@@ -51,6 +58,7 @@ describe("Limited Partner Check Your Answers Page for Person", () => {
5158
expect(res.text).toContain(cyTranslationText.checkYourAnswersPage.update.title);
5259
expect(res.text).toContain(cyTranslationText.print.buttonText);
5360
expect(res.text).toContain(cyTranslationText.print.buttonTextNoJs);
61+
expect(res.text).toContain(cyTranslationText.nationalities.welsh);
5462
testTranslations(res.text, cyTranslationText.checkYourAnswersPage.warningMessage);
5563
expect(res.text).toContain("WELSH -");
5664
});

0 commit comments

Comments
 (0)