File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,25 @@ test.describe("Navigation", () => {
6767 } ) ;
6868 }
6969
70+ const linksFromPregnancyHub : { linkText : string ; pageName : PageName } [ ] = [
71+ { linkText : "Whooping cough (pertussis) in pregnancy" , pageName : "whooping-cough" } ,
72+ { linkText : "RSV in pregnancy" , pageName : "rsv-pregnancy" } ,
73+ ] ;
74+ for ( const linkFromPregnancyHub of linksFromPregnancyHub ) {
75+ test ( `Link to ${ linkFromPregnancyHub . linkText } and backlink from vaccines-during-pregnancy page` , async ( {
76+ page,
77+ } ) => {
78+ await page . goto ( AppPageDetails [ "vaccines-during-pregnancy" ] . url ) ;
79+
80+ await clickLinkAndExpectPageTitle (
81+ page ,
82+ linkFromPregnancyHub . linkText ,
83+ AppPageDetails [ linkFromPregnancyHub . pageName ] . title ,
84+ ) ;
85+ await clickLinkAndExpectPageTitle ( page , "Back" , AppPageDetails [ "vaccines-during-pregnancy" ] . title ) ;
86+ } ) ;
87+ }
88+
7089 test ( "Skip link navigation" , async ( { page } ) => {
7190 await page . goto ( AppPageDetails [ "vaccine-hub" ] . url ) ;
7291 await page . getByTestId ( "skip-link" ) . focus ( ) ;
You can’t perform that action at this time.
0 commit comments