-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Using migration tool from 9.7.0 -> 12.6.0 does not convert testFiles
to specPattern
correctly
#25947
Comments
Another weird thing that happened during the conversion was that none of my specs were renamed Another note - Coming from v9 with the |
Uh oh, sounds like the logic converting the array to a glob didn't work correctly here. Luckily you were able to fix in manually, but still worth fixing on our end.
This seems weird - all the repos I tested did this correctly. Can you share a minimal reproduction (maybe add |
I'll see if I can narrow down the cause with a minimal example and share that. |
https://github.com/monkpit/testFiles-migration-cypress-error Note: I'm using Steps to reproduce after cloning the project:
@lmiller1990 I hope this will suffice, please let me know if you are not able to reproduce the issue. Thanks! EDIT: If it matters - I ran this on macOS 12.6 and node 16.19.0 |
Right, I reproduced the issue. I think the reason we don't change anything is because if users have a custom Either way, we should handle this properly. I'll take a look at this one today. |
That makes sense for renaming the specs to *.cy.ext.
But, not sure why the glob string is malformed in the resulting specPattern
:(
…On Mon, Feb 27, 2023 at 6:46 PM Lachlan Miller ***@***.***> wrote:
Right, I reproduced the issue. I think the reason we don't change anything
is because if users have a custom testFiles, we don't necessarily know
what extension they are using - it could be `testFiles: "**/*.test.js", or
something other than the default.
Either way, we should handle this properly. I'll take a look at this one
today.
—
Reply to this email directly, view it on GitHub
<#25947 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABINJDIASCE5ICBLQFPOT4DWZVDIBANCNFSM6AAAAAAVHMO3DA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I'll build you a pre-release of the fix #25969 that you can test early, give me an hour or two, thanks! |
Hi @monkpit, want to give this pre-release a try with the fix? Linux + MacOS builds: e02dff7#comments |
Fixed, see #25969 for screenshots. |
Thanks so much! I’ll check it first thing when I get to work.
…On Mon, Feb 27, 2023 at 9:12 PM Lachlan Miller ***@***.***> wrote:
Fixed, see #25969 <#25969> for
screenshots.
—
Reply to this email directly, view it on GitHub
<#25947 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABINJDN5F5N6B2UVRXYUPH3WZVUIJANCNFSM6AAAAAAVHMO3DA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@lmiller1990 looks great! Thank you for the quick fix. I tested it on the repo with the original issue and it is resolved with the pre-release build. |
Great! This will be in the next Cypress release (that's every 2 weeks). But since you've successfully migrated, you should be good to just go with Cypress 12.7 for now. If you have any feedback on Cypress 12 vs Cypress 9 in general, please tell me and I will forward it to the right people. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
My original
cypress.json
containedtestFiles: ['array', 'of', 'globs']
.During the guided migration, this was converted to one big string, but was done incorrectly:
specPattern: 'cypress/e2e/array,of,globs'
-cypress/e2e
is only added to the first glob, and the rest are tacked on with comma separators.This causes 2 problems.
cypress/e2e/...
path prefix was only added to the first path element, so only 1 out of 3 globs would return spec files.Desired behavior
testFiles: [ 'array', 'of', 'globs' ]
should convert tospecPattern: [ 'cypress/e2e/array', 'cypress/e2e/of', 'cypress/e2e/globs' ]
- which seems to be the only way it works correctly (for me, anyways).Test code to reproduce
Convert a project with
cypress.json
that has atestFiles
value that contains an array of glob patterns.Cypress Version
12.6.0
Node version
16 LTS
Operating System
MacOS 12.6
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: