add option for bulk-updating screenshots; update screenshots#12797
add option for bulk-updating screenshots; update screenshots#12797yjbanov merged 6 commits intoflutter:masterfrom
Conversation
|
Marking as WIP because it depends on flutter/goldens#51 |
ditman
left a comment
There was a problem hiding this comment.
Thanks for implementing this, very useful!
lib/web_ui/dev/test_platform.dart
Outdated
| p.fromUri(await Isolate.resolvePackageUri( | ||
| Uri.parse('package:test/src/runner/browser/static/favicon.ico'))), | ||
| root: root, | ||
| isUpdateScreenshotGoldens: isUpdateScreenshotGoldens, |
There was a problem hiding this comment.
I know about the styleguide but... shouldUpdateScreenshotGoldens?
There was a problem hiding this comment.
should could mean there's possibility that it won't update anything. How about doUpdateScreenshotGoldens?
There was a problem hiding this comment.
I was trying to limit to [is, has, can, should], but yeah, doUpdateScreenshotGoldens or even just updateScreenshotGoldens sounds a little bit better (to me)
There was a problem hiding this comment.
+1 to bool updateScreenshotGoldens
There was a problem hiding this comment.
updateScreenshotGoldens sounds too much like a method name. I'll go with do. I think anything that sounds like a statement that could be true or false is OK. is, has, can, should, did, was, must, all sound fine to me.
There was a problem hiding this comment.
I draw the line on archaisms though. shallWeUpdateScreenshotGoldens is a no-go :)
There was a problem hiding this comment.
I know my comment isn't helping, it's only adding to the bike-shedding. But doUpdateScreenshotGoldens still sounds like a method name to me.
There was a problem hiding this comment.
wouldYouBeSoKindToUpdateScreenshotGoldens ![]()
lib/web_ui/dev/test_runner.dart
Outdated
| final String destinationAhemTtfPath = | ||
| path.join(environment.webUiRootDir.path, 'lib', 'assets', 'ahem.ttf'); | ||
| sourceAhemTtf.copySync(destinationAhemTtfPath); | ||
| const List<String> _kTestFonts = <String>['ahem.ttf', 'Roboto-Light.ttf']; |
There was a problem hiding this comment.
Roboto Light is quite thin, so this has a small risk of having extra antialias problems (but it'll be a cool test for the fuzzy comparison!)
There was a problem hiding this comment.
For some reason I thought light was the default. Strangely the tests passed locally. I would expect them to fail if I picked a wrong font. Trying Roboto-Regular.
There was a problem hiding this comment.
Of course, it would help if the smoke test used the Flutter engine at all! LOL. Fixing.
|
I switched to a bundled Roboto and to flutter/golden master. Will land on green unless told otherwise. |
| Chrome.version = chromeVersion; | ||
|
|
||
| _copyAhemFontIntoWebUi(); | ||
| _copyTestFontsIntoWebUi(); |
| void main() { | ||
| void main() async { | ||
| debugEmulateFlutterTesterEnvironment = true; | ||
| await webOnlyInitializePlatform(assetManager: WebOnlyMockAssetManager()); |
There was a problem hiding this comment.
(I guess there's some styles in the platform init that causes the color of the font to become red)
|
Landing on red LUCI. The LUCI failure is Android AOT on Windows, which is unrelated to this change. |
[email protected]:flutter/engine.git/compare/1d62160fdb2f...4a849e0 git log 1d62160..4a849e0 --no-merges --oneline 2019-10-08 [email protected] Color matrix doc (flutter/engine#12982) 2019-10-07 [email protected] Use the standard gen_snapshot target unless the platform requires host_targeting_host (flutter/engine#12988) 2019-10-07 [email protected] Roll src/third_party/dart 8413a0db0d..8ba6f7e2eb (39 commits) (flutter/engine#12981) 2019-10-07 [email protected] Unblock Fuchsia roll (flutter/engine#12977) 2019-10-06 [email protected] Update buildroot to pull in ubsan updates. (flutter/engine#12821) 2019-10-05 [email protected] Roll src/third_party/skia 95edac1c9a4a..4c82a9fc83a5 (13 commits) (flutter/engine#12818) 2019-10-05 [email protected] Enable sanitizer build variants. (flutter/engine#12816) 2019-10-05 [email protected] Revert "Adding Link SemanticsFlag (#12453)" (flutter/engine#12815) 2019-10-04 [email protected] Use the x64 host toolchain for x86 target gen_snapshot only on Linux (flutter/engine#12809) 2019-10-04 [email protected] add option for bulk-updating screenshots; update screenshots (flutter/engine#12797) 2019-10-04 [email protected] unbreak unopt fuchsia (flutter/engine#12805) 2019-10-04 [email protected] Build gen_snapshot with a 64-bit host toolchain even if the target platform is 32-bit (flutter/engine#12802) 2019-10-04 [email protected] [flutter_runner] a11y updates, tests! (flutter/engine#12380) 2019-10-04 [email protected] Fix crash in copypixelbuffer (flutter/engine#10326) 2019-10-04 [email protected] Roll src/third_party/dart d6c6d12ebf..8413a0db0d (2 commits) 2019-10-04 [email protected] Roll fuchsia/sdk/core/mac-amd64 from JyZWz... to kwa2O... (flutter/engine#12803) 2019-10-04 [email protected] Adding Link SemanticsFlag (flutter/engine#12453) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
[email protected]:flutter/engine.git/compare/1d62160fdb2f...4a849e0 git log 1d62160..4a849e0 --no-merges --oneline 2019-10-08 [email protected] Color matrix doc (flutter/engine#12982) 2019-10-07 [email protected] Use the standard gen_snapshot target unless the platform requires host_targeting_host (flutter/engine#12988) 2019-10-07 [email protected] Roll src/third_party/dart 8413a0db0d..8ba6f7e2eb (39 commits) (flutter/engine#12981) 2019-10-07 [email protected] Unblock Fuchsia roll (flutter/engine#12977) 2019-10-06 [email protected] Update buildroot to pull in ubsan updates. (flutter/engine#12821) 2019-10-05 [email protected] Roll src/third_party/skia 95edac1c9a4a..4c82a9fc83a5 (13 commits) (flutter/engine#12818) 2019-10-05 [email protected] Enable sanitizer build variants. (flutter/engine#12816) 2019-10-05 [email protected] Revert "Adding Link SemanticsFlag (flutter#12453)" (flutter/engine#12815) 2019-10-04 [email protected] Use the x64 host toolchain for x86 target gen_snapshot only on Linux (flutter/engine#12809) 2019-10-04 [email protected] add option for bulk-updating screenshots; update screenshots (flutter/engine#12797) 2019-10-04 [email protected] unbreak unopt fuchsia (flutter/engine#12805) 2019-10-04 [email protected] Build gen_snapshot with a 64-bit host toolchain even if the target platform is 32-bit (flutter/engine#12802) 2019-10-04 [email protected] [flutter_runner] a11y updates, tests! (flutter/engine#12380) 2019-10-04 [email protected] Fix crash in copypixelbuffer (flutter/engine#10326) 2019-10-04 [email protected] Roll src/third_party/dart d6c6d12ebf..8413a0db0d (2 commits) 2019-10-04 [email protected] Roll fuchsia/sdk/core/mac-amd64 from JyZWz... to kwa2O... (flutter/engine#12803) 2019-10-04 [email protected] Adding Link SemanticsFlag (flutter/engine#12453) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected] on the revert to ensure that a human is aware of the problem. To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
You can now run
felt test --update-screenshot-goldensto update screenshots. This option composes with otherfelt testoptions.