Skip to content

Commit 1030f39

Browse files
authored
fix(e2e): shouldn't install webdrivers for unchecked browsers on creation (vuejs#5736)
1 parent de3d062 commit 1030f39

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

packages/@vue/cli/lib/promptModules/__tests__/e2e.spec.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ test('nightwatch', async () => {
5454

5555
const expectedOptions = {
5656
plugins: {
57-
'@vue/cli-plugin-e2e-nightwatch': {}
57+
'@vue/cli-plugin-e2e-nightwatch': {
58+
webdrivers: ['chrome', 'firefox']
59+
}
5860
}
5961
}
6062

@@ -87,7 +89,9 @@ test('webdriverio', async () => {
8789

8890
const expectedOptions = {
8991
plugins: {
90-
'@vue/cli-plugin-e2e-webdriverio': {}
92+
'@vue/cli-plugin-e2e-webdriverio': {
93+
webdrivers: ['chrome', 'firefox']
94+
}
9195
}
9296
}
9397

packages/@vue/cli/lib/promptModules/e2e.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,13 @@ module.exports = cli => {
5858
if (answers.e2e === 'cypress') {
5959
options.plugins['@vue/cli-plugin-e2e-cypress'] = {}
6060
} else if (answers.e2e === 'nightwatch') {
61-
options.plugins['@vue/cli-plugin-e2e-nightwatch'] = {}
61+
options.plugins['@vue/cli-plugin-e2e-nightwatch'] = {
62+
webdrivers: answers.webdrivers
63+
}
6264
} else if (answers.e2e === 'webdriverio') {
63-
options.plugins['@vue/cli-plugin-e2e-webdriverio'] = {}
65+
options.plugins['@vue/cli-plugin-e2e-webdriverio'] = {
66+
webdrivers: answers.webdrivers
67+
}
6468
}
6569
})
6670
}

0 commit comments

Comments
 (0)