1. 04 Feb, 2021 1 commit
  2. 25 Nov, 2020 1 commit
  3. 22 Sep, 2020 1 commit
  4. 11 Aug, 2020 1 commit
  5. 28 Jul, 2020 1 commit
    • Michael Goderbauer's avatar
      Restoration Framework (#60375) · 175e5c9a
      Michael Goderbauer authored
      * state restoration
      
      * added example
      
      * typos and analyzer
      
      * whitespace
      
      * more typos
      
      * remove unnecessary import
      
      * whitespace
      
      * fix sample code
      
      * tests for restorationmanager and restorationid
      
      * ++
      
      * typo
      
      * tests for bucket, part1
      
      * rename tests
      
      * more tests
      
      * finished tests for service layer
      
      * remove wrong todo
      
      * ++
      
      * review comments
      
      * tests for Unmanaged and regular scope
      
      * RootRestorationScope tests
      
      * typo
      
      * whitespace
      
      * testing framework
      
      * tests for properties
      
      * last set of tests
      
      * analyzer
      
      * typo
      
      * dan review
      
      * whitespace
      
      * ++
      
      * refactor finalizers
      
      * ++
      
      * ++
      
      * dispose guard
      
      * ++
      
      * ++
      
      * dan review
      
      * add manager assert
      
      * ++
      
      * analyzer
      
      * greg review
      
      * fix typo
      
      * Ian & John review
      
      * ian review
      
      * RestorationID -> String
      
      * revert comment
      
      * Make primitives non-nullable in prep for NNBD
      175e5c9a
  6. 14 May, 2020 1 commit
  7. 27 Nov, 2019 1 commit
    • Ian Hickson's avatar
      License update (#45373) · 449f4a66
      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
      449f4a66
  8. 24 Sep, 2019 1 commit
    • Greg Spencer's avatar
      Add fake keyboard key generation to the testing framework (#40706) · 0e6cb28d
      Greg Spencer authored
      There were four or five different implementations in various tests for sendFakeKeyEvent, which roughly all did the same thing. I was going to add yet another one, and decided that it needed to be generalized and centralized. This replaces those instances with something that just takes a LogicalKeyboardKey so that it's self-documenting, and can be used with multiple platforms.
      
      This adds two functions to widget tester: sendKeyDownEvent and sendKeyUpEvent which simulate key up/down from a physical keyboard. It also adds global functions simulateKeyDownEvent and simulateKeyUpEvent that can be called without a widget tester. All are async functions protected by the async guard.
      0e6cb28d
  9. 13 Sep, 2019 1 commit
  10. 11 Sep, 2019 1 commit
  11. 03 Jun, 2019 3 commits
  12. 05 Feb, 2019 1 commit
  13. 12 Dec, 2018 1 commit
  14. 15 Aug, 2018 1 commit
  15. 07 Aug, 2018 1 commit
    • Greg Spencer's avatar
      Remove Travis configuration from flutter/flutter (#20288) · e60087a1
      Greg Spencer authored
      This removes the final traces of Travis and Appveyor from the Flutter tree.
      
      I've updated the documentation and fixed a couple of places where scripts look for Travis, and eliminated the dart tools runningOnTravis function (which was unused anyhow).
      
      There are places in the flutter script that used to look for the environment variable TRAVIS. We actually do want to continue to detect that we're running on Travis there, since in the plugins repo we still use Travis (for the moment). In any case, it's OK, because the CI environment variable is set on all of the CI bots (Cirrus, Travis, and Appveyor).
      
      FastLane doesn't have a setup_cirrus equivalent to setup_travis, but it actually doesn't matter there either, since it doesn't do Travis-specific things, and it also looks for the CI environment variable.
      e60087a1
  16. 18 May, 2018 1 commit
    • Todd Volkert's avatar
      Add support for custom test error reporters (#17727) · 1808ac33
      Todd Volkert authored
      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.
      1808ac33
  17. 01 May, 2018 1 commit
  18. 30 Apr, 2018 1 commit
    • Todd Volkert's avatar
      Add basic support for golden image file testing (#17094) · e19db89a
      Todd Volkert authored
      * 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
      e19db89a
  19. 26 Feb, 2018 1 commit
  20. 02 Feb, 2018 1 commit
  21. 23 Feb, 2017 1 commit
  22. 07 Feb, 2017 1 commit
  23. 11 Jan, 2017 1 commit
  24. 20 Oct, 2016 1 commit
  25. 16 May, 2016 1 commit
    • Ian Hickson's avatar
      Make it possible to run tests live on a device (#3936) · 32527017
      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.
      32527017
  26. 29 Apr, 2016 1 commit
    • Ian Hickson's avatar
      Refactor the test framework (#3622) · 91dd9699
      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
      91dd9699
  27. 21 Apr, 2016 1 commit
    • Ian Hickson's avatar
      Make the widgets binding reusable. (#3479) · 0e11b0e6
      Ian Hickson authored
      Previously the widgets layer only provided a concrete binding, which
      makes it awkward to extend it compared to other bindings. This moves
      widgets to the same style as the other layers.
      
      In a subsequent patch I'll use this to make the tests layer saner.
      0e11b0e6
  28. 14 Apr, 2016 1 commit
  29. 12 Apr, 2016 1 commit
  30. 21 Feb, 2016 1 commit
    • Adam Barth's avatar
      Add TestGesture · 1484add1
      Adam Barth authored
      This helper makes it easier to write correct tests that involve
      gestures.
      
      Fixes #1855
      1484add1
  31. 03 Feb, 2016 1 commit
  32. 18 Dec, 2015 1 commit
  33. 23 Nov, 2015 1 commit
  34. 08 Aug, 2015 1 commit
  35. 28 Jul, 2015 2 commits
  36. 24 Jul, 2015 1 commit
    • Jim Simon's avatar
      Converted examples to libraries · 3089686e
      Jim Simon authored
      Converted demo launcher example to library
      
      Converted fitness example to library
      
      Converted hello world example to library
      
      Converted mine digger example to library
      
      Converted stocks example to library
      3089686e
  37. 22 Jul, 2015 1 commit