webdriverio / webdriverio

Next-gen browser and mobile automation test framework for Node.js
http://webdriver.io
MIT License
9.04k stars 2.5k forks source link

[🐛 Bug]: v9: Sample feature file not present when creating a new wdio project with cucumber/typescript #13382

Closed giuseppe-salvatore closed 2 months ago

giuseppe-salvatore commented 2 months ago

Have you read the Contributing Guidelines on issues?

WebdriverIO Version

9.0.3

Node.js Version

22.6

Mode

Standalone Mode

Which capabilities are you using?

{
   browser: "chrome"
}

What happened?

The config wizard asks if you want it to auto-generate some test files. After creating a new project based on typescript/cucumber.js configuration, I get an error indicating feature files can't be found in the specified folder path. In fact a feature file doesn't exist in there. Previous versions used to provide that

What is your expected behavior?

Sample test files for cucumber framework are created.

How to reproduce the bug.

yarn create wdio .

Select the following config

? A project named "webdriverio-autoinit" was detected at "/home/workspace/webdriver.io/webdriverio-autoinit", correct? yes ? What type of testing would you like to do? E2E Testing - of Web or Mobile Applications ? Where is your automation backend located? On my local machine ? Which environment you would like to automate? Web - web applications in the browser ? With which browser should we start? ? Which framework do you want to use? Cucumber (https://cucumber.io/) ? Do you want to use Typescript to write tests? yes ? Do you want WebdriverIO to autogenerate some test files? yes ? What should be the location of your feature files? /home/workspace/webdriver.io/webdriverio-autoinit/features/*/.feature ? What should be the location of your step definitions? /home/workspace/webdriver.io/webdriverio-autoinit/features/step-definitions/steps.ts ? Do you want to use page objects (https://martinfowler.com/bliki/PageObject.html)? yes ? Where are your page objects located? /home/workspace/webdriver.io/webdriverio-autoinit/features/pageobjects/*/.ts ? Which reporter do you want to use? ? Do you want to add a plugin to your test setup? ? Would you like to include Visual Testing to your setup? For more information see https://webdriver.io/docs/visual-testing! no ? Do you want to add a service to your test setup? ? Do you want me to run npm install no

Then run

yarn wdio

Relevant log output

yarn run v1.22.22
warning package.json: No license field
$ wdio run ./wdio.conf.ts
2024-08-16T17:34:43.878Z WARN @wdio/config:ConfigParser: pattern ./features/**/*.feature did not match any file

Execution of 0 workers started at 2024-08-16T17:34:43.880Z

2024-08-16T17:34:43.885Z INFO @wdio/cli:launcher: Run onPrepare hook
2024-08-16T17:34:43.885Z INFO @wdio/utils: Setting up browser driver for: chrome@stable
2024-08-16T17:34:43.890Z INFO @wdio/utils: Setting up browser binaries for: chrome@stable
2024-08-16T17:34:43.962Z INFO webdriver: Using Chromedriver v127.0.6533.119 from cache directory /tmp
2024-08-16T17:34:44.114Z INFO webdriver: Setting up chrome v127.0.6533.119
2024-08-16T17:34:56.376Z WARN @wdio/config:ConfigParser: pattern ./features/**/*.feature did not match any file
2024-08-16T17:34:56.376Z ERROR @wdio/cli:launcher: No specs found to run, exiting with failure
2024-08-16T17:34:56.376Z INFO @wdio/cli:launcher: Run onComplete hook

Spec Files:  0 passed, 0 total (0% completed) in 00:00:12  

2024-08-16T17:34:56.377Z INFO @wdio/local-runner: Shutting down spawned worker
2024-08-16T17:34:56.628Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2024-08-16T17:34:56.628Z INFO @wdio/local-runner: shutting down
error Command failed with exit code 1.

Code of Conduct

Is there an existing issue for this?

christian-bromann commented 2 months ago

Thanks for reporting, I've pushed a fix which is about to be released in v9.0.3

giuseppe-salvatore commented 2 months ago

Hi @christian-bromann, I have just tried 9.0.3 and the fix doesn't seem to be there, this is still an issue

christian-bromann commented 2 months ago

Thanks for proposing a fix for the issue @giuseppe-salvatore , it got merged and will be released with the upcoming version.