File tree Expand file tree Collapse file tree 2 files changed +47
-3
lines changed Expand file tree Collapse file tree 2 files changed +47
-3
lines changed Original file line number Diff line number Diff line change
1
+ module . exports = api => {
2
+ api . describeTask ( {
3
+ match : / v u e - c l i - s e r v i c e t e s t : e 2 e / ,
4
+ description : 'Run e2e tests with `cypress run`' ,
5
+ link : 'https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-e2e-cypress#injected-commands' ,
6
+ prompts : [
7
+ {
8
+ name : 'headless' ,
9
+ type : 'confirm' ,
10
+ default : false ,
11
+ description : 'Run in headless mode without GUI'
12
+ } ,
13
+ {
14
+ name : 'mode' ,
15
+ type : 'list' ,
16
+ default : 'development' ,
17
+ choices : [
18
+ {
19
+ name : 'development' ,
20
+ value : 'development'
21
+ } ,
22
+ {
23
+ name : 'production' ,
24
+ value : 'production'
25
+ } ,
26
+ {
27
+ name : 'test' ,
28
+ value : 'test'
29
+ }
30
+ ] ,
31
+ description : 'Specify the mode the dev server should run in'
32
+ } ,
33
+ {
34
+ name : 'url' ,
35
+ type : 'input' ,
36
+ default : '' ,
37
+ description : 'Run e2e tests against given url instead of auto-starting dev server'
38
+ }
39
+ ] ,
40
+ onBeforeRun : ( { answers, args } ) => {
41
+ if ( answers . headless ) args . push ( '--headless' )
42
+ if ( answers . mode ) args . push ( '--mode' , answers . mode )
43
+ if ( answers . url ) args . push ( '--url' , answers . url )
44
+ }
45
+ } )
46
+ }
Original file line number Diff line number Diff line change @@ -221,9 +221,7 @@ module.exports = api => {
221
221
}
222
222
] ,
223
223
onBeforeRun : ( { answers, args } ) => {
224
- if ( answers . noFix ) {
225
- args . push ( '--no-fix' )
226
- }
224
+ if ( answers . noFix ) args . push ( '--no-fix' )
227
225
}
228
226
} )
229
227
}
You can’t perform that action at this time.
0 commit comments