vitalets / playwright-bdd

BDD testing with Playwright runner
https://vitalets.github.io/playwright-bdd/
MIT License
287 stars 33 forks source link

Bug: Cucumber reporter accesses non-existent file when placing playwright-bdd specific files inside subfolder #161

Closed leimer closed 3 months ago

leimer commented 3 months ago

Given

Example project as basis, but playwright specific files moved into a subfolder.

When npm test

Then

╰─❯ npm test
> playwright-bdd-example@0.1.0 test
> npx bddgen --config subfolder/playwright.config.ts && npx playwright test --config subfolder/playwright.config.ts

Running 1 test using 1 worker
  1 passed (864ms)
Error in reporter [Error: ENOENT: no such file or directory, open 'features/homepage.feature'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'features/homepage.feature'
}

An empty cucumber-report html file is created.

But I expect The cucumberReporter not failing by accessing a non-existing file.

Isolated demo vitalets/playwright-bdd-example#17

Environment

╰─❯ npx bddgen env --config subfolder/playwright.config.ts 
Playwright-bdd environment info:

platform: darwin
node: v20.10.0
playwright-bdd: v6.5.0
@playwright/test: v1.42.1
@cucumber/cucumber: v10.3.1
Playwright config file: subfolder/playwright.config.ts
vitalets commented 3 months ago

Hi @leimer ! Thanks for the report and sorry for delay. I confirm the bug, fixed in dev. Will be a part of the nearest release.

leimer commented 3 months ago

Hi @vitalets, Thanks for taking care :-) We are looking forward to the next release 👍

vitalets commented 3 months ago

Released in v6.5.1. Please re-check on your side and re-open in case of any issues.