@@ -100,7 +100,9 @@ pwTest.beforeEach(async ({ page }) => {
100100 } )
101101 return
102102 }
103- throw new Error ( `[frontend-smoke] Unhandled API route: ${ route . request ( ) . method ( ) } ${ url . pathname } ` )
103+ throw new Error (
104+ `[frontend-smoke] Unhandled API route: ${ route . request ( ) . method ( ) } ${ url . pathname } `
105+ )
104106 } )
105107 await page . route ( "**/health/**" , async ( route ) => {
106108 const url = new URL ( route . request ( ) . url ( ) )
@@ -111,7 +113,13 @@ pwTest.beforeEach(async ({ page }) => {
111113 body : JSON . stringify ( {
112114 uptime_seconds : 120 ,
113115 task_total : 0 ,
114- task_counts : { queued : 0 , running : 0 , success : 0 , failed : 0 , cancelled : 0 } ,
116+ task_counts : {
117+ queued : 0 ,
118+ running : 0 ,
119+ success : 0 ,
120+ failed : 0 ,
121+ cancelled : 0 ,
122+ } ,
115123 metrics : { requests_total : 1 , rate_limited : 0 } ,
116124 } ) ,
117125 } )
@@ -131,7 +139,9 @@ pwTest.beforeEach(async ({ page }) => {
131139 } )
132140 return
133141 }
134- throw new Error ( `[frontend-smoke] Unhandled health route: ${ route . request ( ) . method ( ) } ${ url . pathname } ` )
142+ throw new Error (
143+ `[frontend-smoke] Unhandled health route: ${ route . request ( ) . method ( ) } ${ url . pathname } `
144+ )
135145 } )
136146 await page . addInitScript ( ( ) => {
137147 window . localStorage . setItem ( "ab_onboarding_done" , "1" )
@@ -142,9 +152,16 @@ pwTest.beforeEach(async ({ page }) => {
142152pwTest ( "@smoke frontend shell and primary navigation" , async ( { page } ) => {
143153 await page . goto ( "/" )
144154
155+ const primaryNavigation = page . getByRole ( "navigation" , {
156+ name : "Primary navigation" ,
157+ } )
145158 await expect ( page . getByRole ( "heading" , { level : 1 , name : "ProofTrail" } ) ) . toBeVisible ( )
146- await expect ( page . getByRole ( "tablist" , { name : "Primary navigation" } ) ) . toBeVisible ( )
147- await expect ( page . getByRole ( "tab" , { name : "Quick Launch" } ) ) . toHaveAttribute ( "aria-selected" , "true" )
159+ await expect ( primaryNavigation ) . toBeVisible ( )
160+ await expect ( primaryNavigation . getByRole ( "tablist" ) ) . toBeVisible ( )
161+ await expect ( page . getByRole ( "tab" , { name : "Quick Launch" } ) ) . toHaveAttribute (
162+ "aria-selected" ,
163+ "true"
164+ )
148165 await expect ( page . getByRole ( "tablist" , { name : "Command categories" } ) ) . toBeVisible ( )
149166 const sidebarToggle = page . getByLabel ( "Collapse parameter rail" )
150167 await expect ( sidebarToggle ) . toHaveAttribute ( "aria-expanded" , "true" )
@@ -160,7 +177,7 @@ pwTest("@smoke frontend shell and primary navigation", async ({ page }) => {
160177 await taskCenterTab . click ( )
161178 await expect ( taskCenterTab ) . toHaveAttribute ( "aria-selected" , "true" )
162179 await expect ( taskCenterTab ) . toHaveAttribute ( "aria-controls" , "app-view-tasks-panel" )
163- const taskCenterPanel = page . locator ( ' section#app-view-tasks-panel' )
180+ const taskCenterPanel = page . locator ( " section#app-view-tasks-panel" )
164181 await expect ( taskCenterPanel ) . toHaveAttribute ( "role" , "tabpanel" )
165182 await expect ( taskCenterPanel ) . toHaveAttribute ( "aria-labelledby" , "console-tab-tasks" )
166183
@@ -181,6 +198,8 @@ pwTest("@smoke frontend shell and primary navigation", async ({ page }) => {
181198 await expect ( flowDraftTab ) . toHaveAttribute ( "aria-selected" , "true" )
182199 await expect ( page . getByRole ( "heading" , { name : "Key outcome and next action" } ) ) . toBeVisible ( )
183200 await expect (
184- page . getByText ( "Advanced workshop (optional): system diagnostics, flow editing, and debugging evidence" )
201+ page . getByText (
202+ "Advanced workshop (optional): system diagnostics, flow editing, and debugging evidence"
203+ )
185204 ) . toBeVisible ( )
186205} )
0 commit comments