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
This commit is contained in:
RokkieBrown
2018-06-21 17:30:23 +02:00
committed by Guillaume Chau
parent 7d635008ac
commit 77fc6d9f62
2 changed files with 15 additions and 1 deletions

View File

@@ -9,10 +9,22 @@ module.exports = api => {
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)
}
})
}

View File

@@ -613,7 +613,9 @@
"tasks": {
"test": {
"description": "Run e2e tests with nightwatch",
"url": "Run e2e tests against given url instead of auto-starting dev server"
"url": "Run e2e tests against given url instead of auto-starting dev server",
"config": "Use custom nightwatch config file (overrides internals)",
"env": "Comma-delimited browser envs to run in"
}
}
},