File tree Expand file tree Collapse file tree
apps/pigment-css-vite-app/src/pages/fixtures Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -467,7 +467,7 @@ jobs:
467467 command : xvfb-run pnpm test:regressions
468468 - run :
469469 name : Build packages for fixtures
470- command : xvfb-run pnpm release:build
470+ command : pnpm release:build
471471 - run :
472472 name : Run visual regression tests using Pigment CSS
473473 command : xvfb-run pnpm test:regressions-pigment-css
Original file line number Diff line number Diff line change @@ -50,6 +50,13 @@ async function main() {
5050 routes = routes . map ( ( route ) => route . replace ( baseUrl , '' ) ) ;
5151
5252 async function renderFixture ( index ) {
53+ await page . evaluate ( ( ) => {
54+ // Playwright hides scrollbar when capturing a screenshot on an element or with fullPage: true.
55+ // When the body has a scrollbar, this causes a brief layout shift. Disable the body overflow
56+ // altogether to prevent this
57+ window . document . body . style . overflow = 'hidden' ;
58+ } ) ;
59+
5360 // Use client-side routing which is much faster than full page navigation via page.goto().
5461 // Could become an issue with test isolation.
5562 // If tests are flaky due to global pollution switch to page.goto(route);
Original file line number Diff line number Diff line change @@ -54,9 +54,14 @@ async function main() {
5454 * @param {string } route
5555 */
5656 async function renderFixture ( route ) {
57- // Use client-side routing which is much faster than full page navigation via page.goto().
5857 await page . evaluate ( ( _route ) => {
58+ // Use client-side routing which is much faster than full page navigation via page.goto().
5959 window . muiFixture . navigate ( `${ _route } #no-dev` ) ;
60+
61+ // Playwright hides scrollbar when capturing a screenshot on an element or with fullPage: true.
62+ // When the body has a scrollbar, this causes a brief layout shift. Disable the body overflow
63+ // altogether to prevent this
64+ window . document . body . style . overflow = 'hidden' ;
6065 } , route ) ;
6166
6267 // Move cursor offscreen to not trigger unwanted hover effects.
Original file line number Diff line number Diff line change 77 < style >
88 body {
99 background-color : white;
10- /*
11- Hide scrollbars but keep scrollable. Playwright hides scrollbar when capturing a screenshot on an element
12- or with fullPage: true. When the body has a scrollbar, this causes a brief layout shift.
13- */
14- -ms-overflow-style : none; /* Internet Explorer 10+ */
15- scrollbar-width : none; /* Firefox */
16- }
17- body ::-webkit-scrollbar {
18- display : none; /* Safari and Chrome */
1910 }
2011 </ style >
2112 </ head >
You can’t perform that action at this time.
0 commit comments