screenshotHighlightKind function

String screenshotHighlightKind(
  1. TestStep step, {
  2. bool forFailure = false,
  3. bool tapAtIsAction = false,
})

Resolves the report marker kind consistently across screenshot adapters. Host captures also treat coordinate taps as actions; other action kinds come from the operation registry used by standalone execution.

Implementation

String screenshotHighlightKind(
  TestStep step, {
  bool forFailure = false,
  bool tapAtIsAction = false,
}) {
  if (forFailure) return 'failure';
  if ((tapAtIsAction && step.type == 'tapAt') || isUserActionStep(step)) {
    return 'action';
  }
  return 'assertion';
}