Skip to content

Commit

Permalink
Merge pull request #106 from companieshouse/lp-298-page-title-tabs
Browse files Browse the repository at this point in the history
LP-298 Ensure tab heading is correct
  • Loading branch information
mattch1 authored Dec 19, 2024
2 parents 07b4dfe + 1993304 commit 8d4f03f
Show file tree
Hide file tree
Showing 18 changed files with 153 additions and 75 deletions.
76 changes: 39 additions & 37 deletions locales/cy/translations.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"buttons" : {
"continue" : "WELSH - Continue",
"saveAndContinue" : "WELSH - Save and continue"
},

"emailPage" : {
"whatIsEmail" : "WELSH - What is the registered email address for the partnership?",
"emailHint" : "WELSH - Partners must be able to access emails that are sent to this address.",
Expand All @@ -9,13 +14,36 @@
}
},

"errorPage" : {
"title" : "WELSH - Sorry, the service is unavailable",
"tryLater" : "WELSH - You will be able to use the service at a later date.",
"moreInfo" : "WELSH - Email <a class='govuk-link' href='mailto: enquiries@companieshouse.gov.uk'>enquiries@companieshouse.gov.uk</a>, if you need more information."
},

"generalPartnerChoicePage": {
"title": "WELSH - You now need to tell us about the general partners",
"hint": "WELSH - You can add more later.",
"person": "WELSH - A person",
"legalEntity": "WELSH - A legal entity"
},

"generalPartnersPage": {
"title": "WELSH - You now need to tell us about the general partners",
"pageInformation": "WELSH - If the partnership has more than one general partner, you'll add them one at a time."
},

"limitedPartnerChoicePage" : {
"isPersonOrLegalEntity" : "WELSH - Is the limited partner a person or a legal entity?",
"isPersonOrLegalEntityHint" : "WELSH - You can add more later.",
"person" : "WELSH - A person",
"legalEntity" : "WELSH - A legal entity"
},

"limitedPartnersPage": {
"title": "WELSH - You now need to tell us about the limited partners",
"pageInformation": "WELSH - If the partnership has more than one limited partner, you'll add them one at a time."
},

"namePage" : {
"title" : "WELSH - Limited partnership name",
"whatIsName" : "WELSH - What is the limited partnership name?",
Expand Down Expand Up @@ -44,6 +72,16 @@
}
},

"pageNotFound" : {
"title" : "WELSH - Page Not Found",
"spelling" : "WELSH - If you typed the web address, check it is spelled correctly.",
"copiedAddress" : "WELSH - If you pasted the web address, check you copied the entire address.",
"movedPage" : "WELSH - If the web address is correct or you selected a link, the page may have moved.",
"goToStartPage" : "WELSH - To register a limited partnership, go to the <a class='govuk-link' href='/limited-partnerships/start'>Register a limited partnership</a> start page."
},

"service" : "WELSH - Register a Limited Partnership",

"startPage" : {
"title" : "Partneriaethau Cyfyngedig yw hyn",
"errorStartAddressMissing" : "Rhowch gyfeiriad"
Expand All @@ -58,41 +96,5 @@
"SPFLP": "WELSH - Private fund limited partnership in Scotland",
"SQP": "WELSH - Scottish qualifying partnership"
}
},

"generalPartnersPage": {
"title": "WELSH - You now need to tell us about the general partners",
"pageInformation": "WELSH - If the partnership has more than one general partner, you'll add them one at a time."
},

"limitedPartnersPage": {
"title": "WELSH - You now need to tell us about the limited partners",
"pageInformation": "WELSH - If the partnership has more than one limited partner, you'll add them one at a time."
},

"generalPartnerChoicePage": {
"title": "WELSH - You now need to tell us about the general partners",
"hint": "WELSH - You can add more later.",
"person": "WELSH - A person",
"legalEntity": "WELSH - A legal entity"
},

"pageNotFound" : {
"title" : "WELSH - Page Not Found",
"spelling" : "WELSH - If you typed the web address, check it is spelled correctly.",
"copiedAddress" : "WELSH - If you pasted the web address, check you copied the entire address.",
"movedPage" : "WELSH - If the web address is correct or you selected a link, the page may have moved.",
"goToStartPage" : "WELSH - To register a limited partnership, go to the <a class='govuk-link' href='/limited-partnerships/start'>Register a limited partnership</a> start page."
},

"errorPage" : {
"title" : "WELSH - Sorry, the service is unavailable",
"tryLater" : "WELSH - You will be able to use the service at a later date.",
"moreInfo" : "WELSH - Email <a class='govuk-link' href='mailto: enquiries@companieshouse.gov.uk'>enquiries@companieshouse.gov.uk</a>, if you need more information."
},

"buttons" : {
"continue" : "WELSH - Continue",
"saveAndContinue" : "WELSH - Save and continue"
}
}
}
74 changes: 38 additions & 36 deletions locales/en/translations.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"buttons" : {
"continue" : "Continue",
"saveAndContinue" : "Save and continue"
},

"emailPage" : {
"whatIsEmail" : "What is the registered email address for the partnership?",
"emailHint" : "Partners must be able to access emails that are sent to this address.",
Expand All @@ -9,13 +14,36 @@
}
},

"errorPage" : {
"title" : "Sorry, the service is unavailable",
"tryLater" : "You will be able to use the service at a later date.",
"moreInfo" : "Email <a class='govuk-link' href='mailto: enquiries@companieshouse.gov.uk'>enquiries@companieshouse.gov.uk</a>, if you need more information."
},

"generalPartnerChoicePage": {
"title": "Is the general partner a person or a legal entity?",
"hint": "You can add more later.",
"person": "A person",
"legalEntity": "A legal entity"
},

"generalPartnersPage": {
"title": "You now need to tell us about the general partners",
"pageInformation": "If the partnership has more than one general partner, you'll add them one at a time."
},

"limitedPartnerChoicePage" : {
"isPersonOrLegalEntity" : "Is the limited partner a person or a legal entity?",
"isPersonOrLegalEntityHint" : "You can add more later.",
"person" : "A person",
"legalEntity" : "A legal entity"
},

"limitedPartnersPage": {
"title": "You now need to tell us about the limited partners",
"pageInformation": "If the partnership has more than one limited partner, you'll add them one at a time."
},

"namePage" : {
"title" : "Limited partnership name",
"whatIsName" : "What is the limited partnership name?",
Expand Down Expand Up @@ -44,6 +72,16 @@
}
},

"pageNotFound" : {
"title" : "Page not found",
"spelling" : "If you typed the web address, check it is spelled correctly.",
"copiedAddress" : "If you pasted the web address, check you copied the entire address.",
"movedPage" : "If the web address is correct or you selected a link, the page may have moved.",
"goToStartPage" : "To register a limited partnership, go to the <a class='govuk-link' href='/limited-partnerships/start'>Register a limited partnership</a> start page."
},

"service" : "Register a Limited Partnership",

"startPage" : {
"title" : "This is Limited Partnerships",
"errorStartAddressMissing" : "Please enter an address"
Expand All @@ -58,41 +96,5 @@
"SPFLP": "Private fund limited partnership in Scotland",
"SQP": "Scottish qualifying partnership"
}
},

"generalPartnersPage": {
"title": "You now need to tell us about the general partners",
"pageInformation": "If the partnership has more than one general partner, you'll add them one at a time."
},

"limitedPartnersPage": {
"title": "You now need to tell us about the limited partners",
"pageInformation": "If the partnership has more than one limited partner, you'll add them one at a time."
},

"generalPartnerChoicePage": {
"title": "Is the general partner a person or a legal entity?",
"hint": "You can add more later.",
"person": "A person",
"legalEntity": "A legal entity"
},

"pageNotFound" : {
"title" : "Page not found",
"spelling" : "If you typed the web address, check it is spelled correctly.",
"copiedAddress" : "If you pasted the web address, check you copied the entire address.",
"movedPage" : "If the web address is correct or you selected a link, the page may have moved.",
"goToStartPage" : "To register a limited partnership, go to the <a class='govuk-link' href='/limited-partnerships/start'>Register a limited partnership</a> start page."
},

"errorPage" : {
"title" : "Sorry, the service is unavailable",
"tryLater" : "You will be able to use the service at a later date.",
"moreInfo" : "Email <a class='govuk-link' href='mailto: enquiries@companieshouse.gov.uk'>enquiries@companieshouse.gov.uk</a>, if you need more information."
},

"buttons" : {
"continue" : "Continue",
"saveAndContinue" : "Save and continue"
}
}
6 changes: 6 additions & 0 deletions src/presentation/test/integration/registration/email.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ describe("Email Page", () => {
const res = await request(app).get(EMAIL_URL + "?lang=en");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${enTranslationText.emailPage.emailUsedFor.title} - ${enTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(enTranslationText.emailPage.whatIsEmail);
expect(res.text).toContain(enTranslationText.emailPage.emailHint);
expect(res.text).toContain(enTranslationText.buttons.saveAndContinue);
Expand All @@ -36,6 +39,9 @@ describe("Email Page", () => {
const res = await request(app).get(EMAIL_URL + "?lang=cy");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${cyTranslationText.emailPage.emailUsedFor.title} - ${cyTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(cyTranslationText.emailPage.whatIsEmail);
expect(res.text).toContain(cyTranslationText.emailPage.emailHint);
expect(res.text).toContain(cyTranslationText.buttons.saveAndContinue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ describe("General Partner Choice Page", () => {
const res = await request(app).get(GENERAL_PARTNER_CHOICE_URL + "?lang=cy");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${cyTranslationText.generalPartnerChoicePage.title } - ${cyTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(
cyTranslationText.generalPartnerChoicePage.title
);
Expand All @@ -44,6 +47,9 @@ describe("General Partner Choice Page", () => {
const res = await request(app).get(GENERAL_PARTNER_CHOICE_URL + "?lang=en");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${enTranslationText.generalPartnerChoicePage.title} - ${enTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(
enTranslationText.generalPartnerChoicePage.title
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ describe("General Partners Page", () => {
const res = await request(app).get(GENERAL_PARTNERS_URL + "?lang=cy");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${cyTranslationText.generalPartnersPage.title } - ${cyTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(cyTranslationText.generalPartnersPage.title);
});

Expand All @@ -31,6 +34,9 @@ describe("General Partners Page", () => {
const res = await request(app).get(GENERAL_PARTNERS_URL + "?lang=en");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${enTranslationText.generalPartnersPage.title } - ${enTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(enTranslationText.generalPartnersPage.title);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ describe("Limited Partner Choice Page", () => {
const res = await request(app).get(LIMITED_PARTNER_CHOICE_URL + "?lang=cy");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${cyTranslationText.limitedPartnerChoicePage.isPersonOrLegalEntity} - ${cyTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(
cyTranslationText.limitedPartnerChoicePage.isPersonOrLegalEntity
);
Expand All @@ -46,6 +49,9 @@ describe("Limited Partner Choice Page", () => {
const res = await request(app).get(LIMITED_PARTNER_CHOICE_URL + "?lang=en");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${enTranslationText.limitedPartnerChoicePage.isPersonOrLegalEntity} - ${enTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(
enTranslationText.limitedPartnerChoicePage.isPersonOrLegalEntity
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ describe("Limited Partners Page", () => {
const res = await request(app).get(LIMITED_PARTNERS_URL + "?lang=cy");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${cyTranslationText.limitedPartnersPage.title} - ${cyTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(cyTranslationText.limitedPartnersPage.title);
});

Expand All @@ -31,6 +34,9 @@ describe("Limited Partners Page", () => {
const res = await request(app).get(LIMITED_PARTNERS_URL + "?lang=en");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${enTranslationText.limitedPartnersPage.title} - ${enTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(enTranslationText.limitedPartnersPage.title);
});
});
24 changes: 24 additions & 0 deletions src/presentation/test/integration/registration/name.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ describe("Name Page", () => {
const res = await request(app).get(NAME_URL + "?lang=cy");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${cyTranslationText.namePage.title} - ${cyTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(cyTranslationText.namePage.title);
expect(res.text).toContain(cyTranslationText.namePage.whatIsName);
expect(res.text).toContain(cyTranslationText.namePage.nameEnding);
Expand All @@ -54,6 +57,9 @@ describe("Name Page", () => {
const res = await request(app).get(NAME_URL + "?lang=en");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${enTranslationText.namePage.title} - ${enTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(enTranslationText.namePage.title);
expect(res.text).toContain(enTranslationText.namePage.whatIsName);
expect(res.text).toContain(enTranslationText.namePage.nameEnding);
Expand All @@ -72,6 +78,9 @@ describe("Name Page", () => {
const res = await request(app).get(NAME_URL + "?lang=cy");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${cyTranslationText.namePage.privateFund.title} - ${cyTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(cyTranslationText.namePage.privateFund.title);
expect(res.text).toContain(
cyTranslationText.namePage.privateFund.nameEnding
Expand All @@ -90,6 +99,9 @@ describe("Name Page", () => {
const res = await request(app).get(NAME_URL + "?lang=en");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${enTranslationText.namePage.privateFund.title} - ${enTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(enTranslationText.namePage.privateFund.title);
expect(res.text).toContain(
enTranslationText.namePage.privateFund.nameEnding
Expand All @@ -109,6 +121,9 @@ describe("Name Page", () => {
const res = await request(app).get(NAME_URL + "?lang=cy");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${cyTranslationText.namePage.scottish.title} - ${cyTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(cyTranslationText.namePage.scottish.title);
expect(res.text).toContain(cyTranslationText.namePage.scottish.nameEnding);
expect(res.text).toContain(cyTranslationText.buttons.saveAndContinue);
Expand All @@ -125,6 +140,9 @@ describe("Name Page", () => {
const res = await request(app).get(NAME_URL + "?lang=en");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${enTranslationText.namePage.scottish.title} - ${enTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(enTranslationText.namePage.scottish.title);
expect(res.text).toContain(enTranslationText.namePage.scottish.nameEnding);
expect(res.text).toContain(enTranslationText.buttons.saveAndContinue);
Expand All @@ -142,6 +160,9 @@ describe("Name Page", () => {
const res = await request(app).get(NAME_URL + "?lang=cy");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${cyTranslationText.namePage.privateFund.scottish.title} - ${cyTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(
cyTranslationText.namePage.privateFund.scottish.title
);
Expand All @@ -160,6 +181,9 @@ describe("Name Page", () => {
const res = await request(app).get(NAME_URL + "?lang=en");

expect(res.status).toBe(200);
expect(res.text).toContain(
`${enTranslationText.namePage.privateFund.scottish.title} - ${enTranslationText.service} - GOV.UK`
);
expect(res.text).toContain(
enTranslationText.namePage.privateFund.scottish.title
);
Expand Down
Loading

0 comments on commit 8d4f03f

Please sign in to comment.