1. 03 Jun, 2019 3 commits
  2. 05 Feb, 2019 1 commit
  3. 12 Dec, 2018 1 commit
  4. 15 Aug, 2018 1 commit
  5. 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
  6. 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
  7. 01 May, 2018 1 commit
  8. 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
  9. 26 Feb, 2018 1 commit
  10. 02 Feb, 2018 1 commit
  11. 23 Feb, 2017 1 commit
  12. 07 Feb, 2017 1 commit
  13. 11 Jan, 2017 1 commit
  14. 20 Oct, 2016 1 commit
  15. 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
  16. 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
  17. 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
  18. 14 Apr, 2016 1 commit
  19. 12 Apr, 2016 1 commit
  20. 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
  21. 03 Feb, 2016 1 commit
  22. 18 Dec, 2015 1 commit
  23. 23 Nov, 2015 1 commit
  24. 08 Aug, 2015 1 commit
  25. 28 Jul, 2015 2 commits
  26. 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
  27. 22 Jul, 2015 1 commit
  28. 16 Jul, 2015 1 commit