@@ -21,6 +21,11 @@ test('shared header exposes one native Contact link with decorative liquid layer
2121 await expect ( contact . locator ( '.ctw-liquid-contact__plus' ) ) . toHaveAttribute ( 'aria-hidden' , 'true' ) ;
2222 await expect ( contact . locator ( '.ctw-liquid-contact__label' ) ) . toHaveText ( 'Contact' ) ;
2323 await expect ( contact . locator ( 'canvas' ) ) . toHaveCount ( 0 ) ;
24+
25+ const standOut = page . getByRole ( 'navigation' , { name : 'Primary navigation' } )
26+ . getByRole ( 'link' , { name : 'Stand Out' , exact : true } ) ;
27+ await expect ( standOut ) . toHaveCount ( 1 ) ;
28+ await expect ( standOut ) . toHaveAttribute ( 'href' , '/stand-out/' ) ;
2429 }
2530
2631 await page . goto ( '/portfolio/' ) ;
@@ -31,6 +36,15 @@ test('shared header exposes one native Contact link with decorative liquid layer
3136 await expect ( page . locator ( '#about' ) ) . toBeInViewport ( ) ;
3237} ) ;
3338
39+ test ( 'shared header Stand Out link opens the canonical landing page' , async ( { page } ) => {
40+ await page . goto ( '/' ) ;
41+ await page . getByRole ( 'navigation' , { name : 'Primary navigation' } )
42+ . getByRole ( 'link' , { name : 'Stand Out' , exact : true } )
43+ . click ( ) ;
44+ await expect ( page ) . toHaveURL ( / \/ s t a n d - o u t \/ $ / ) ;
45+ await expect ( page ) . toHaveTitle ( 'Stand Out — Bring your real business online' ) ;
46+ } ) ;
47+
3448test ( 'fine pointer tracks metal position and clears active state on leave' , async ( { page } ) => {
3549 await page . setViewportSize ( { width : 1440 , height : 900 } ) ;
3650 await page . goto ( '/' ) ;
@@ -287,10 +301,35 @@ for (const width of [390, 320]) {
287301 expect ( box ?. width ?? 0 ) . toBeGreaterThanOrEqual ( 43.99 ) ;
288302 expect ( box ?. height ?? 0 ) . toBeGreaterThanOrEqual ( 43.99 ) ;
289303 expect ( await contact . locator ( '.ctw-liquid-contact__label' ) . evaluate ( ( element ) => element . scrollWidth <= element . clientWidth ) ) . toBe ( true ) ;
304+ const contactCopy = await contact . locator ( '.ctw-liquid-contact__label' ) . evaluate ( ( element ) => ( {
305+ fontSize : Number . parseFloat ( getComputedStyle ( element ) . fontSize ) ,
306+ compactContent : getComputedStyle ( element , '::after' ) . content
307+ } ) ) ;
308+ if ( width === 320 ) {
309+ expect ( contactCopy . fontSize ) . toBe ( 0 ) ;
310+ expect ( contactCopy . compactContent ) . toBe ( '"Talk"' ) ;
311+ } else {
312+ expect ( contactCopy . fontSize ) . toBeGreaterThan ( 0 ) ;
313+ expect ( contactCopy . compactContent ) . toBe ( 'none' ) ;
314+ }
290315 const navigationLabels = await page . getByRole ( 'navigation' , { name : 'Primary navigation' } )
291316 . getByRole ( 'link' )
292317 . evaluateAll ( ( links ) => links . map ( ( link ) => link . getAttribute ( 'aria-label' ) ?? link . textContent . trim ( ) ) ) ;
293- expect ( navigationLabels ) . toEqual ( [ 'Work' , 'Writing' , 'Signals' , 'Contact' ] ) ;
318+ expect ( navigationLabels ) . toEqual ( [ 'Work' , 'Writing' , 'Signals' , 'Stand Out' , 'Contact' ] ) ;
319+ const navigationBoxes = await page . getByRole ( 'navigation' , { name : 'Primary navigation' } )
320+ . getByRole ( 'link' )
321+ . evaluateAll ( ( links ) => links . map ( ( link ) => {
322+ const box = link . getBoundingClientRect ( ) ;
323+ return { name : link . getAttribute ( 'aria-label' ) ?? link . textContent . trim ( ) , width : box . width , height : box . height } ;
324+ } ) ) ;
325+ for ( const target of navigationBoxes ) {
326+ expect ( target . width , target . name ) . toBeGreaterThanOrEqual ( 43.99 ) ;
327+ expect ( target . height , target . name ) . toBeGreaterThanOrEqual ( 43.99 ) ;
328+ }
329+ const standOut = page . getByRole ( 'navigation' , { name : 'Primary navigation' } )
330+ . getByRole ( 'link' , { name : 'Stand Out' , exact : true } ) ;
331+ await expect ( standOut ) . toHaveCSS ( 'white-space' , 'nowrap' ) ;
332+ expect ( await standOut . evaluate ( ( element ) => element . scrollWidth <= element . clientWidth ) ) . toBe ( true ) ;
294333 await context . close ( ) ;
295334 } ) ;
296335}
0 commit comments