question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Changes in `[filepart]` and `[filepath]`

See original GitHub issue

Current behavior

I am unable to use the [filepart] or [filepath] placeholders to use step definitions when the test and step definition folders are alongside eachother.

Desired behavior

Ideally either [filepart] would function as it did previously, or a new option would be added that functions like v10, returning:

  • The name of the feature file, minus the extention.
  • The folder above the feature file + the feature file name.

For example, given the test cypress/tests/smoke/smoke.feature, [filepart] would yield:

['smoke', 'smoke/smoke']

Test code to reproduce

More details about the issue, and before/after examples can be found on my Test Repo.

Versions

  • Cypress version: 10.2.0
  • Preprocessor version: 11.3.0
  • Node version: v16.15.1

Checklist

  • I’ve read the FAQ.
  • I’ve read Instructions for logging issues.
  • I’m not using cypress-cucumber-preprocessor@4.3.1 (package name has changed and it is no longer the most recent version, see #689).

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
badeballcommented, Jul 31, 2022

This has been released as v12.0.0.

4reactions
badeballcommented, Jul 19, 2022

That would blow up the directory with step definitions for large projects and cause ambiguity issues for colliding file names. Basically a pretty big step back and not something I’m considering.

What I’ve pretty much settled on in my mind, is to compile the common ancestor paths shared between all spec files and use that as an implicit integration folder, similar to what Cypress already does with some of their stuff. This would revert the changes required when having upgraded to v11.0.0 of the preprocessor, still support everything as before, and allow users to put their hierarchy of step definitions beside the integration folder.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Files uploaded using WinSCP are being moved with . ...
Disable the feature in WinSCP · Click Options > Preferences. · In the Preferences dialog box, click to expand the Transfer node, then...
Read more >
What is File Extension .filepart - Progress Community
Under Enable transfer resume/transfer to temporary filename for, click Disable. 4. Click OK to save the changes.
Read more >
How to get full path of selected file on change of <input ...
but the filePath var contains only name of selected file, not the full path . I searched it on net, but it seems...
Read more >
path/filepath
Package filepath implements utility routines for manipulating filename paths in a way compatible with the target operating system-defined file paths.
Read more >
FilePart.transferTo should accept java.nio.file.Path [SPR- ...
I filed this bug report having specifically http.codec.multipart.FilePart API in mind, but I think that Spring should migrate to java.nio.file.Path in other ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found