only tap on widgets reachable by hit testing (#11767)

* only tap on widgets reachable by hit testing

* use FractionalOffset

* added tests

* check finder finds correct widget

* undo unintentional changes

* address comments

* style fix

* add Directionality in test

* fix analysis warning
This commit is contained in:
Yegor
2017-09-11 09:46:42 -07:00
committed by GitHub
parent 0229711ba1
commit ba5b5e7f6f
6 changed files with 140 additions and 2 deletions

View File

@@ -262,7 +262,10 @@ class FlutterDriverExtension {
Future<TapResult> _tap(Command command) async {
final Tap tapCommand = command;
await _prober.tap(await _waitForElement(_createFinder(tapCommand.finder)));
final Finder computedFinder = await _waitForElement(
_createFinder(tapCommand.finder).hitTestable()
);
await _prober.tap(computedFinder);
return new TapResult();
}