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.

Search cannot find paths with filenames

See original GitHub issue

Current behavior

When searching in the Cypres UI for a file, if the full path is used, Cypress cannot find the file. When just the folder is searched, Cypress can find the files. Also, if just the filename is used as a search parameter, then Cypress can find the test file.

For example

cypress/e2e/spec.cy.js -> will not be found

cypress/e2e/ -> will not find any results

cypress/e2e -> will find the files in the e2e folder

spec.cy.js -> will find all tests with the same name

Desired behavior

Cypress should allow searching with the full path of a file and be able to find any test file if the filename+full relative path is passed as a search parameter.

Test code to reproduce

https://github.com/DanielYang-AT/cypress-test-tiny (this is a fork of the cypress-test-tiny with 0 changes)

  • Run Cypress Open
  • Select e2e testing
  • Open with chrome or electron
  • search for a spec by pasting in cypress/e2e/spec.cy.js
  • no results are found when the example spec should be shown.

Cypress Version

10.2.0

Other

Cypress 9.x.x and below were all able to find the files as expected. This was a change after the upgrade to 10.x.x

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
dmolincommented, Jun 23, 2022

+1 Cypress UI search is completely broken. It ALWAYS defaults to partial matching, so there’s no way I can find tests via a perfect match and that makes it quite useless.

As an example: In my specs tree I’ve a folder “simulations” and a folder “lti”, each containing various .cy files.

If I type “lti” in the UI search box, this will match both the “simulation” folder (it matches both the “l” and “ti” separately) and the “lti” folder (via a complete match). That’s not what 99% of the human beings using a search box expect, at all…

0reactions
tbiethmancommented, Aug 16, 2022

Released in 10.6.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v10.6.0, please open a new issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Find Files that Won't Copy?
3) I've used "dir" to list files and paths before, usually by executing "dir /S /O:D > filename.
Read more >
linux - How can I search a file by its name and partial path?
Is there a simple way to search for that file, without manually cutting into parts its name to provide directory name and file...
Read more >
11 Ways to Fix "The System Cannot Find The Path ...
In Windows Search, type "Command Prompt." · Press and hold Win + I keys to open Settings. · On your computer, open File...
Read more >
Cannot find file path error for dir /b - Copying all file names ...
I tried removing the /b and I got a list of all the files but with other extra data like mode, last time...
Read more >
Cannot find <FileName.PAS> or <FileName.DCU> on the ...
To resolve this error condition, you can copy the file to a directory along the path, remove the file from the list of...
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