- 28 Jul, 2022 1 commit
-
-
Michael Goderbauer authored
-
- 28 Sep, 2021 1 commit
-
-
Greg Spencer authored
This adds a smoke test for every single API example. It also fixes 17 tests that had bugs in them, or were otherwise broken, and even fixes one actual bug in the framework, and one limitation in the framework. The bug in the framework is that NetworkImage's _loadAsync method had await response.drain<List<int>>();, but if the response is null, it will throw a cryptic exception saying that Null can't be assigned to List<int>. The fix was just to use await response.drain<void>(); instead. The limitation is that RelativePositionedTransition takes an Animation<Rect> rect parameter, and if you want to use a RectTween with it, the value emitted there is Rect?, and one of the examples was just casting from Animation<Rect> to Animation<Rect?>, which is invalid, so I modified RelativePositionedTransition to take a Rect? and just use Rect.zero if the rect is null.
-
- 08 Jul, 2021 1 commit
-
-
Alexandre Ardhuin authored
-
- 27 May, 2021 1 commit
-
-
Abhishek Ghaskata authored
-
- 11 Mar, 2021 1 commit
-
-
Jonah Williams authored
-
- 02 Mar, 2021 1 commit
-
-
Michael Goderbauer authored
-
- 27 Jan, 2021 1 commit
-
-
Alexandre Ardhuin authored
-
- 26 Jan, 2021 1 commit
-
-
Sam Rawlins authored
-
- 25 Sep, 2020 1 commit
-
-
Jason Simmons authored
The Dart SDK now requires non-null enum values if the enum is used in an exhaustive switch statement on a non-nullable type. See https://github.com/flutter/flutter/issues/66674
-
- 22 Sep, 2020 1 commit
-
-
Dan Field authored
Remove fake image implementations, add createTestImage to flutter_test
-
- 16 Sep, 2020 1 commit
-
-
Michael R Fairhurst authored
-
- 05 Dec, 2019 1 commit
-
-
Alexandre Ardhuin authored
-
- 27 Nov, 2019 1 commit
-
-
Ian Hickson authored
* Update project.pbxproj files to say Flutter rather than Chromium Also, the templates now have an empty organization so that we don't cause people to give their apps a Flutter copyright. * Update the copyright notice checker to require a standard notice on all files * Update copyrights on Dart files. (This was a mechanical commit.) * Fix weird license headers on Dart files that deviate from our conventions; relicense Shrine. Some were already marked "The Flutter Authors", not clear why. Their dates have been normalized. Some were missing the blank line after the license. Some were randomly different in trivial ways for no apparent reason (e.g. missing the trailing period). * Clean up the copyrights in non-Dart files. (Manual edits.) Also, make sure templates don't have copyrights. * Fix some more ORGANIZATIONNAMEs
-
- 09 Nov, 2019 1 commit
-
-
Ian Hickson authored
-
- 01 Oct, 2018 1 commit
-
-
Alexandre Ardhuin authored
-
- 12 Sep, 2018 1 commit
-
-
Alexandre Ardhuin authored
* enable lint unnecessary_new * fix tests * fix tests * fix tests
-
- 21 Jun, 2018 1 commit
-
-
Sam Rawlins authored
* Bump mockito to 3.0.0-beta * Few fixes * fix test * Bump image * Fix * New packages update * With matcher pinned * No more typed
-
- 19 Jun, 2018 1 commit
-
-
Greg Spencer authored
-
- 28 Mar, 2018 1 commit
-
-
Alexander Aprelev authored
* Revert "Revert "Move mockito to 3.0.0-alpha. (#15949)" (#15979)" This reverts commit e59651f9. * More thenReturn to thenAnswer when mocking Futures * Revert "More thenReturn to thenAnswer when mocking Futures" This reverts commit 194d2cf41754ad171efd6bb5898cf73bce5a75ab as we are reverting engine roll. * Revert "Revert "More thenReturn to thenAnswer when mocking Futures"" This reverts commit 52c9e96b304b220f66d78a252fccea0c8e0ef24c. * Add dependency override * Fix issue
-
- 27 Mar, 2018 2 commits
-
-
Alexander Aprelev authored
This reverts commit a7e62258 as there are failing tests.
-
Alexander Aprelev authored
* Move mockito to 3.0.0-alpha. This is needed so it matches mockito version used internally. * Pick up +2 for the fixes * Fix whenReturn in fuchsia_remote_debug_protocol * more thenReturn becomes thenAnswer * more thenReturn becomes thenAnswer * more thenReturn becomes thenAnswer
-
- 22 Mar, 2018 2 commits
-
-
Jonah Williams authored
* use HttpOverrides and dart:io HttpClient in flutter * add missing package:http dependency * update flutter packages and remove comment about createHttpClient from flutter_test * move byte loading logic to common class, move string parsing logic to base class * addAll doesn't work for a Uint8List * use bytes.setRange * undo addition to hello_world * add newline to end of binding.dart * and a newline for hello world * refactor to function and add tests * address comments on unknown length case * alignment * sort alaphabetically * rename convertResponse to consolidateClientHttpClientResponseBytes. Add header * fix alignment in test
-
Alexandre Ardhuin authored
-
- 07 Dec, 2017 1 commit
-
-
Ian Hickson authored
This allows the scheduler library to depend on the services library and the painting library to depend on the scheduler library without the services library having to depend on the scheduler library. While I was at it I also cleaned up some of the binding logic: the licenses logic can now be overridden (and the test library does so), and the image cache can now be overridden as well.
-
- 04 Dec, 2017 1 commit
-
-
Ian Hickson authored
Somehow the test ended up checking for notification messages at the wrong depth.
-
- 17 Nov, 2017 1 commit
-
-
amirh authored
-
- 22 Oct, 2017 1 commit
-
-
Alexandre Ardhuin authored
-
- 18 May, 2017 1 commit
-
-
mattsarett authored
* Add manual test for color space rendering behavior * Remove unneeded assets * Add test for color demo * Drag up to scroll down
-
- 15 May, 2017 1 commit
-
-
- 12 May, 2017 1 commit
-
-
Ian Hickson authored
-
- 05 Apr, 2017 1 commit
-
-
Ian Hickson authored
This issue is being tracked at: https://github.com/dart-lang/sdk/issues/29230
-
- 04 Mar, 2017 1 commit
-
-
Chris Bracken authored
-
- 16 May, 2016 1 commit
-
-
Ian Hickson authored
This makes it possible to substitute 'flutter run' for 'flutter test' and actually watch a test run on a device. For any test that depends on flutter_test: 1. Remove any import of 'package:test/test.dart'. 2. Replace `testWidgets('...', (WidgetTester tester) {` with `testWidgets('...', (WidgetTester tester) async {` 3. Add an "await" in front of calls to any of the following: * tap() * tapAt() * fling() * flingFrom() * scroll() * scrollAt() * pump() * pumpWidget() 4. Replace any calls to `tester.flushMicrotasks()` with calls to `await tester.idle()`. There's a guarding API that you can use, if you have particularly complicated tests, to get better error messages. Search for TestAsyncUtils.
-
- 29 Apr, 2016 1 commit
-
-
Ian Hickson authored
* Refactor widget test framework Instead of: ```dart test("Card Collection smoke test", () { testWidgets((WidgetTester tester) { ``` ...you now say: ```dart testWidgets("Card Collection smoke test", (WidgetTester tester) { ``` Instead of: ```dart expect(tester, hasWidget(find.text('hello'))); ``` ...you now say: ```dart expect(find.text('hello'), findsOneWidget); ``` Instead of the previous API (exists, widgets, widget, stateOf, elementOf, etc), you now have the following comprehensive API. All these are functions that take a Finder, except the all* properties. * `any()` - true if anything matches, c.f. `Iterable.any` * `allWidgets` - all the widgets in the tree * `widget()` - the one and only widget that matches the finder * `firstWidget()` - the first widget that matches the finder * `allElements` - all the elements in the tree * `element()` - the one and only element that matches the finder * `firstElement()` - the first element that matches the finder * `allStates` - all the `State`s in the tree * `state()` - the one and only state that matches the finder * `firstState()` - the first state that matches the finder * `allRenderObjects` - all the render objects in the tree * `renderObject()` - the one and only render object that matches the finder * `firstRenderObject()` - the first render object that matches the finder There's also `layers' which returns the list of current layers. `tap`, `fling`, getCenter, getSize, etc, take Finders, like the APIs above, and expect there to only be one matching widget. The finders are: * `find.text(String text)` * `find.widgetWithText(Type widgetType, String text)` * `find.byKey(Key key)` * `find.byType(Type type)` * `find.byElementType(Type type)` * `find.byConfig(Widget config)` * `find.byWidgetPredicate(WidgetPredicate predicate)` * `find.byElementPredicate(ElementPredicate predicate)` The matchers (for `expect`) are: * `findsNothing` * `findsWidgets` * `findsOneWidget` * `findsNWidgets(n)` * `isOnStage` * `isOffStage` * `isInCard` * `isNotInCard` Benchmarks now use benchmarkWidgets instead of testWidgets. Also, for those of you using mockers, `serviceMocker` now automatically handles the binding initialization. This patch also: * changes how tests are run so that we can more easily swap the logic out for a "real" mode instead of FakeAsync. * introduces CachingIterable. * changes how flutter_driver interacts with the widget tree to use the aforementioned new API rather than ElementTreeTester, which is gone. * removes ElementTreeTester. * changes the semantics of a test for scrollables because we couldn't convince ourselves that the old semantics made sense; it only worked before because flushing the microtasks after every event was broken. * fixes the flushing of microtasks after every event. * Reindent the tests * Fix review comments
-
- 21 Apr, 2016 1 commit
-
-
Ian Hickson authored
This reorders some classes so that this file makes more sense, and adds a bunch of docs. It also makes the following changes: * Move allElements from Instrumentation to TestWidgets. (Instrumentation is going away.) * Remove findElements. * Rename byElement to byElementPredicate * Rename byPredicate to byWidgetPredicate * Implement _WidgetPredicateFinder so that byWidgetPredicate has good messages * Fix one use of byElementPredicate to use byWidgetPredicate.
-
- 14 Apr, 2016 1 commit
-
-
Yegor authored
-
- 13 Apr, 2016 1 commit
-
-
Ian Hickson authored
...by adding tests to our examples that don't import flutter_test, which pins the relevant dependencies. Also, provide more information when complaining about leaked transient callbacks in tests. Also, make tests display full information when they have an exception, by bypassing the throttling we have for Android logging in tests. Also, make the word wrapping not wrap stack traces if they happen to be included in exception output. Also, fix a leaked transient callback in the checkbox code.
-