Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(e2e nightwatch): allow setting cli config option. #1016

Merged
merged 1 commit into from
Apr 25, 2018

Conversation

aitboudad
Copy link
Contributor

@aitboudad aitboudad commented Mar 20, 2018

Hi,
This allow to run e2e with a custom config file vue-cli-service e2e --config nightwatch.config.js instead of using the internal Nightwatch config.

My use-cases is using e2e nightwatch with a custom integration like nightwatch-cucumber which seems not working with the default behavior.

// nightwatch.config.js
require('nightwatch-cucumber')({}) // is ignored when using the internal Nightwatch config.
module.exports = {
  ...
}

Thanks!

@yyx990803 yyx990803 merged commit e4d67d6 into vuejs:dev Apr 25, 2018
@aitboudad aitboudad deleted the nightwatch branch April 25, 2018 20:54
@ArielleA
Copy link

Hi,

Having the --config file option is great, but doesn't it cause that you eject? I have the same usecase for cucumber but would prefer not to keep the whole nightwatch config in my tree, only the cucumber snippet.

i.e. nightwatch.config.js
require('nightwatch-cucumber')({ cucumberArgs: [ '--require', 'test/e2e/step_definitions', '--require', 'test/e2e/steps', 'features', ], });

@aitboudad
Copy link
Contributor Author

@ArielleA to keep the whole nightwatch config use:

const deepmerge = require('deepmerge');
...

const config = require('@vue/cli-plugin-e2e-nightwatch/nightwatch.config.js');
module.exports = deepmerge(config, {
  ...
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants