Commit graph

94 commits

Author SHA1 Message Date
Alexandre Ardhuin cc1cf13eec
enable lint unnecessary_const (#19342) 2018-07-16 21:43:48 +02:00
Sam Rawlins 9f8a70be4c Bump mockito to 3.0.0-beta (#18462)
* Bump mockito to 3.0.0-beta

* Few fixes

* fix test

* Bump image

* Fix

* New packages update

* With matcher pinned

* No more typed
2018-06-21 16:23:47 -07:00
Ian Hickson 6599271bf5
Revert matcher package (#18614)
The new matcher package deprecates isInstanceOf which seems eggregious.
2018-06-19 17:22:56 -07:00
Greg Spencer 08d1ec36de Roll engine to 0c119932c0d6cb30dafd75ec717d1eda76fd7651 (#18575) 2018-06-19 09:58:20 +02:00
Alexandre Ardhuin 09276bea25
enable lint prefer_equal_for_default_values (#18156) 2018-06-05 08:50:40 +02:00
Alexander Aprelev bffae21571
Again move mockito to 300plus2 (#15981)
* Revert "Revert "Move mockito to 3.0.0-alpha. (#15949)" (#15979)"

This reverts commit e59651f925.

* More thenReturn to thenAnswer when mocking Futures

* Revert "More thenReturn to thenAnswer when mocking Futures"

This reverts commit 194d2cf417 as we are reverting engine roll.

* Revert "Revert "More thenReturn to thenAnswer when mocking Futures""

This reverts commit 52c9e96b30.

* Add dependency override

* Fix issue
2018-03-28 12:07:12 -07:00
Chris Bracken 39eeec47d6
Apply Mockito-related type fixes (#16002)
Type-related fixes in flutter_driver and fuchsia_remote_debug_protocol
tests.
2018-03-27 15:27:24 -07:00
Chris Bracken 49c87d010c
Revert "Roll engine to version dd6f46c485192f4506035088c9065b9f5dbba9ab (#15885)" (#15980)
This caused a test failure in the integration_ui_ios devicelab test.

```
stdout: [   +3 ms] 00:02 [32m+0[0m: end-to-end test Ensure keyboard dismissal resizes the view to original size[0m
stdout: [+8129 ms] 00:11 [32m+0[0m[31m -1[0m: end-to-end test Ensure keyboard dismissal resizes the view to original size [1m[31m[E][0m[0m
stdout: [   +5 ms]   DriverError: Failed to fulfill Tap: Flutter application not responding
stdout: [        ]   Original error: TimeoutException after 0:00:07.500000: Future not completed
stdout: [        ]   Original stack trace:
stdout: [        ]   #0      FlutterDriver._sendCommand (package:flutter_driver/src/driver/driver.dart:324:18)
stdout: [        ]
stdout: [        ]   #1      FlutterDriver.tap (package:flutter_driver/src/driver/driver.dart:368:11)
stdout: [        ]
stdout: [        ]   #2      main.. (file:///[... snip ...]/flutter/dev/integration_tests/ui/test_driver/keyboard_resize_test.dart:34:20)
```

This reverts commit 067be92ae8.
2018-03-27 10:57:50 -07:00
Siva 067be92ae8
Roll engine to version dd6f46c485192f4506035088c9065b9f5dbba9ab (#15885)
Roll engine to version dd6f46c485192f4506035088c9065b9f5dbba9ab
2018-03-26 22:16:48 -07:00
Vyacheslav Egorov aa7e9637ac
Fix several Dart 2 issues in the flutter_driver. (#14749)
* All lists produced by JSON parsing are List<dynamic>. If more
speficic type is required then they need to be explicitly cast, e.g.
using castFrom helper;
* Function of type (ByText) -> Finder is not a subtype of
(SerializableFinder) -> Finder because ByText is in the contravariant
position;
* In Dart 2 typed(any) should be used instead of any in mockito based
tests.
2018-02-16 18:01:54 +01:00
Alexandre Ardhuin 3c379aaf43
whitespace cleanup (#14458) 2018-02-05 22:20:21 +01:00
Alan Russian 30720bd148 Change async stubbing to use thenAnswer. (#13521)
* Change async stubbing to use thenAnswer.

Mockito now prohibits calling thenReturn with Futures and Streams. dart-lang/mockito#79

* Update all Mockito deps to 3.0.0.

* Revert "Update all Mockito deps to 3.0.0."

This reverts commit e8ab9d37c3.

I did not correctly update the mockito dep, and there's no easy way to update to 3.0 alpha right now.

* Change thenAnswer((_) => to thenAnswer((invocation) =>

* Add Invocation type to thenAnswer lambdas
2017-12-19 13:13:57 -08:00
Chris Bracken cf37a4721a
Reorganise flutter driver implementation sources (#13163)
This patch reorganises flutter_driver's lib/src directory into three
subdirectories:

* driver: sources transitively imported/exported by flutter_driver.dart,
  which defines the API used by driver tests executed on the host machine.

* extension: sources transitively imported/exported by
  driver_extension.dart, which defines the API used to instrument a
  Flutter app running on the target device for use with a driver test.

* common: sources common to both driver and extension code.

This makes rolling Flutter into repositories that use Bazel (or
Bazel-like build systems) significantly more robust, due to the simpler
glob patterns involved.
2017-11-22 17:24:41 -08:00
Yegor 8c902ad479
clear timeline events prior to starting a new action (#12984)
* clear timeline events prior to starting a new action

* trailing commas
2017-11-22 15:08:09 -08:00
Michael Goderbauer a67d648742 Roll engine to 883f81c8448e483c51cf1d978dffb332bf47603d (#11966) 2017-09-06 16:30:13 -07:00
Chris Bracken 0244f5dd6a Revert "Roll engine to ceb6d05c2fb3bd5c31a25d4b08be9fd97b55a446 (#11933)" (#11959)
This roll caused performance regressions in benchmarks:
* complex_layout_scroll_perf
* flutter_gallery_transition_perf

This reverts commit f430a45a5b.
2017-09-06 11:39:10 -07:00
Michael Goderbauer f430a45a5b Roll engine to ceb6d05c2fb3bd5c31a25d4b08be9fd97b55a446 (#11933)
* Roll engien to 79332e5c42555875c7070c33810dab3f0012ace1

* Remove deprecated @proxy

* Roll engine to ceb6d05c2fb3bd5c31a25d4b08be9fd97b55a446
2017-09-05 21:12:46 -07:00
Yegor f7d62aaa9e fix driver connection flakiness (#9968) 2017-05-10 15:16:45 -07:00
Todd Volkert 5d29737a04 Bump mockito to version 2.0.2 (#8713) 2017-03-10 13:53:22 -08:00
Yegor d09591bf7d consistently accept timeout in driver API (#8667) 2017-03-09 16:31:48 -08:00
Chris Bracken cdeb83cf59 Declare locals as final where not reassigned (flutter_driver) (#8567) 2017-03-03 18:31:21 -08:00
Yegor bfef36f710 add waitUntilNoTransientCallbacks to driver API (#8475) 2017-02-28 15:58:28 -08:00
Alexandre Ardhuin f16dea290b prefer const contructors in packages/flutter_driver (#8056) 2017-02-10 00:49:46 -08:00
Ian Hickson 21434fcf1a Refactor 'flutter drive' to get the observatory port from the logs (#7695)
This remove a very brittle aspect of flutter drive, whereby it would
assume a known port instead of explicitly finding out what it was.

Fixes #7692 and hopefully fixes the devicelab tests.
2017-01-27 01:37:28 -08:00
Michael Goderbauer 7c9f9be363 Add a timeout to every command (enforced on device and host) (#7391) 2017-01-09 14:57:25 -08:00
Hans Muller 770f8f1d0c rename TracingCategory to TimelineStream (#3822) 2016-05-09 17:00:49 -07:00
pq bcede8dffb Literals get type annotations.
As per the recent fix to the `always_specify_types` lint (https://github.com/dart-lang/linter/issues/199), literal maps and lists are now expected to be explicitly typed.

Running that lint on the repo identifies quite a few spots to update.  This focuses on `flutter_driver` and `flutter_sprites` (somewhat arbitrarily) but the changes are fairly representative.

Note there are a number of places where I made a quick judgement on how specific to make the types.  Feedback on those is welcome.  (Especially as we move forward with more.)
2016-05-04 09:18:31 -07:00
Hans Muller a9b965cb9b Gallery demo start-time performance test (#3655)
*  Gallery demo start-time performance test
2016-05-03 17:37:10 -07:00
Ian Hickson 261923e5c6 Refactor service extensions (#3397)
Bindings now have a debugRegisterServiceExtensions() method that is
invoked in debug mode (only). (Once we have a profile mode, there'll be
a registerProfileServiceExtensions() method that gets called in that
mode only to register extensions that apply then.)

The BindingBase class provides convenience methods for registering
service extensions that do the equivalent of:

```dart
void extension() { ... }
bool extension([bool enabled]) { ... }
double extension([double extension])  { ... }
Map<String, String> extension([Map<String, String> parameters]) { ... }
```

The BindingBase class also itself registers ext.flutter.reassemble,
which it has call a function on the binding called
reassembleApplication().

The Scheduler binding now exposes the preexisting
ext.flutter.timeDilation.

The Renderer binding now exposes the preexisting ext.flutter.debugPaint.

The Renderer binding hooks reassembleApplication to trigger the
rendering tree to be reprocessed (in particular, to fix up the
optimisation closures).

All the logic from rendering/debug.dart about service extensions is
replaced by the above.

I moved basic_types to foundation.

The FlutterWidgets binding hooks reassembleApplication to trigger the
widget tree to be entirely rebuilt.

Flutter Driver now uses ext.flutter.driver instead of
ext.flutter_driver, and is hooked using the same binding mechanism.
Eventually we'll probably move the logic into the Flutter library so
that you just get it without having to invoke a special method first.
2016-04-19 10:53:58 -07:00
Yegor e7657b9462 [driver] "waitFor" command in place of broken "exists" (#3373)
* [driver] "waitFor" command in place of broken "exits"

* [driver] wait using frame callback
2016-04-19 09:49:22 -07:00
Yegor 9ce995f65e [driver] refactor API to finder objects (#3365) 2016-04-15 16:57:35 -07:00
Yegor 19e624ccfe [driver] give the timeline data some structure
Fixes https://github.com/flutter/flutter/issues/2713
2016-04-04 17:07:16 -07:00
Devon Carew 89143313cb Merge pull request #2981 from devoncarew/no_symlinks
run pub with --no-package-symlinks
2016-03-29 19:25:04 -07:00
Devon Carew fe37825fd5 run pub with --no-package-symlinks 2016-03-29 19:02:14 -07:00
Yegor Jbanov bfa16b2b5d [driver] fix observatory port # and timeline data extraction
The way we pick observatory port # has changed and we have broken
logic that handles port 8181. To fix the buildbot, switch to port
8182. We can later figure out what we want to do when we clean up
port handling.

The old VM extention for extracting the timeline data is gone.
Switch to the new '_getVMTimeline' API.
2016-03-29 13:53:40 -07:00
Ian Hickson d745e20853 Even more types 2016-03-14 09:41:54 -07:00
Hixie c7339de6bc Enable always_declare_return_types lint
And fix a zillion omissions this uncovered.
2016-03-09 17:57:39 -08:00
yjbanov ee184a7821 driver.scroll action; scroll perf test for Stocks 2016-03-02 17:13:49 -08:00
Yegor Jbanov 44d7a577e0 [driver] wait for the isolate to enter pause on start 2016-03-02 15:58:01 -08:00
Yegor Jbanov 6d35481cfa add smoke driver test; find by tooltip; retry predicate 2016-02-29 16:50:47 -08:00
yjbanov 7f39703759 support waiting for things to happen in Flutter Driver 2016-02-24 10:01:00 -08:00
yjbanov a2b1bd4673 "flutter drive" command
Runs a test app and a driver test simultaneously, then stops the app.

Usage:

```
flutter drive --target=/path/to/test/app.dart
```

This command will look for `/path/to/test/app_test.dart` by
convention. We will expand into other ways of discovering tests in the
future.
2016-02-19 18:11:53 -08:00
yjbanov 439aadf4e4 move to pub version of vm_service_client 2016-02-17 18:02:18 -08:00
Yegor Jbanov b0e4559459 add flutter_driver package
This commit contains:

- FlutterDriver API for e2e tests usable in conjunction with package:test
- FlutterDriverExtension to be enabled by the application in order to
  allow an external agent to connect to it and drive user interactions and
  probe into the element tree
- initial implementations of tap, findByValueKey and getText commands (to
  be expanded in future PRs)
2016-02-17 18:02:18 -08:00