This allows test environments other than `flutter test` to have a hook
into the test exception reporting. Some test environments, for example,
don't just dump error details to the console, but rather require them
to be reported to a separate server.
Some APIs (such as the ones in package:test) assume you're running
in a child zone of the test zone by attempting to extract information
from the zone values. When we run runAsync() in the root zone, those
zone values are lost, and such API methods don't work.
The solution is to run in a child zone, but with a specification that
says to use the Root zone for task scheduling (both timers and
microtakss).
1. Make goldenFileComparator getter return `null` if it's set to the
uninitialized comparator, which matches the behavior of the setter
(it sets it to the uninitialized comparator if the caller specifies
`null`).
2. Make the uninitialized comparator return trivial success (and print
a message) when asked to compare as opposed to throwing. This ensures
that the comparator will play nicely with live widget bindings
3. Augment documentation
4. Add assert that test doesn't modify the value of `autoUpdateGoldenFiles`
This will allow external tools that wrap our test harness to share the
code that generates the test bootstrap.
This change exposed an issue whereby the LocalGoldenFileComparator
was being too strict in its URI handling, so this changes relaxes
that constraint as well (and adds associated tests).
In order to avoid checking binaries into flutter/flutter,
this comparator can be used to retrieve golden files from
a sibling flutter/goldens repository.
https://github.com/flutter/flutter/issues/16859
This enables support for a `flutter_test_config.dart` configuration file,
which will be discovered and handed the responsibility of running the
test file (thus allowing it to run pre-test setup on a project level).
https://github.com/flutter/flutter/issues/16859
* Add a `matchesGoldenFile()` async matcher that will match
a finder's widget's rasterized image against a golden file.
* Add support for pluggable image comparison backends
* Add a default backend that does simplistic PNG byte
comparison on locally stored golden files.
* Add support for `flutter test --update-goldens`, which will
treat the rasterized image bytes produced during the test
as the new golden bytes and update the golden file accordingly
Still TODO:
* Add support for the `flutter_test_config.dart` test config hook
* Utilize `flutter_test_config.dart` in `packages/flutter/test`
to install a backend that retrieves golden files from a dedicated
`flutter/goldens` repo
https://github.com/flutter/flutter/issues/16859
Various improvements (in particular a new painting fuzzer) to the text manual test.
Some additional documentation.
A fix to Stack to remove an LTR bias: make unpositioned children apply "alignment".
Some more debugging information on RichText and Text.
A fix to the flutter tool to not crash when an RPC call throws an exception.
* only tap on widgets reachable by hit testing
* use FractionalOffset
* added tests
* check finder finds correct widget
* undo unintentional changes
* address comments
* style fix
* add Directionality in test
* fix analysis warning
* Introduce a Directionality inherited widget which sets the ambient LTR vs RTL mode (defaulting to null, which means you cannot use directionality-influenced values).
* Make it possible to configure Padding (including Container.padding and Container.margin) using a directionality-agnostic EdgeInsets variant.
* Provide textDirection and verticalDirection controls on Row and Column to make them RTL-aware.
* Introduce a variant of FractionalOffset based on the EdgeInsets variant. Not yet actually used.
* Fix all the tests that depended on Row defaulting to LTR.
* Add hasAGoodToStringDeep and equalsIgnoringHashCodes methods.
Methods simplify testing of toStringDeep calls and other cases where
methods return strings containing hash codes.
* Bump to test `0.12.20`.
Some test `0.12.20` highlights:
* introduces `expectLater()` that returns a `Future` that completes when the matcher has finished running
* deprecates the `verbose` parameter to `expect()` and the `formatFailure()` (to be removed in `0.13.0`)
Otherwise:
* to keep up w/ the deprecation of `verbose`, removes `widget_tester` API to pass `verbose` flag (alternatively we could suppress the warning for now)
* Update stack manipulation.
* Fix framecount.
* Add find.descendant API to support find descendants of an element by passing the current element and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
Also, make hasOneLineDescription more discerning.
Also, add a test for hasOneLineDescription.
Also, add a test for GravitySimulation, to test the toString.
```dart
expect(x, moreOrLessEquals(0.0));
```
...for those cases where `x` might be 1e-11 or whatever.
Also, be more resilient when dumping the tree from inside the test framework.
Also, add an assert that helped me debug something the other day.
Add an option to provide a custom description to predicate
finders. Without a custom description we default to printing the
predicate function's signature, which is not all that useful.
Use this new option in the driver extension to print the text of the
sought after tooltip.