File tree Expand file tree Collapse file tree
packages/tools/visual-tests/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,14 +14,26 @@ test.use({
1414} ) ;
1515
1616const DEFAULT_SNAPSHOT_OPTIONS = {
17+ animations : 'disabled' ,
1718 fullPage : true ,
1819 maxDiffPixelRatio : 0 ,
20+ scale : 'css' , // 'css' or 'device'
21+ timeout : 10000 ,
1922} ;
2023
2124ROUTES . forEach ( ( options , route ) => {
2225 test ( `snapshot for ${ route } ` , async ( { page } ) => {
2326 const hideMenusParam = `${ route . includes ( '?' ) ? '&' : '?' } hideMenus` ;
24- await page . goto ( `/#${ route } ${ hideMenusParam } ` , { waitUntil : 'networkidle' } ) ;
27+ await page . goto ( `/#${ route } ${ hideMenusParam } ` ) ;
28+ await page . waitForLoadState ( 'networkidle' ) ;
29+ await page . addStyleTag ( {
30+ content : `
31+ * {
32+ transition: none !important;
33+ animation: none !important;
34+ }
35+ ` ,
36+ } ) ;
2537 if ( options ?. viewportSize ) {
2638 await page . setViewportSize ( options . viewportSize ) ;
2739 }
You can’t perform that action at this time.
0 commit comments