Skip to content

Commit

Permalink
Delete host automation feature (#846)
Browse files Browse the repository at this point in the history
* delete HostAutomator class

* remove re-export of host_automator.dart from patrol.dart

* remove the rest of references to HostAutomator
  • Loading branch information
bartekpacia authored Jan 29, 2023
1 parent 8ff101b commit bbd63a8
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 91 deletions.
2 changes: 0 additions & 2 deletions packages/patrol/example/integration_test/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,3 @@ final nativeAutomatorConfig = NativeAutomatorConfig(
packageName: 'pl.leancode.patrol.example',
bundleId: 'pl.leancode.patrol.Example',
);

const hostAutomatorConfig = HostAutomatorConfig();
1 change: 0 additions & 1 deletion packages/patrol/lib/patrol.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ library patrol;
export 'src/binding.dart';
export 'src/common.dart';
export 'src/custom_finders/custom_finders.dart';
export 'src/host/host_automator.dart';
export 'src/native/native.dart';
9 changes: 0 additions & 9 deletions packages/patrol/lib/src/common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'package:integration_test/integration_test.dart';
import 'package:meta/meta.dart';
import 'package:patrol/src/binding.dart';
import 'package:patrol/src/custom_finders/patrol_tester.dart';
import 'package:patrol/src/host/host_automator.dart';
import 'package:patrol/src/native/native.dart';

/// Signature for callback to [patrolTest].
Expand Down Expand Up @@ -40,13 +39,11 @@ void patrolTest(
dynamic tags,
PatrolTesterConfig config = const PatrolTesterConfig(),
NativeAutomatorConfig nativeAutomatorConfig = const NativeAutomatorConfig(),
HostAutomatorConfig hostAutomatorConfig = const HostAutomatorConfig(),
bool nativeAutomation = false,
BindingType bindingType = BindingType.patrol,
LiveTestWidgetsFlutterBindingFramePolicy framePolicy =
LiveTestWidgetsFlutterBindingFramePolicy.fadePointers,
}) {
HostAutomator? hostAutomator;
NativeAutomator? nativeAutomator;

if (nativeAutomation) {
Expand All @@ -55,11 +52,6 @@ void patrolTest(
final binding = PatrolBinding.ensureInitialized();
binding.framePolicy = framePolicy;

hostAutomator = HostAutomator(
config: hostAutomatorConfig,
binding: binding,
);

nativeAutomator = NativeAutomator(config: nativeAutomatorConfig);
break;
case BindingType.integrationTest:
Expand All @@ -85,7 +77,6 @@ void patrolTest(
final patrolTester = PatrolTester(
tester: widgetTester,
nativeAutomator: nativeAutomator,
hostAutomator: hostAutomator,
config: config,
);
await callback(patrolTester);
Expand Down
11 changes: 0 additions & 11 deletions packages/patrol/lib/src/custom_finders/patrol_tester.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ class PatrolTester {
const PatrolTester({
required this.tester,
required this.nativeAutomator,
required this.hostAutomator,
required this.config,
});

Expand All @@ -118,23 +117,13 @@ class PatrolTester {
/// on.
final NativeAutomator? nativeAutomator;

/// Provides functionality to run actions as the host system (your computer).
final HostAutomator? hostAutomator;

/// Shorthand for [nativeAutomator]. Throws if [nativeAutomator] is null,
/// which is the case if it wasn't initialized.
NativeAutomator get native {
assert(nativeAutomator != null, 'native automator is null');
return nativeAutomator!;
}

/// Shorthand for [hostAutomator]. Throws if [hostAutomator] is null, which is
/// the case if it wasn't initialized.
HostAutomator get host {
assert(hostAutomator != null, 'host automator is null');
return hostAutomator!;
}

/// Returns a [PatrolFinder] that matches [matching].
///
/// See also:
Expand Down
68 changes: 0 additions & 68 deletions packages/patrol/lib/src/host/host_automator.dart

This file was deleted.

0 comments on commit bbd63a8

Please sign in to comment.