badeball / cypress-cucumber-preprocessor

Run cucumber/gherkin-syntaxed specs with Cypress
MIT License
1.31k stars 144 forks source link

@bahmutov/cypress-esbuild-preprocessor not installed with v20.0.5, 'Quick start' guide out of date? #1194

Closed atddkg closed 1 month ago

atddkg commented 1 month ago

Current behavior

I'm unable to follow the 'Quick start' guide to successfully run feature-file tests, having installed...

"@badeball/cypress-cucumber-preprocessor": "^20.0.5"

It no longer appears to automatically install @bahmutov/cypress-esbuild-preprocessor

I get:

Cannot find module '@bahmutov/cypress-esbuild-preprocessor' or its corresponding type declarations.ts(2307)

Desired behavior

'Quick start' guide should lead to users successfully running feature-file tests.

I was previously successful in getting this combination of versions working with the 'Quick start' guide:

"@badeball/cypress-cucumber-preprocessor": "^19.2.0", "@bahmutov/cypress-esbuild-preprocessor": "^2.2.0",

(I believe 19.2.0 automatically installed @bahmutov/cypress-esbuild-preprocessor).

Test code to reproduce

Install the plugin. Try to follow the 'Quick start' guide.

My attempt to resolve

I tried installing @bahmutov/cypress-esbuild-preprocessor separately (npm i cypress @bahmutov/cypress-esbuild-preprocessor esbuild) but in my configuration file, it took issue with passing plugins: [createEsbuildPlugin(config)],

createBundler({
    plugins: [createEsbuildPlugin(config)],
})

I don't know if this is something I should be trying to work around/hack myself or whether I should leave it to the experts, so I'll revert back to using the working combination of versions above.

Let me know if you need any further information.

Thanks

Versions

Checklist

atddkg commented 1 month ago

Hmm, so just installed your plugin version 19.2.0 and it looks like I might be mistaken that @bahmutov/cypress-esbuild-preprocessor gets installed automatically, so maybe the real issue is the latest version of @bahmutov/cypress-esbuild-preprocessor isn't playing nice with your suggested config (re: passing plugins: [createEsbuildPlugin(config)],)...

atddkg commented 1 month ago

For whatever reason, had another go at this after lunch and I no longer have issues with using the latest versions of these preprocessors. Unfortunately, the Cucumber preprocessor keeps choking the feature file syntax, which is a separate matter.