Skip to content
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

Step definitions not found on Windows (OS path separator issue) #721

Closed
akiver opened this issue May 25, 2022 · 2 comments
Closed

Step definitions not found on Windows (OS path separator issue) #721

akiver opened this issue May 25, 2022 · 2 comments

Comments

@akiver
Copy link

akiver commented May 25, 2022

Current behavior

Hello, I upgraded this project https://github.com/akiver/csgo-map-veto and encountered an issue on Windows only.
On Windows, step definitions are never found because of the file separator which is \ instead of /.

This call never detects the step definitions files https://github.com/badeball/cypress-cucumber-preprocessor/blob/master/lib/step-definitions.ts#L24

As a workaround, I'm running this patch on post-install https://github.com/akiver/csgo-map-veto/blob/main/patches/%40badeball%2Bcypress-cucumber-preprocessor%2B10.0.2.patch.
It replaces all \ chars with /, I'm not sure if it's the right place to do it.

Desired behavior

The step definitions should be found.

Test code to reproduce

It should be reproducible with one of the examples in this project, otherwise, you can try with this project https://github.com/akiver/csgo-map-veto.

  1. Clone https://github.com/akiver/csgo-map-veto
  2. Delete the patch file
  3. yarn
  4. yarn e2e

Versions

  • Cypress version: 9.7.0
  • Preprocessor version: 10.0.2
  • Node version: 16

Thank you

@badeball
Copy link
Owner

badeball commented May 25, 2022

I believe you're hitting this bug in glob. Try pinning glob to 7.2.0 or 7.2.3 or something.

@akiver
Copy link
Author

akiver commented May 25, 2022

Thx! That was the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants