Skip to content

Commit

Permalink
fix being unable to interact with the running app with a finger
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Dec 13, 2023
1 parent f4e746a commit e5dccdb
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions packages/patrol/lib/src/binding.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ class PatrolBinding extends LiveTestWidgetsFlutterBinding {
/// You most likely don't want to call it yourself.
PatrolBinding(NativeAutomatorConfig config)
: _serviceExtensions = DevtoolsServiceExtensions(config) {
shouldPropagateDevicePointerEvents = true;

final oldTestExceptionReporter = reportTestException;
reportTestException = (details, testDescription) {
final currentDartTest = _currentDartTest;
Expand Down Expand Up @@ -154,6 +152,20 @@ class PatrolBinding extends LiveTestWidgetsFlutterBinding {
/// See https://github.com/flutter/devtools/issues/6719
TargetPlatform? workaroundDebugDefaultTargetPlatformOverride;

/// Allows for gestures made with human finger to be percevied as gestures
/// made with [WidgetTester], allowing to interact with a running test.
///
/// We thought we may replace this override by setting
/// [shouldPropagateDevicePointerEvents] to true but it doesn't work.
///
/// See also:
///
/// * https://github.com/leancodepl/patrol/issues/1956
@override
TestBindingEventSource get pointerEventSource {
return TestBindingEventSource.test;
}

@override
void initInstances() {
super.initInstances();
Expand Down

0 comments on commit e5dccdb

Please sign in to comment.