Skip to content

Commit 93088d5

Browse files
VIA-302: MD Change the titles of vaccine pages to 'RSV' and 'RSV in pregnancy' + fix the build
1 parent c735abc commit 93088d5

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/app/vaccines/[vaccine]/page.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ describe("Dynamic vaccine page", () => {
4040

4141
it("has vaccine title", async () => {
4242
await renderDynamicPage("rsv");
43-
expect(document.title).toBe("RSV vaccine for older adults - Check and book an RSV vaccination - NHS");
43+
expect(document.title).toBe("RSV - Check and book an RSV vaccination - NHS");
4444
});
4545

4646
it("renders the feedback banner with correct url", async () => {
@@ -68,7 +68,7 @@ describe("Dynamic vaccine page", () => {
6868
it("shows vaccine content when content has loaded", async () => {
6969
const rsvHeading = screen.getByRole("heading", {
7070
level: 1,
71-
name: "RSV vaccine for older adults",
71+
name: "RSV",
7272
});
7373
expect(rsvHeading).toBeVisible();
7474

src/app/vaccines/[vaccine]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ const VaccinePage = async ({ params }: VaccinePageProps) => {
2121

2222
return vaccineType ? (
2323
<>
24-
<title>{`${VaccineInfo[vaccineType].heading} - ${SERVICE_HEADING} - ${NHS_TITLE_SUFFIX}`}</title>
24+
<title>{`${VaccineInfo[vaccineType].newHeading} - ${SERVICE_HEADING} - ${NHS_TITLE_SUFFIX}`}</title>
2525

2626
<FeedbackBanner referrer={vaccine} />
2727
<BackLink />
2828
<MainContent>
29-
<h1 className={"app-dynamic-page-title__heading"}>{`${VaccineInfo[vaccineType].heading}`}</h1>
29+
<h1 className={"app-dynamic-page-title__heading"}>{`${VaccineInfo[vaccineType].newHeading}`}</h1>
3030
<Suspense fallback={<LoadingSpinner />}>
3131
<Vaccine vaccineType={vaccineType} />
3232
</Suspense>

src/models/vaccine.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ const VaccineInfo: Record<VaccineTypes, VaccineDetails> = {
7676
indefiniteArticle: "a",
7777
},
7878
heading: "Td/IPV vaccine (3-in-1 teenage booster)",
79+
newHeading: "", // will be deleted in the future
7980
nhsWebpageLink: new URL("https://www.nhs.uk/vaccinations/td-ipv-vaccine-3-in-1-teenage-booster/"),
8081
nhsHowToGetWebpageLink: new URL(
8182
"https://www.nhs.uk/vaccinations/td-ipv-vaccine-3-in-1-teenage-booster/#how-to-get-it",

0 commit comments

Comments
 (0)