@@ -20,6 +20,18 @@ jest.mock("@src/app/_components/hub/AgeBasedHubCards", () => ({
2020 . mockImplementation ( ( ) => < p data-testid = { "age-based-hub-cards" } > Age based hub cards test</ p > ) ,
2121} ) ) ;
2222
23+ jest . mock ( "@src/app/_components/hub/AtRiskHubContent" , ( ) => ( {
24+ AtRiskHubContent : jest
25+ . fn ( )
26+ . mockImplementation ( ( ) => < p data-testid = { "at-risk-hub-content" } > At risk hub content test</ p > ) ,
27+ } ) ) ;
28+
29+ jest . mock ( "@src/app/_components/hub/PregnancyHubContent" , ( ) => ( {
30+ PregnancyHubContent : jest
31+ . fn ( )
32+ . mockImplementation ( ( ) => < p data-testid = { "pregnancy-hub-content" } > Pregnancy hub content test</ p > ) ,
33+ } ) ) ;
34+
2335const mockAgeGroup = AgeGroup . AGE_25_to_64 ;
2436
2537const mockSessionValue : Partial < Session > = {
@@ -60,20 +72,16 @@ describe("Vaccination Hub Page", () => {
6072 ) ;
6173 } ) ;
6274
63- it ( "renders subheading about pregnancy" , ( ) => {
64- const subheading : HTMLElement = getHeading ( "Vaccines if you're pregnant" , 2 ) ;
65- expect ( subheading ) . toBeVisible ( ) ;
66- } ) ;
75+ it ( "should show at risk expander " , ( ) => {
76+ const atRiskHubContent : HTMLElement = screen . getByTestId ( "at-risk-hub-content" ) ;
6777
68- it ( "renders subtext about pregnancy" , ( ) => {
69- const subtext : HTMLElement = screen . getByText (
70- "Some vaccines are recommended during pregnancy to protect the health of you and your baby." ,
71- ) ;
72- expect ( subtext ) . toBeVisible ( ) ;
78+ expect ( atRiskHubContent ) . toBeVisible ( ) ;
7379 } ) ;
7480
75- it ( "renders vaccines during pregnancy card link" , async ( ) => {
76- expectLinkToBeRendered ( "Vaccines during pregnancy" , "/vaccines-during-pregnancy" ) ;
81+ it ( "should show pregnancy hub content " , ( ) => {
82+ const pregnancyHubContent : HTMLElement = screen . getByTestId ( "pregnancy-hub-content" ) ;
83+
84+ expect ( pregnancyHubContent ) . toBeVisible ( ) ;
7785 } ) ;
7886
7987 it ( "renders vaccines for all ages button" , async ( ) => {
0 commit comments