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
Playwright typescript cucumber-js stepdefinitions undefined but can navigate to stepdefinations from feature file #2340
Comments
Thanks for all the detail @grf1986 The problem you have here is that both Cucumber and I would suggest you want to use Cucumber as your test runner but still use Playwright as your browser automation tool - this is fine. Try to remove the
In case you're wondering why this works, the various editor plugins tend not to hook into Cucumber directly but use a fairly loose algorithm of looking for calls to functions called |
can you please give me a example i am new to this |
i did the following: `import { Given, When, Then } from "@cucumber/cucumber"; import { TestCase } from "@cucumber/messages"; Given('Navigate to aanvragen app from Appfactory', async function () {
});` Is this what you mean? output: `Warnings:
1 scenario (1 undefined) |
That means that Cucumber does not see your step definitions. Most likely you need amend configuration of the Cucumber and tell it where to look for the You have Feature files and Step definition files. Cucumber needs to know locations of both and you do that using configuration file. All is well documented here: |
You can also try enabling debug mode so you get some feedback about your config and what it finds (or doesn't find) https://github.com/cucumber/cucumber-js/blob/main/docs/debugging.md |
Closing as not an issue with Cucumber. |
Hi all i am having the same issue i did all there has been done here my setup:
project: setup playwright with typescript and cucumber in VScode
issue: i can navigate to stepdefinitions from feature file but when running test with npx cucumber-js src\tests\features
i get:
running test without cucumber work fine
.vscode/settings.json:
feature file:
glue code aka steps.definations:
Package.json:
i am using VSCode plugins see screenshots:
project structure:
please help me i have stayed 48 hours on this issue :(
Originally posted by @grf1986 in #718 (comment)
The text was updated successfully, but these errors were encountered: