Skip to content

Commit 690ced0

Browse files
VIA-304 SB Add Whooping cough (pertussis) page, showing only fallback content for now.
1 parent 47c90b7 commit 690ced0

File tree

6 files changed

+38
-1
lines changed

6 files changed

+38
-1
lines changed

e2e/constants.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ type VaccinePageName =
1111
| "pneumococcal"
1212
| "shingles"
1313
| "menacwy"
14-
| "4-in-1";
14+
| "4-in-1"
15+
| "whooping-cough";
1516
type FailurePageName = "sso-failure" | "service-failure" | "not-found";
1617
type SessionPageName = "session-timeout" | "session-logout";
1718
type IndexPageName = "vaccines-for-all-ages" | "vaccine-hub";
@@ -115,6 +116,12 @@ export const AppPageDetails: Record<PageName, PageDetails> = {
115116
title: `4-in-1 pre-school booster vaccine - ${SERVICE_HEADING} - ${NHS_TITLE_SUFFIX}`,
116117
snapshotFilename: "default-4-in-1.png",
117118
},
119+
"whooping-cough": {
120+
url: "/vaccines/whooping-cough-vaccination",
121+
heading: "Whooping cough vaccination in pregnancy",
122+
title: `Whooping cough vaccination in pregnancy - ${SERVICE_HEADING} - ${NHS_TITLE_SUFFIX}`,
123+
snapshotFilename: "default-whooping-cough.png",
124+
},
118125

119126
// failure pages
120127
"sso-failure": {

e2e/general/navigation.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ test.describe("Navigation", () => {
3131
{ section: AgeSectionTestId.ADULTS, linkText: "Pneumococcal", pageName: "pneumococcal" },
3232

3333
{ section: AgeSectionTestId.PREGNANCY, linkText: "RSV in pregnancy", pageName: "rsv-pregnancy" },
34+
{ section: AgeSectionTestId.PREGNANCY, linkText: "Whooping cough (pertussis)", pageName: "whooping-cough" },
3435

3536
{ section: AgeSectionTestId.CHILDREN, linkText: "Td/IPV (3-in-1 teenage booster)", pageName: "td-ipv" },
3637
{ section: AgeSectionTestId.CHILDREN, linkText: "MenACWY", pageName: "menacwy" },

src/app/vaccines-for-all-ages/page.test.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ describe("VaccinesForAllAges", () => {
4646
assertCardLinkIsPresentInSection("Pneumococcal", "/vaccines/pneumococcal-vaccine", AgeSectionTestId.ADULTS);
4747

4848
assertCardLinkIsPresentInSection("RSV in pregnancy", "/vaccines/rsv-pregnancy", AgeSectionTestId.PREGNANCY);
49+
assertCardLinkIsPresentInSection(
50+
"Whooping cough (pertussis)",
51+
"/vaccines/whooping-cough-vaccination",
52+
AgeSectionTestId.PREGNANCY,
53+
);
4954

5055
assertCardLinkIsPresentInSection(
5156
"Td/IPV (3-in-1 teenage booster)",

src/app/vaccines-for-all-ages/page.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ const VaccinesForAllAges = (): JSX.Element => {
3939
title={`${VaccineInfo[VaccineType.RSV_PREGNANCY].cardLinkTitle}`}
4040
link={`/vaccines/${VaccineInfo.RSV_PREGNANCY.urlPath}`}
4141
/>
42+
<CardLink
43+
title={`${VaccineInfo[VaccineType.WHOOPING_COUGH].cardLinkTitle}`}
44+
link={`/vaccines/${VaccineInfo.WHOOPING_COUGH.urlPath}`}
45+
/>
4246
</ul>
4347

4448
<h2 className="nhsuk-heading-s">Vaccines for children aged 1 to 15</h2>

src/models/vaccine.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ enum VaccineType {
1717
SHINGLES = "SHINGLES",
1818
MENACWY = "MENACWY",
1919
VACCINE_4_IN_1 = "VACCINE_4_IN_1",
20+
WHOOPING_COUGH = "WHOOPING_COUGH",
2021
}
2122

2223
export type VaccineDetails = {
@@ -239,6 +240,24 @@ const VaccineInfo: Record<VaccineType, VaccineDetails> = {
239240
cacheFilename: "4-in-1-preschool-booster-vaccine.json" as Filename,
240241
nboPath: "4-in-1-preschool-booster-vaccine" as UrlPathFragment,
241242
},
243+
[VaccineType.WHOOPING_COUGH]: {
244+
urlPath: "whooping-cough-vaccination" as UrlPathFragment,
245+
displayName: {
246+
titleCase: "Whooping cough vaccination in pregnancy",
247+
midSentenceCase: "whooping cough vaccination",
248+
indefiniteArticle: "a",
249+
},
250+
heading: "Whooping cough vaccination in pregnancy",
251+
cardLinkTitle: "Whooping cough (pertussis)",
252+
nhsWebpageLink: new URL("https://www.nhs.uk/pregnancy/keeping-well/whooping-cough-vaccination/"),
253+
nhsHowToGetWebpageLink: new URL(
254+
"https://www.nhs.uk/pregnancy/keeping-well/whooping-cough-vaccination/#how-to-get-it",
255+
),
256+
personalisedEligibilityStatusRequired: false,
257+
contentPath: "pregnancy/keeping-well/whooping-cough-vaccination" as UrlPathFragment,
258+
cacheFilename: "whooping-cough-vaccination.json" as Filename,
259+
nboPath: "whooping-cough-vaccination" as UrlPathFragment,
260+
},
242261
};
243262

244263
const vaccineUrlPathToVaccineType = new Map<UrlPathFragment, VaccineType>();

src/services/content-api/parsers/content-styling-service.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ const styleHowToGetSection: Record<VaccineType, (section: VaccinePageSection, fr
136136
[VaccineType.SHINGLES]: styleSection,
137137
[VaccineType.MENACWY]: styleSection,
138138
[VaccineType.VACCINE_4_IN_1]: styleSection,
139+
[VaccineType.WHOOPING_COUGH]: styleSection,
139140
};
140141

141142
const getStyledContentForVaccine = async (

0 commit comments

Comments
 (0)