File tree Expand file tree Collapse file tree 3 files changed +43
-1
lines changed
src/app/check-and-book-vaccinations Expand file tree Collapse file tree 3 files changed +43
-1
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ type PoliciesPageName = "cookies-policy" | "accessibility-statement";
22type VaccinePageName = "rsv-older-adults" | "rsv-pregnancy" | "td-ipv" ;
33type FailurePageName = "sso-failure" | "service-failure" | "not-found" ;
44type SessionPageName = "session-timeout" | "session-logout" ;
5- type IndexPageName = "vaccines-hub" | "vaccines-for-all-ages" ;
5+ type IndexPageName = "vaccines-hub" | "vaccines-for-all-ages" | "multi-vaccines-hub" ;
66
77export type PageName = IndexPageName | VaccinePageName | FailurePageName | SessionPageName | PoliciesPageName ;
88export type PageDetails = {
@@ -23,6 +23,12 @@ export const AppPageDetails: Record<PageName, PageDetails> = {
2323 title : `${ SERVICE_HEADING } - ${ NHS_TITLE_SUFFIX } ` ,
2424 snapshotFilename : "default-hub.png" ,
2525 } ,
26+ "multi-vaccines-hub" : {
27+ url : "/check-and-book-vaccinations" ,
28+ heading : `${ SERVICE_HEADING } ` ,
29+ title : `${ SERVICE_HEADING } - ${ NHS_TITLE_SUFFIX } ` ,
30+ snapshotFilename : "default-multi-vaccines-hub.png" ,
31+ } ,
2632 "vaccines-for-all-ages" : {
2733 url : "/vaccines-for-all-ages" ,
2834 heading : "Vaccines for all ages" ,
Original file line number Diff line number Diff line change 1+ import VaccinationsHub from "@src/app/check-and-book-vaccinations/page" ;
2+ import { render , screen } from "@testing-library/react" ;
3+
4+ describe ( "Vaccination Hub Page" , ( ) => {
5+ beforeEach ( async ( ) => {
6+ render ( VaccinationsHub ( ) ) ;
7+ } ) ;
8+
9+ it ( "renders heading" , async ( ) => {
10+ expectHeadingToBeRendered ( ) ;
11+ } ) ;
12+ } ) ;
13+
14+ const expectHeadingToBeRendered = ( ) => {
15+ expect ( queryHeading ( "Check and book an RSV vaccination" , 1 ) ) . toBeVisible ( ) ;
16+ } ;
17+
18+ const queryHeading = ( text : string , level : number ) : HTMLElement | null => {
19+ return screen . queryByRole ( "heading" , {
20+ name : text ,
21+ level : level ,
22+ } ) ;
23+ } ;
Original file line number Diff line number Diff line change 1+ import { NHS_TITLE_SUFFIX , SERVICE_HEADING } from "@src/app/constants" ;
2+ import React from "react" ;
3+
4+ const VaccinationsHub = ( ) => {
5+ return (
6+ < >
7+ < title > { `${ SERVICE_HEADING } - ${ NHS_TITLE_SUFFIX } ` } </ title >
8+ < h1 className = { "app-dynamic-page-title__heading" } > { SERVICE_HEADING } </ h1 >
9+ </ >
10+ ) ;
11+ } ;
12+
13+ export default VaccinationsHub ;
You can’t perform that action at this time.
0 commit comments