Files
vue-cli/packages/@vue/cli-plugin-e2e-nightwatch/ui.js
RokkieBrown 77fc6d9f62 feat(ui): Add 'config' and 'env' options to nightwatch ui prompts (#1646)
* feat(ui): Add 'config' and 'env' options to nightwatch ui prompts

* feat(ui): Localize 'config' and 'env' option descriptions for nightwatch ui prompts
2018-06-21 17:30:23 +02:00

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)
}
})
}