-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Splitting golden file versioning out as an argument of matchesGoldenFile #33880
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
Conversation
| key | ||
| .toString() | ||
| .splitMapJoin( | ||
| RegExp(r'.png'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we know that these will always be .png? What about using the path packages to just split off any extension?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we do the binding for a golden test, we have it write out in png format. See here:
| final ByteData bytes = await image.toByteData(format: ui.ImageByteFormat.png); |
goderbauer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ile (flutter#33880) * Splitting golden file versioning out as an argument of matchesGoldenFile * Fixing description implementation. * Removing unused imports * Removing unused import * Review feedback
Description
This PR adds the optional
versionparameter to thematchesGoldenFilefunction. This is not a breaking change, and maintains testing fidelity with flutter/goldens.The reason for this change is the forthcoming integration of Skia Gold for golden file testing (#33688). This establishes a clean, uniform naming structure for golden file tests, that will work in both systems, past and future, during the interim.
Documentation of this change needs to be done before landing, but not until changes are approved.
Related Issues
Dependent on:
#33865✅Fixes #33813
Tests
I added the following tests:
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?