createCommandExecutor method

InAppCockpitCommandExecutor createCommandExecutor({
  1. String? platform,
  2. String transportType = 'inAppTest',
  3. Future<void> postActionSettler()?,
  4. Future<void> waitTickHandler(
    1. Duration duration
    )?,
})

Creates the same in-app command executor used by the remote Cockpit bridge.

This is intentionally exposed for development-only test adapters. It keeps Dart integration tests on the exact Element traversal, hit testing, reveal, gesture, wait, assertion, capture, and diagnostic paths used by cockpit dev, without requiring a loopback server or a second runner.

Implementation

InAppCockpitCommandExecutor createCommandExecutor({
  String? platform,
  String transportType = 'inAppTest',
  Future<void> Function()? postActionSettler,
  Future<void> Function(Duration duration)? waitTickHandler,
}) {
  return _buildRemoteCommandExecutor(
    platform ??
        resolveCockpitRemoteSessionPlatform(
          isWeb: kIsWeb,
          targetPlatform: defaultTargetPlatform,
        ),
    transportType: transportType,
    postActionSettler: postActionSettler,
    waitTickHandler: waitTickHandler,
  );
}