question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Documentation about step_definition / vuejs

See original GitHub issue

Do we have somewhere a documentation about the parameters we can set in the package.json file ? I would like to contribute to this.

This afternoon, I had to setup a vue-cli generated app with this cypress preprocessor, and I needed to set the step_definition parameter . I think a lot of people will spend few minutes finding the right parameter to set.

"cypress-cucumber-preprocessor": {
    "step_definitions": "./tests/e2e/specs/"
  }

Maybe we can have a “How to setup cypress-cucumber-preprocessor with VueCLI generated application?”.

What do you think ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
cocoastormcommented, Mar 26, 2019

Hey, just wanted to add something unexpected I ran into.

I’m using the new recommended style. But I couldn’t get the preprocessor to pick up my common reusable step definitions. I finally figured out it was because of @vue/cli configuring cypress within plugins/index.js:

module.exports = (on, config) => {
  // on('file:preprocessor', webpack({
  //  webpackOptions: require('@vue/cli-service/webpack.config'),
  //  watchOptions: {}
  // }))

  // cucumber gherkin
  on('file:preprocessor', cucumber());

  return Object.assign({}, config, {
    fixturesFolder: 'tests/e2e/fixtures',
    integrationFolder: 'tests/e2e/specs',
    screenshotsFolder: 'tests/e2e/screenshots',
    videosFolder: 'tests/e2e/videos',
    supportFile: 'tests/e2e/support/index.js',
  });
};

Whereas the preprocessor parses cypress.json for the integrationFolder value: https://github.com/TheBrainFamily/cypress-cucumber-preprocessor/blob/master/lib/stepDefinitionPath.js#L24

Easy fix/workaround is to have the integrationFolder declared again in cypress.json

{
	"pluginsFile": "tests/e2e/plugins/index.js",
	"integrationFolder": "tests/e2e/specs"
}

Was wondering if this could be documented into the configuration example for @vue/cli 3?

Or if the preprocessor can somehow take in the config object directly? I don’t mind attempting to tackle this in a PR if this is wanted.

Cheers!

1reaction
EmmanuelDemeycommented, Dec 24, 2018

In your link, the documentation is in a “Oldschool/Legacy Cucumber style (please let us know if you decide to use it!)” paragraph. Is it the right place ?

Do you have another syntax to configure the preprocessor ?

(BTW, I am very happy to do the PR after our chat)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation about step_definition / vuejs #129 - GitHub
The proposal is just to make the life of VueJS developers easier. When we setup a VueJS application with the Cypress support (thanks...
Read more >
Introduction - Vue.js
We will cover every little detail in the rest of the documentation. For now, please read along so you can have a high-level...
Read more >
Step Definitions - Cucumber Documentation
A Step Definition is a. Java method. Kotlin function. Scala function. JavaScript function. Ruby block. with an expression that links it to one...
Read more >
BDD Testing with Cypress Cucumber and Vue.js / Vuex
BDD Testing with Cypress Cucumber and Vue.js / Vuex - Kyle Cobery - Denver ... but also get built-in documentation and a shared...
Read more >
Cucumber.js | JetBrains Rider Documentation
Position the caret at the step without a definition, press Alt+Enter , and select Create step definition or Create all step definitions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found