@@ -277,15 +277,27 @@ test.describe('Routing - Documentation Pages', () => {
277277 await expect ( anchorsLink ) . toHaveClass ( / f o n t - s e m i b o l d / )
278278 } )
279279
280- test . skip ( 'should handle direct URL to About page' , async ( { page } ) => {
281- // Skip: direct URL routing requires 404.html fallback (only works on GitHub Pages)
282- await page . goto ( '/about' )
280+ test ( 'should handle direct URL to About page' , async ( { page } ) => {
281+ await page . goto ( '/Semantic-Anchors/about' )
283282
284283 // Wait for AsciiDoc content to load and check h1 in content area (not header)
285284 await page . waitForSelector ( '#doc-content h1' , { timeout : 10000 } )
286285 await expect ( page . locator ( '#doc-content h1' ) ) . toContainText ( / A b o u t | W h a t a r e / )
287286 } )
288287
288+ test ( 'should render doc page when visited via trailing-slash URL' , async ( { page } ) => {
289+ // GitHub Pages 301-redirects /workflow → /workflow/ when workflow/index.html
290+ // is served as a directory index. The SPA must handle the trailing-slash
291+ // form or it falls through to the home handler.
292+ await page . goto ( '/Semantic-Anchors/workflow/' )
293+
294+ await page . waitForSelector ( '#doc-content h1' , { timeout : 10000 } )
295+ await expect ( page . locator ( '#doc-content h1' ) ) . toContainText ( / W o r k f l o w / i)
296+
297+ // Card grid (home-only content) must not be rendered on top
298+ await expect ( page . locator ( '.anchor-card' ) ) . toHaveCount ( 0 )
299+ } )
300+
289301 test ( 'should handle browser back button' , async ( { page } ) => {
290302 // Navigate to About via More dropdown
291303 await page . locator ( '#more-menu-toggle' ) . click ( )
0 commit comments