Skip to content

Handle file:// in specs of junit reporter - fixes #9352#10035

Merged
christian-bromann merged 3 commits intowebdriverio:mainfrom
nextlevelbeard:fix-junit-cucumber-spec
Mar 23, 2023
Merged

Handle file:// in specs of junit reporter - fixes #9352#10035
christian-bromann merged 3 commits intowebdriverio:mainfrom
nextlevelbeard:fix-junit-cucumber-spec

Conversation

@nextlevelbeard
Copy link
Member

@nextlevelbeard nextlevelbeard commented Mar 22, 2023

Proposed changes

Handle file:// in specs of junit reporter - fixes #9352

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Further comments

Reviewers: @webdriverio/project-committers

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As suggested we should work with url.fileURLToPath() here

@nextlevelbeard
Copy link
Member Author

As suggested we should work with url.fileURLToPath() here

Attempting to use url.fileURLToPath on a relative path such as './features/sample_feature.feature' on macOS leads to TypeError: File URL host must be "localhost" or empty on darwin

Best to simply remove the prefix for the comparison.

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we don't need to make it more complicated as it is, LGTM 👍

@christian-bromann christian-bromann added the PR: Bug Fix 🐛 PRs that contain bug fixes label Mar 22, 2023
@nextlevelbeard
Copy link
Member Author

No write access, ship it at your will

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: Bug Fix 🐛 PRs that contain bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: wdio 8 junit Report is empty when running Cucumber tests

2 participants