Skip to content

Commit b1af0b0

Browse files
VIA-306 MD: Add e2e test for vaccines-during-pregnancy page
1 parent 193189e commit b1af0b0

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

e2e/constants.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type VaccinePageName =
1616
| "hib-menc";
1717
type FailurePageName = "sso-failure" | "service-failure" | "not-found";
1818
type SessionPageName = "session-timeout" | "session-logout";
19-
type IndexPageName = "vaccines-for-all-ages" | "vaccine-hub";
19+
type IndexPageName = "vaccines-for-all-ages" | "vaccine-hub" | "vaccines-during-pregnancy";
2020

2121
export type PageName = IndexPageName | VaccinePageName | FailurePageName | SessionPageName | PoliciesPageName;
2222
export type PageDetails = {
@@ -43,6 +43,12 @@ export const AppPageDetails: Record<PageName, PageDetails> = {
4343
title: `Vaccines for all ages - ${NHS_TITLE_SUFFIX}`,
4444
snapshotFilename: "default-vaccines-for-all-ages.png",
4545
},
46+
"vaccines-during-pregnancy": {
47+
url: "/vaccines-during-pregnancy",
48+
heading: "Vaccines during pregnancy",
49+
title: `Vaccines during pregnancy - ${NHS_TITLE_SUFFIX}`,
50+
snapshotFilename: "default-vaccines-during-pregnancy.png",
51+
},
4652

4753
// vaccine pages
4854
"rsv-older-adults": {

src/app/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const VACCINATIONS_HUB_PAGE_ROUTE = "/check-and-book-vaccinations";
22
export const SERVICE_HEADING = "Check and book vaccinations";
33
export const VACCINES_FOR_ALL_AGES_PAGE = "Vaccines for all ages";
4-
export const VACCINES_FOR_PREGNANT_PAGE = "Vaccines during Pregnancy";
4+
export const VACCINES_FOR_PREGNANT_PAGE = "Vaccines during pregnancy";
55
export const NHS_TITLE_SUFFIX = "NHS";
66
export const HUB_FEEDBACK_REFERRER_ID = "hub";
77

src/app/vaccines-during-pregnancy/page.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe("VaccinesForPregnantPeople", () => {
1717
it("should render heading", () => {
1818
render(<VaccinesForPregnant />);
1919

20-
const heading: HTMLElement = screen.getByRole("heading", { name: "Vaccines during Pregnancy", level: 1 });
20+
const heading: HTMLElement = screen.getByRole("heading", { name: "Vaccines during pregnancy", level: 1 });
2121

2222
expect(heading).toBeVisible();
2323
});

0 commit comments

Comments
 (0)