Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete host automation feature #846

Merged
merged 3 commits into from
Jan 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.