Closed brunogirin closed 5 years ago
We're hesitant to add additional setups /options like this one to the cli base. Especially for a solution that (at least as far as my personal experience goes) isn't really widely used (a judgement stemming from the fact that I heard/read about this solution once, somewhere, but it's not a topic i come across regularly).
You could just as well write a plugin that augments the nightwatch configthat we set up.
@LinusBorg totally understand that and I would be happy to contribute a plugin. However, I'm very new to Vue and I'm not sure how I would go about creating a plugin that extends the e2e-nightwatch
one. Would it be a case of creating a CLI plugin that has a dependency on @vue/cli-plugin-e2e-nightwatch
and delegates everything to it apart from the configuration?
I have started on a plugin for Cucumber, but it's still in its infancy, as I have encountered multiple problems. https://github.com/karriereat/vue-cli-plugin-e2e-nightwatch-cucumber
I plan on using nightwatch-api, the successor to nightwatch-cucumber, which is deprecated. Nightwatch API and the underlying Nightwatch 1.x don't have stable releases yet, so it will take some time before I can make the plugin usable, even if I find the time to work on it.
@Lorti that looks great, I'll check it out and see if I can make it work with my use case. I saw the shift from nightwatch-cucumber to nightwatch-api, hopefully Nightwatch 1.x will be stable soon and everybody can move forward.
@LinusBorg should I close this issue?
@brunogirin I got the basic setup to work (with pre-defined tests) and will now start looking at generators, so one can write their own tests. After that I’ll have to add options and customization. If you want to chime in, be my guest ;)
vue-cli-plugin-e2e-nightwatch-cucumber now has support for Nightwatch and Cucumber configuration and uses the latest Cucumber (5.0), Nightwatch (1.0) and Nightwatch API (1.0). Any feedback is greatly appreciated ;-)
Closing as a community solution exists.
What problem does this feature solve?
This feature makes it possible to write e2e tests using gherkin feature files in addition to JavaScript.
Using gherkin feature files makes it possible to define e2e tests collaboratively with the non-technical members of a delivery team, in particular product owners and project managers, and contributes to better understanding of final functionality within the team.
What does the proposed API look like?
Addition of a boolean configuration option to cli-plugin-e2e-nightwatch (e.g.
enable-cucumber
). When that option is set, the following two additional packages are installed:A slightly different NightWatch configuration file is used:
A basic feature file is provided in
tests/e2e/features
:And corresponding steps definitions in
tests/e2e/features/step_definitions
(note that NightWatch custom assertion can still be used):The folder
tests/e2e/specs
is removed.E2e tests can then be run as normal: