1. 13 Jun, 2016 2 commits
  2. 12 Jun, 2016 1 commit
  3. 09 Jun, 2016 1 commit
  4. 08 Jun, 2016 1 commit
  5. 07 Jun, 2016 2 commits
  6. 03 Jun, 2016 2 commits
  7. 02 Jun, 2016 1 commit
  8. 24 May, 2016 1 commit
  9. 16 May, 2016 3 commits
    • 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
    • Ian Hickson's avatar
      Revert "Rename DefaultTextStyle constructor to explicit (#3920)" (#3930) · c5ff156f
      Ian Hickson authored
      This reverts commit 55f9145e.
      
      Turns out that this commit breaks apps that use the material library,
      because of the _errorTextStyle DefaultTextStyle which has inherit:true.
      Just setting it to false doesn't work, unfortunately, because then you
      hit some sort of issue with merging that text style with others that
      have inherit:true.
      c5ff156f
    • Adam Barth's avatar
      Rename DefaultTextStyle constructor to explicit (#3920) · 55f9145e
      Adam Barth authored
      To make it clear that this constructor requires an explicit style. Also
      throw a descriptive error recommending the inherit constructor for
      styles with the inherit bit set.
      
      Fixes #3842
      55f9145e
  10. 09 May, 2016 1 commit
  11. 07 May, 2016 1 commit
    • Adam Barth's avatar
      Move TextAlign out of TextStyle (#3789) · ee903af0
      Adam Barth authored
      TextAlign applies to a whole paragraph instead of applying to an individual
      text span. This patch moves the property out of TextStyle and into a separate
      property on Text and RichText.
      ee903af0
  12. 04 May, 2016 1 commit
  13. 29 Apr, 2016 2 commits
    • Adam Barth's avatar
      Fix the padding and space for FlatButton and RaisedButton (#3650) · b2fa6c25
      Adam Barth authored
      Instead of incorporating the margin into the button, introduce a ButtonBar
      widget that supplies the proper spacing between the buttons. Also, make these
      buttons more configurable via ButtonTheme so that dialogs can change the
      minWidth and padding of the buttons as required by the spec.
      
      Fixes #1843
      Fixes #3184
      b2fa6c25
    • 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
  14. 21 Apr, 2016 1 commit
    • Ian Hickson's avatar
      Minor widget_tester refactoring and docs (#3472) · c167efca
      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.
      c167efca
  15. 20 Apr, 2016 1 commit
    • Ian Hickson's avatar
      Hide routes from the API when they're not needed. (#3431) · 1b9476c4
      Ian Hickson authored
      The 'routes' table is a point of confusion with new developers. By
      providing a 'home' argument that sets the '/' route, we can delay the
      point at which we teach developers about 'routes' until the point where
      they want to have a second route.
      1b9476c4
  16. 14 Apr, 2016 1 commit
  17. 13 Apr, 2016 1 commit
    • Ian Hickson's avatar
      Fix dependency skew. (#3306) · 7861d029
      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.
      7861d029
  18. 07 Apr, 2016 2 commits
  19. 06 Apr, 2016 2 commits
    • Adam Barth's avatar
      LazyBlock docs and physics · 6fd68597
      Adam Barth authored
      This patch adds dartdoc to LazyBlock. Also, this patch fixes the scrolling
      physics of LazyBlock. Previously, we updated a running simulation only when the
      change in scroll behavior changed the current scroll offset. Now we update
      running simulations every time the behavior changes because the simulation
      might depend on quantities other than the current scroll offset.
      6fd68597
    • Adam Barth's avatar
      Port clients of ScrollableMixedWidgetList to LazyBlock · 40899eb2
      Adam Barth authored
      LazyBlock is going to replace ScrollableMixedWidgetList at some point.
      40899eb2
  20. 01 Apr, 2016 2 commits
  21. 29 Mar, 2016 1 commit
  22. 24 Mar, 2016 1 commit
    • Hixie's avatar
      Support hairline borders · 9fc29dbb
      Hixie authored
      Previously, border with '0' was ambiguous. Sometimes we treated it as
      hairline borders, sometimes as "don't show the border", though even in
      the latter case we did some graphics work sometimes. Now we have an
      explicit BorderStyle.none flag to not draw the border efficiently.
      9fc29dbb
  23. 16 Mar, 2016 1 commit
  24. 14 Mar, 2016 2 commits
  25. 13 Mar, 2016 4 commits
  26. 12 Mar, 2016 2 commits