Add back screenshot extension that was temporarily disabled.#21828
Merged
jacob314 merged 2 commits intoflutter:masterfrom Sep 18, 2018
Merged
Add back screenshot extension that was temporarily disabled.#21828jacob314 merged 2 commits intoflutter:masterfrom
jacob314 merged 2 commits intoflutter:masterfrom
Conversation
jacob314
commented
Sep 13, 2018
Contributor
Author
There was a problem hiding this comment.
This method was previously reviewed just without the outer assert block to avoid the code from being included in release builds.
jacob314
commented
Sep 13, 2018
Contributor
Author
There was a problem hiding this comment.
I noticed when I re-applied this that I was missing a test that actually tested end to end instead of just testing the
InspectorService.screenshot method.
jacob314
commented
Sep 13, 2018
Contributor
Author
There was a problem hiding this comment.
If desired I can simplify so that this matcher only works for
ui.Image and Future<ui.Image> and not for Finder.
4029372 to
47cb257
Compare
Add matchesReferenceImage matcher to test that the screenshot extension generates equivalent images to InspectorService.instance.screenshot.
47cb257 to
9227c68
Compare
Hixie
reviewed
Sep 17, 2018
| /// ```dart | ||
| /// await expectLater(find.text('Save'), matchesReferenceImage(referenceImage)); | ||
| /// await expectLater(image, matchesReferenceImage(referenceImage); | ||
| /// await expectLater(imageFuture, matchesReferenceImage(referenceImage)); |
Contributor
There was a problem hiding this comment.
the sample code should explain how to get a referenceImage in the first place
Hixie
reviewed
Sep 17, 2018
| import 'dart:ui' as ui; | ||
|
|
||
| import 'package:flutter_test/flutter_test.dart'; | ||
| import 'package:test/src/frontend/async_matcher.dart'; // ignore: implementation_imports |
Contributor
There was a problem hiding this comment.
we shouldn't import test directly... can you elaborate on why you need this?
Contributor
7e023c9 to
343d253
Compare
hereisderek
added a commit
to hereisderek/flutter
that referenced
this pull request
Sep 18, 2018
…dle-fix * commit '3c22d7b025642abd865160970d39f8c5ba7d3162': clarify how to display an image with a specific density (flutter#21152) Roll engine 9e315e6..2e8e96f (2 commits) (flutter#22005) Make helper and error text separate widgets, make error and counter live region (flutter#21752) Use Xcode legacy build system for iOS builds (flutter#21901) (flutter#21994) Run logcat through shell (flutter#21977) Add back screenshot extension that was temporarily disabled. (flutter#21828)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add matchesReferenceImage matcher to test that the screenshot extension
generates equivalent images to InspectorService.instance.screenshot.