@@ -5,30 +5,31 @@ const SITE_STRING = process.env.CYPRESS_SITE == 'ada' ? 'ada' : 'phy';
5
5
const UPDATE_BASELINE = process . env . CYPRESS_UPDATE_BASELINE == 'true' ;
6
6
7
7
export default defineConfig ( {
8
- component : {
9
- devServer : {
10
- framework : "react" ,
11
- bundler : "webpack" ,
12
- webpackConfig : require ( `./config/webpack.config.${ SITE_STRING } .cypress.js` )
13
- } ,
14
- indexHtmlFile : `cypress/support/component-index-${ SITE_STRING } .html` ,
15
- supportFile : `cypress/support/component-${ SITE_STRING } .tsx` ,
16
- setupNodeEvents ( on , config ) {
17
- initPlugin ( on , config ) ;
18
- on ( 'before:browser:launch' , ( browser , launchOptions ) => {
19
- if ( browser . family === 'chromium' ) {
20
- // Disable smooth scrolling, which can interfere with screenshots
21
- launchOptions . args . push ( '--force-color-profile=srgb' ) ;
22
- launchOptions . args . push ( '--disable-low-res-tiling' ) ;
23
- launchOptions . args . push ( '--disable-smooth-scrolling' ) ;
8
+ component : {
9
+ devServer : {
10
+ framework : "react" ,
11
+ bundler : "webpack" ,
12
+ webpackConfig : require ( `./config/webpack.config.${ SITE_STRING } .cypress.js` )
13
+ } ,
14
+ indexHtmlFile : `cypress/support/component-index-${ SITE_STRING } .html` ,
15
+ supportFile : `cypress/support/component-${ SITE_STRING } .tsx` ,
16
+ setupNodeEvents ( on , config ) {
17
+ initPlugin ( on , config ) ;
18
+ on ( 'before:browser:launch' , ( browser , launchOptions ) => {
19
+ if ( browser . family === 'chromium' ) {
20
+ // Disable smooth scrolling, which can interfere with screenshots
21
+ launchOptions . args . push ( '--force-color-profile=srgb' ) ;
22
+ launchOptions . args . push ( '--disable-low-res-tiling' ) ;
23
+ launchOptions . args . push ( '--disable-smooth-scrolling' ) ;
24
+ }
25
+ return launchOptions ;
26
+ } ) ;
24
27
}
25
- return launchOptions ;
26
- } ) ;
28
+ } ,
29
+ env : {
30
+ pluginVisualRegressionImagesPath : `{spec_path}/__image_snapshots__/${ SITE_STRING } ` ,
31
+ pluginVisualRegressionMaxDiffThreshold : 0 ,
32
+ pluginVisualRegressionUpdateImages : UPDATE_BASELINE ,
33
+ pluginVisualRegressionCreateMissingImages : false ,
27
34
}
28
- } ,
29
- env : {
30
- pluginVisualRegressionImagesPath : `{spec_path}/__image_snapshots__/${ SITE_STRING } ` ,
31
- pluginVisualRegressionMaxDiffThreshold : 0 ,
32
- pluginVisualRegressionUpdateImages : UPDATE_BASELINE ,
33
- }
34
35
} ) ;
0 commit comments