File tree 4 files changed +14
-11
lines changed
apps/pigment-css-vite-app/src/pages/fixtures
4 files changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -467,7 +467,7 @@ jobs:
467
467
command : xvfb-run pnpm test:regressions
468
468
- run :
469
469
name : Build packages for fixtures
470
- command : xvfb-run pnpm release:build
470
+ command : pnpm release:build
471
471
- run :
472
472
name : Run visual regression tests using Pigment CSS
473
473
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() {
50
50
routes = routes . map ( ( route ) => route . replace ( baseUrl , '' ) ) ;
51
51
52
52
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
+
53
60
// Use client-side routing which is much faster than full page navigation via page.goto().
54
61
// Could become an issue with test isolation.
55
62
// 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() {
54
54
* @param {string } route
55
55
*/
56
56
async function renderFixture ( route ) {
57
- // Use client-side routing which is much faster than full page navigation via page.goto().
58
57
await page . evaluate ( ( _route ) => {
58
+ // Use client-side routing which is much faster than full page navigation via page.goto().
59
59
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' ;
60
65
} , route ) ;
61
66
62
67
// Move cursor offscreen to not trigger unwanted hover effects.
Original file line number Diff line number Diff line change 7
7
< style >
8
8
body {
9
9
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 */
19
10
}
20
11
</ style >
21
12
</ head >
You can’t perform that action at this time.
0 commit comments