Search cannot find paths with filenames
See original GitHub issueCurrent 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:
- Created a year ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top GitHub Comments
+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…
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.