Skip to content

Commit 77d9e5b

Browse files
VIA-599 SB & AS Update site header from "Check and book an RSV vaccination" to "Check and book vaccinations".
1 parent c7033b4 commit 77d9e5b

File tree

7 files changed

+13
-9
lines changed

7 files changed

+13
-9
lines changed

e2e/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type PageDetails = {
1212
snapshotFilename: string;
1313
};
1414

15-
const SERVICE_HEADING = "Check and book an RSV vaccination";
15+
const SERVICE_HEADING = "Check and book vaccinations";
1616
const NHS_TITLE_SUFFIX = "NHS";
1717

1818
export const AppPageDetails: Record<PageName, PageDetails> = {

src/app/_components/nhs-frontend/AppHeader.test.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { useBrowserContext } from "@src/app/_components/context/BrowserContext";
22
import AppHeader from "@src/app/_components/nhs-frontend/AppHeader";
3+
import { SERVICE_HEADING } from "@src/app/constants";
34
import { userLogout } from "@src/utils/auth/user-logout";
45
import { mockNHSAppJSFunctions } from "@src/utils/nhsapp-js.test";
56
import { render, screen } from "@testing-library/react";
@@ -18,7 +19,7 @@ jest.mock("@src/utils/auth/user-logout", () => ({
1819
}));
1920

2021
const expectHeaderVisible = (expectedVisible: boolean) => {
21-
const serviceLink: HTMLElement | null = screen.queryByText("Check and book an RSV vaccination");
22+
const serviceLink: HTMLElement | null = screen.queryByText(SERVICE_HEADING);
2223
const logo: HTMLElement | null = screen.queryByRole("img", { name: "NHS" });
2324

2425
if (expectedVisible) {
@@ -60,7 +61,7 @@ describe("AppHeader", () => {
6061
render(<AppHeader />);
6162

6263
const logoAndServiceLink: HTMLElement = screen.getByRole("link", {
63-
name: "NHS Check and book an RSV vaccination homepage",
64+
name: `NHS ${SERVICE_HEADING} homepage`,
6465
});
6566

6667
expect(logoAndServiceLink?.getAttribute("href")).toEqual("/check-and-book-rsv");
@@ -91,7 +92,7 @@ describe("AppHeader", () => {
9192
render(<AppHeader />);
9293

9394
const logoAndServiceLink: HTMLElement = screen.getByRole("link", {
94-
name: "NHS Check and book an RSV vaccination homepage",
95+
name: `NHS ${SERVICE_HEADING} homepage`,
9596
});
9697

9798
expect(logoAndServiceLink.getAttribute("href")).toEqual("#");

src/app/check-and-book-rsv/page.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import VaccinationsHub from "@src/app/check-and-book-rsv/page";
2+
import { SERVICE_HEADING } from "@src/app/constants";
23
import { getContentForVaccine } from "@src/services/content-api/content-service";
34
import { ContentErrorTypes } from "@src/services/content-api/types";
45
import { mockStyledContent } from "@test-data/content-api/data";
@@ -114,6 +115,6 @@ describe("Vaccination Hub Page", () => {
114115
};
115116

116117
const expectHeadingToBeRendered = () => {
117-
expect(queryHeading("Check and book an RSV vaccination", 1)).toBeVisible();
118+
expect(queryHeading(SERVICE_HEADING, 1)).toBeVisible();
118119
};
119120
});

src/app/check-and-book-vaccinations/page.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import VaccinationsHub from "@src/app/check-and-book-vaccinations/page";
2+
import { SERVICE_HEADING } from "@src/app/constants";
23
import { render, screen } from "@testing-library/react";
34

45
describe("Vaccination Hub Page", () => {
@@ -12,7 +13,7 @@ describe("Vaccination Hub Page", () => {
1213
});
1314

1415
const expectHeadingToBeRendered = () => {
15-
expect(queryHeading("Check and book an RSV vaccination", 1)).toBeVisible();
16+
expect(queryHeading(SERVICE_HEADING, 1)).toBeVisible();
1617
};
1718

1819
const queryHeading = (text: string, level: number): HTMLElement | null => {

src/app/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const VACCINATIONS_HUB_PAGE_ROUTE = "/check-and-book-rsv";
2-
export const SERVICE_HEADING = "Check and book an RSV vaccination";
2+
export const SERVICE_HEADING = "Check and book vaccinations";
33
export const VACCINES_FOR_ALL_AGES_PAGE = "Vaccines for all ages";
44
export const NHS_TITLE_SUFFIX = "NHS";
55
export const HUB_FEEDBACK_REFERRER_ID = "hub";

src/app/our-policies/accessibility/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const AccessibilityStatement = () => {
1212

1313
<BackLink />
1414
<MainContent>
15-
<h1>Accessibility statement for Check and book an RSV vaccination</h1>
15+
<h1>Accessibility statement for {SERVICE_HEADING}</h1>
1616

1717
<article>
1818
<section>

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Vaccine from "@src/app/_components/vaccine/Vaccine";
2+
import { SERVICE_HEADING } from "@src/app/constants";
23
import { VaccineTypes } from "@src/models/vaccine";
34
import { getContentForVaccine } from "@src/services/content-api/content-service";
45
import { mockStyledContent } from "@test-data/content-api/data";
@@ -40,7 +41,7 @@ describe("Dynamic vaccine page", () => {
4041

4142
it("has vaccine title", async () => {
4243
await renderDynamicPage("rsv");
43-
expect(document.title).toBe("RSV vaccine for older adults - Check and book an RSV vaccination - NHS");
44+
expect(document.title).toBe(`RSV vaccine for older adults - ${SERVICE_HEADING} - NHS`);
4445
});
4546

4647
it("renders the feedback banner with correct url", async () => {

0 commit comments

Comments
 (0)