1. 29 Apr, 2016 3 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
    • Adam Barth's avatar
      Update engine (#3637) · 5497ba18
      Adam Barth authored
      Turns out there were more clients of the old paragraph API than I expected.
      This patch migrates them to the new API.
      5497ba18
  2. 28 Apr, 2016 2 commits
  3. 27 Apr, 2016 3 commits
  4. 22 Apr, 2016 2 commits
  5. 21 Apr, 2016 5 commits
    • 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
    • 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
    • Ian Hickson's avatar
      Remove stray print from material gallery. (#3463) · 20eefbf5
      Ian Hickson authored
      Makes the tests noisy.
      20eefbf5
    • Adam Barth's avatar
      Add a route table to Material Gallery (#3457) · 248960a7
      Adam Barth authored
      Use the route table to generate the list of screens to test in the smoke test.
      248960a7
    • Hans Muller's avatar
      Gallery Smoke Test (#3446) · 986b0174
      Hans Muller authored
      * Gallery Smoke Test
      986b0174
  6. 20 Apr, 2016 5 commits
  7. 19 Apr, 2016 2 commits
  8. 16 Apr, 2016 2 commits
  9. 15 Apr, 2016 4 commits
    • Yegor's avatar
      [driver] refactor API to finder objects (#3365) · 9ce995f6
      Yegor authored
      9ce995f6
    • Ian Hickson's avatar
      Material Data Tables (#3337) · a91bc0ba
      Ian Hickson authored
      + Add new demo to gallery to show data tables. (This currently doesn't
      use a Card; I'll create a Card version in a subsequent patch.)
      
      + Fix checkbox alignment. It now centers in its box regardless.
      
      + Add Colors.black54.
      
      + Some minor fixes to dartdocs.
      
      + DataTable, DataColumn, DataRow, DataCell
      
      + RowInkWell
      
      + Augment dartdocs of materia/debug.dart.
      
      + DropDownButtonHideUnderline to hide the underline in a drop-down when
        used in a DataTable.
      
      + Add new capabilities to InkResponse to support RowInkWell.
      
      + Augment dartdocs of materia/material.dart.
      
      + Add an assert to catch nested Blocks.
      
      + Fix a crash in RenderBox when you remove an object and an ancestor
        used its baseline. (https://github.com/flutter/flutter/issues/2874)
      
      + Fix (and redocument) RenderBaseline/Baseline.
      
      + Add flex support to IntrinsicColumnWidth.
      
      + Document more stuff on the RenderTable side.
      
      + Fix a bug with parentData handling on RenderTable children.
      
      + Completely rewrite the column width computations. The old logic made
        no sense at all.
      
      + Add dartdocs to widgets/debug.dart.
      
      + Add a toString for TableRow.
      a91bc0ba
    • krisgiesing's avatar
      27715e1d
    • Hans Muller's avatar
      Fix the progress indicator demo (#3367) · f7cf0d97
      Hans Muller authored
      f7cf0d97
  10. 14 Apr, 2016 1 commit
  11. 13 Apr, 2016 4 commits
  12. 12 Apr, 2016 7 commits