Add a "variant: " prefix to variant descriptions in test names #86701
Conversation
|
Gold has detected about 2 new digest(s) on patchset 1. |
|
I'm not sure how to interpret the skia-gold comment/results above - is it indicative of an error? (I see it's on a few other recent PRs though, so might not be related to my change). |
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
I'm not sure what to make of the golden file changes either. Clearly your PR should not be changing golden file results, so I am inclined to ignore them. |
|
This should be safe to merge, it looks like the flutter-gold check has resolved now. There were unchecked images that were merged in accidentally. Confirmed the reported images here are ok. |
91b67e8
into
flutter:master
|
Thanks! |

This tweaks the suffix added to test names when using variants to be slightly more specific (
(variant: foo)instead of just(foo):This is to help editors that have access only to the test name that want to support running tests easily from the editor, but without leaving the regex passed to
flutter test --nameopen-ended, which might match other tests than the one the user expected to run (if they have their own suffix in parens).Right now, VS Code uses a regex like:
But this fails for tests with variants. The goal is to change this regex to something like:
This will still avoid matching other tests with a suffix in parens, but allow the variants to run, fixing #86659.
IntelliJ doesn't currently use the same restrictive regex, but that leads to behaviour that could be considered a bug and is likely to be updated with flutter/flutter-intellij#5650.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.
@gspencergoog @jonahwilliams I'm assuming nobody outside of this repo is relying on the exact format of this suffix, but if you think that might not be correct, please let me know!