-
Notifications
You must be signed in to change notification settings - Fork 300
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
"Attempted to insert a duplicate test item ID" when modifying tests after running them using testGoldens from golden_toolkit #3776
Comments
This looks like it's caused by The package should be updated, but we should not crash in this case. We could use ID formats for groups/tests to avoid colliding like this. |
Looks like this method used to create a group, but was changed in eBay/flutter_glove_box@f1d486c. I've filed a PR for the annotation at eBay/flutter_glove_box#140. |
@DanTup - even without the golden tests being inside the group, we get some console errors. I've just tested my work code after commenting out all the So I think this might be promising. :) |
Sorry, the group wasn't necessary - it's just the code I started with when I triggered it. The important of groups is that the The fix I made in VS Code says that groups and tests always have separate IDs (eg. they are prefixed with If you switch to the pre-release channel noted above, it will resolve the errors. Another option is to modify your source code for |
@moonytoes29 a new version of golden_toolkit was published with the annotation fix. If you can upgrade to that, everything should be good now :-) |
Wish I could. But alongside your simple fix, they've now made that latest version dependent on having SDK >=2.15. Which my project is not!. So I'll have to do a fork to apply just your fix for now. Then look to migrate sooner rather than later. |
Ah, that's a shame. Although if it's just you and not a team, I'd probably just modify the file in the pub cache to have |
Then Test: Run All Tests, wait for results, then try to modify the file (eg. add a new linebreak):
The text was updated successfully, but these errors were encountered: