@@ -53,10 +53,13 @@ export default defineConfig({
5353 maxDiffPixelRatio : 0 ,
5454 } ,
5555 } ,
56- // chromium is the source of truth for visual snapshots — those specs
57- // self-skip on firefox/webkit via `test.skip(browserName !== 'chromium')`.
58- // firefox/webkit cover structural, a11y, JSON-LD, and link tests so we
59- // catch browser-specific CSS/JS regressions cheaply.
56+ // chromium is the source of truth for desktop visual snapshots — those
57+ // specs self-skip on firefox/webkit via grepInvert. firefox/webkit cover
58+ // structural, a11y, JSON-LD, and link tests so we catch browser-specific
59+ // CSS/JS regressions cheaply. mobile-chromium runs the whole suite at a
60+ // Pixel 7 viewport so the @media (max-width: 640px) branch (mobile-search
61+ // hoist) is regression-tested. tests/mobile.spec.ts is mobile-only and
62+ // contains the breakpoint-specific assertions + a mobile-only screenshot.
6063 projects : [
6164 {
6265 name : 'chromium' ,
@@ -65,6 +68,7 @@ export default defineConfig({
6568 viewport : { width : 1280 , height : 800 } ,
6669 deviceScaleFactor : 1 ,
6770 } ,
71+ testIgnore : / m o b i l e \. s p e c \. t s / ,
6872 } ,
6973 {
7074 name : 'firefox' ,
@@ -73,6 +77,7 @@ export default defineConfig({
7377 viewport : { width : 1280 , height : 800 } ,
7478 } ,
7579 grepInvert : / v i s u a l : / ,
80+ testIgnore : / m o b i l e \. s p e c \. t s / ,
7681 } ,
7782 {
7883 name : 'webkit' ,
@@ -81,6 +86,17 @@ export default defineConfig({
8186 viewport : { width : 1280 , height : 800 } ,
8287 } ,
8388 grepInvert : / v i s u a l : / ,
89+ testIgnore : / m o b i l e \. s p e c \. t s / ,
90+ } ,
91+ {
92+ name : 'mobile-chromium' ,
93+ use : {
94+ ...devices [ 'Pixel 7' ] ,
95+ } ,
96+ // Skip desktop visual snapshots — those expect 1280px viewport and
97+ // their baselines are platform-keyed without a mobile axis. The
98+ // `mobile snapshot:` prefix in mobile.spec.ts bypasses this filter.
99+ grepInvert : / v i s u a l : / ,
84100 } ,
85101 ] ,
86102 webServer : {
0 commit comments