mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-17 21:00:03 -06:00
* feat(ui): Add 'config' and 'env' options to nightwatch ui prompts * feat(ui): Localize 'config' and 'env' option descriptions for nightwatch ui prompts
31 lines
930 B
JavaScript
31 lines
930 B
JavaScript
module.exports = api => {
|
|
api.describeTask({
|
|
match: /vue-cli-service test:e2e/,
|
|
description: 'org.vue.nightwatch.tasks.test.description',
|
|
link: 'https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-e2e-nightwatch#injected-commands',
|
|
prompts: [
|
|
{
|
|
name: 'url',
|
|
type: 'input',
|
|
default: '',
|
|
description: 'org.vue.nightwatch.tasks.test.url'
|
|
}, {
|
|
name: 'config',
|
|
type: 'input',
|
|
default: '',
|
|
description: 'org.vue.nightwatch.tasks.test.config'
|
|
}, {
|
|
name: 'env',
|
|
type: 'input',
|
|
default: 'chrome',
|
|
description: 'org.vue.nightwatch.tasks.test.env'
|
|
}
|
|
],
|
|
onBeforeRun: ({ answers, args }) => {
|
|
if (answers.url) args.push('--url', answers.url)
|
|
if (answers.config) args.push('--config', answers.config)
|
|
if (answers.env) args.push('--env', answers.env)
|
|
}
|
|
})
|
|
}
|