File tree Expand file tree Collapse file tree 4 files changed +38
-10
lines changed
Expand file tree Collapse file tree 4 files changed +38
-10
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ version: 2
33defaults : &defaults
44 working_directory : ~/project/vue-router
55 docker :
6- - image : circleci/node:10 -browsers
6+ - image : circleci/node:lts -browsers
77
88jobs :
99 install :
Original file line number Diff line number Diff line change @@ -46,6 +46,18 @@ const nwConf = {
4646 }
4747 } ,
4848
49+ firefox : {
50+ desiredCapabilities : {
51+ browser : 'firefox'
52+ }
53+ } ,
54+
55+ safari : {
56+ desiredCapabilities : {
57+ browser : 'safari'
58+ }
59+ } ,
60+
4961 ie : {
5062 desiredCapabilities : {
5163 browser : 'internet explorer' ,
Original file line number Diff line number Diff line change @@ -59,14 +59,12 @@ module.exports = {
5959 browserName : 'firefox' ,
6060 acceptSslCerts : true
6161 }
62- }
62+ } ,
6363
64- // phantomjs: {
65- // desiredCapabilities: {
66- // browserName: 'phantomjs',
67- // javascriptEnabled: true,
68- // acceptSslCerts: true,
69- // },
70- // },
64+ ie : {
65+ desiredCapabilities : {
66+ browser : 'internet explorer'
67+ }
68+ }
7169 }
7270}
Original file line number Diff line number Diff line change @@ -37,8 +37,26 @@ const NW_CONFIG = isLocal
3737 : resolve ( __dirname , './nightwatch.config.js' )
3838
3939// add a configuration by default if not provided
40- if ( args . indexOf ( '-c' ) < - 1 ) {
40+ // add a configuration by default if not provided
41+ if ( args . indexOf ( '-c' ) < 0 ) {
4142 args . push ( '-c' , NW_CONFIG )
43+ // check if multiple envs are provided. The way Nightwatch works
44+ // requires to explicitely provide the conf
45+ const envs = args [ args . indexOf ( '-e' ) + 1 ]
46+ if ( ! envs || envs . indexOf ( ',' ) > - 1 ) {
47+ console . warn (
48+ `Specify the conf with providing multiple browsers:\n$ yarn run test:e2e ${ args . join (
49+ ' '
50+ ) } -c ${ NW_CONFIG } `
51+ )
52+ process . exit ( 1 )
53+ }
54+ } else if ( isLocal ) {
55+ const conf = args [ args . indexOf ( '-c' ) + 1 ]
56+ if ( resolve ( '.' , conf ) !== NW_CONFIG ) {
57+ console . warn ( 'The passed config should be' , NW_CONFIG )
58+ process . exit ( 1 )
59+ }
4260}
4361
4462function adaptArgv ( argv ) {
You can’t perform that action at this time.
0 commit comments