File tree 4 files changed +38
-10
lines changed
4 files changed +38
-10
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ version: 2
3
3
defaults : &defaults
4
4
working_directory : ~/project/vue-router
5
5
docker :
6
- - image : circleci/node:10 -browsers
6
+ - image : circleci/node:lts -browsers
7
7
8
8
jobs :
9
9
install :
Original file line number Diff line number Diff line change @@ -46,6 +46,18 @@ const nwConf = {
46
46
}
47
47
} ,
48
48
49
+ firefox : {
50
+ desiredCapabilities : {
51
+ browser : 'firefox'
52
+ }
53
+ } ,
54
+
55
+ safari : {
56
+ desiredCapabilities : {
57
+ browser : 'safari'
58
+ }
59
+ } ,
60
+
49
61
ie : {
50
62
desiredCapabilities : {
51
63
browser : 'internet explorer' ,
Original file line number Diff line number Diff line change @@ -59,14 +59,12 @@ module.exports = {
59
59
browserName : 'firefox' ,
60
60
acceptSslCerts : true
61
61
}
62
- }
62
+ } ,
63
63
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
+ }
71
69
}
72
70
}
Original file line number Diff line number Diff line change @@ -37,8 +37,26 @@ const NW_CONFIG = isLocal
37
37
: resolve ( __dirname , './nightwatch.config.js' )
38
38
39
39
// 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 ) {
41
42
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
+ }
42
60
}
43
61
44
62
function adaptArgv ( argv ) {
You can’t perform that action at this time.
0 commit comments