File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -30,18 +30,21 @@ const argv = require('yargs')
3030 } )
3131 . demandOption ( 'mode' ) . argv ;
3232
33+ const isLocalRun = ! process . env . DEPLOYURL ;
34+
35+ /** @type {Cypress.ConfigOptions } */
3336const baseConfig = {
34- baseUrl : process . env . DEPLOYURL
35- ? `${ process . env . DEPLOYURL } /${ argv . package } /storybook`
36- : `http://localhost:${ argv . port } ` ,
37+ baseUrl : isLocalRun ? `http://localhost:${ argv . port } ` : `${ process . env . DEPLOYURL } /${ argv . package } /storybook` ,
3738 fixturesFolder : path . join ( __dirname , 'cypress/fixtures' ) ,
3839 integrationFolder : '.' ,
3940 pluginsFile : path . join ( __dirname , 'cypress/plugins/index.js' ) ,
4041 retries : {
4142 runMode : 2 ,
4243 openMode : 0 ,
4344 } ,
44- screenshotOnRunFailure : false ,
45+ // Screenshots go under <pkg>/cypress/screenshots and can be useful to look at after failures in
46+ // local headless runs (especially if the failure is specific to headless runs)
47+ screenshotOnRunFailure : isLocalRun && argv . mode === 'run' ,
4548 // due to https://github.com/cypress-io/cypress/issues/8599 this must point to a path within the package,
4649 // not a relative path into scripts
4750 supportFile : 'e2e/support.js' ,
You can’t perform that action at this time.
0 commit comments