Commit graph

176 commits

Author SHA1 Message Date
Ian Hickson 2a54524337 Fix tests to use Ahem, and helpful changes around that (#9332)
* Fix tests to use Ahem, and helpful changes around that

- Fix fonts that had metric-specific behaviours.

- LiveTestWidgetsFlutterBinding.allowAllFrames has been renamed
  to LiveTestWidgetsFlutterBinding.framePolicy.

- LiveTestWidgetsFlutterBinding now defaults to using a frame policy
  that pumps slightly more frames, to animate the pointer crosshairs.

- Added "flutter run --use-test-fonts" to enable Ahem on devices.

- Changed how idle() works to be more effective in live mode.

- Display the test name in live mode (unless ahem fonts are enabled).

- Added a toString to TextSelectionPoint.

- Style nit fixes.

* Roll engine to get Ahem changes.

* Update tests for dartdoc changes.

* Fix flutter_tools tests
2017-04-12 13:33:02 -07:00
xster 89a7fdfc56 Rename State.config to widget everywhere (#9273)
Rename State.config to State.widget
Rename State.didUpdateConfig to State.didUpdateWidget
Renamed all State subclasses' local variables named config to something else
2017-04-10 18:32:24 -07:00
Ian Hickson 3eb87830e9 Constants! Constants everywhere! (#9286)
Aggressively apply the const lint.
2017-04-07 12:24:32 -07:00
Ian Hickson e355c60124 Add a timeout to pumpAndSettle. (#9195) 2017-04-05 12:27:42 -07:00
Adam Barth 0b31c69963 Make it possible to center the text in a TextField (#9140)
Also, fix an issue where hint text wasn't visible when the
InputDecoration was collapsed.

Fixes #8541
2017-04-01 23:11:18 -07:00
Alexandre Ardhuin 2de61a0853 add @required when there's an assert not null (#9124)
* add @required when there's an assert not null

* address review comments
2017-03-31 18:34:13 +02:00
Ian Hickson d709f18cd2 Do not swallow exceptions in guarded functions. (#9064) 2017-03-30 09:50:30 -07:00
Alexandre Ardhuin 4c530d5e8c prefer_final_fields (#8967) 2017-03-29 21:21:46 +02:00
Adam Barth d443d598c2 Align TextEditingValue and InputValue (#8922)
This patch prepares us to remove InputValue in favor of TextEditingValue.
2017-03-20 17:18:35 -07:00
Adam Barth 142922deb4 Add WidgetTester.hasRunningAnimation (#8886)
Fixes #4017
2017-03-20 13:32:00 -07:00
Adam Barth 5cf04b6141 Rename ImageFit to BoxFit (#8871)
This machinery is useful for arbitrary boxes (e.g., with FittedBox).

Fixes #6463
2017-03-17 15:21:55 -07:00
Mikkel Nygaard Ravn dce4bf8599 Remove old platform messaging API (#8837)
Breaking change: removed deprecated methods of PlatformMessages, leaving only binary messaging there. All other use of platform communication now goes through PlatformMessageChannel and PlatformMethodChannels. Retained use of String and JSON codecs for now.

Companion engine PR: flutter/engine#3482
2017-03-17 11:56:50 +01:00
Alexandre Ardhuin 2166ea5b7f apply partially the upcoming unnecessary_lambdas (#8810) 2017-03-15 23:09:58 +01:00
Alexandre Ardhuin a9ba0e2f88 prefer_initializing_formals (#8797) 2017-03-15 18:30:55 +01:00
Ian Hickson 8eac6cd0da Test API improvements: pumpAndSettle, autogenerate pointer IDs (#8751) 2017-03-13 16:27:15 -07:00
Alexandre Ardhuin 16d800b204 normalize setter format (#8708) 2017-03-10 21:52:30 +01:00
Alexandre Ardhuin c22812e0ea Flutter style guide: Prefer naming the argument to a setter 'value' (#8691) 2017-03-10 09:00:29 +01:00
Ian Hickson 68fb3e4868 Farewell, local fork of the http package. (#8642) 2017-03-07 18:08:36 -08:00
Ian Hickson 944ee24b94 Report GlobalKey duplicates (#8593) 2017-03-07 17:17:02 -08:00
Chris Bracken 895f3e6350 Declare locals final where not reassigned (flutter_test) (#8569) 2017-03-03 17:51:01 -08:00
Phil Quitslund a002e72022 Bump to test 0.12.20. (#8349)
* Bump to test `0.12.20`.

Some test `0.12.20` highlights:
  * introduces `expectLater()`  that returns a `Future` that completes when the matcher has finished running
  * deprecates the `verbose` parameter to `expect()` and the `formatFailure()` (to be removed in `0.13.0`)

Otherwise:
  * to keep up w/ the deprecation of `verbose`, removes `widget_tester` API to pass `verbose` flag (alternatively we could suppress the warning for now)

* Update stack manipulation.

* Fix framecount.
2017-02-23 15:08:25 -08:00
Alexandre Ardhuin 8c043d06de fix lints for directives_ordering rule (#8382) 2017-02-23 13:37:26 -08:00
Alexandre Ardhuin da925c7d71 Replace @checked with covariant (#8300)
Fixes #7734
2017-02-21 09:30:22 -08:00
Todd Volkert c233f38291 Update package:test dependencies to 0.12.18+2 (#8247) 2017-02-17 17:35:11 -08:00
Phil Quitslund c458fb9d2c Bump Dart SDK to 1.23.0-dev.0.0 (#8222)
* ups pinned `test` to `0.12.15+9` (to play nice w/ the latest analyzer)
* integrates `analyzer` with analysis driver defaulting to ON
2017-02-16 16:50:35 -08:00
Hans Muller 2d62d1b88d Test hero midflight reversals (#8161) 2017-02-14 16:03:32 -08:00
Ian Hickson c67575703c Improve testing of the RefreshIndicator widget. (#8111) 2017-02-13 16:31:20 -08:00
Adam Barth 4e95701541 Switch TabBarView to PageView (#7982)
Tabs are now fully driven by slivers.
2017-02-08 14:55:18 -08:00
Hans Muller af587a154f Support for tests that respond to text input (#7915) 2017-02-07 14:54:18 -08:00
zhenqiu1101 47666af54c Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant. (#7944)
* Add find.descendant API to support find descendants of an element by passing the current element and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.

* Add find.descendant API to support find descendants of an element by passing the current element finder and the finder of descendant.
2017-02-07 14:46:29 -08:00
Ian Hickson be7be2b8b6 Test service extensions (#7849)
...and fix bugs that the tests uncovered.

WRITE TEST FIND BUG
2017-02-03 13:55:07 -08:00
Ian Hickson 5928d221d4 ShrinkWrap Viewport (#7790) 2017-02-02 14:50:04 -08:00
Michael Goderbauer 40aab7f553 Bump Dart SDK to 1.22.0-dev.10.3 (#7791) 2017-02-01 16:33:27 -08:00
Adam Barth 134096022c Test PaginatedDataTable (#7594)
This patch contains some basic tests for PaginatedDataTable.
2017-01-23 21:36:42 -08:00
Ian Hickson 63aa1397a3 Increase the strictness of our requiring explicit types (#7585)
...now that we have generic methods, their types need to be specified too.
2017-01-23 01:04:31 -08:00
Ian Hickson 15a7eb3b6c Move to real generic method syntax (#7235) 2017-01-21 20:58:44 -08:00
Michael Goderbauer 394a736984 Roll engine to b3ed79122edd7172327ce415688ef674d6a7fa5d (#7476)
fixes #7433
2017-01-12 18:56:43 -08:00
Adam Barth 3c33bb4697 Add some more framework.dart tests (#7469) 2017-01-12 15:08:16 -08:00
Adam Barth 8f708bfbc1 Test AboutDrawerItem (#7453)
Also, fix a few minor bugs found by the test.
2017-01-11 18:38:03 -08:00
Yegor 0c7a9da98f microbenchmarks: single-line JSON; consolidate #7433 workaround (#7450)
- output single-line JSON because iOS 9.x cannot output more than one line
- move the workaround for #7433 into LiveTestWidgetsFlutterBinding so that it works in all cases (e.g. animation_bench.dart on iOS)
2017-01-11 14:29:21 -08:00
Adam Barth 2ee04c92bf Improve test coverage (#7430)
Also, make the exception handling for global key listeners slightly more
robust.
2017-01-10 20:41:42 -08:00
Ian Hickson 79c8e5c7c7 Add a toString to Simulation (#7364)
Also, make hasOneLineDescription more discerning.
Also, add a test for hasOneLineDescription.
Also, add a test for GravitySimulation, to test the toString.
2017-01-05 16:33:40 -08:00
Ian Hickson e08c3c3bdc moreOrLessEquals matcher for floating point numbers (#7358)
```dart
expect(x, moreOrLessEquals(0.0));
```

...for those cases where `x` might be 1e-11 or whatever.

Also, be more resilient when dumping the tree from inside the test framework.
Also, add an assert that helped me debug something the other day.
2017-01-05 14:51:01 -08:00
Adam Barth cd09370c13 Update quiver (#7349) 2017-01-05 12:45:10 -08:00
Adam Barth 86e5fce61a Tooltip update can cause assert (#7338)
We were trying to update the tooltip overlay entry, but that cannot work
because the overlay entry might have already built. Instead, we keep the
old value.

Fixes #7151
2017-01-04 16:08:29 -08:00
Hans Muller 440ddef69e Regression tests should verify that debug are not set (#7090) 2016-11-29 15:17:51 -08:00
Adam Barth 7c795d5fdd Update iml files (#7025)
These now match what 2016.3 expects.
2016-11-27 07:46:54 -08:00
Ian Hickson 9c1a24fa72 Reexport meta from foundation. (#6938) 2016-11-18 21:22:32 -08:00
Adam Barth a4a783b64f Add support for pointer hover (#6884) 2016-11-15 21:13:37 -08:00
Ian Hickson bf2c46e263 Fix the ignore identifiers (#6876)
I used the wrong identifiers here.
2016-11-15 16:52:58 -08:00