StepScreenshotOptions.afterCondition constructor

StepScreenshotOptions.afterCondition(
  1. TestStep step
)

After expect/wait (post-step fallback).

Implementation

factory StepScreenshotOptions.afterCondition(TestStep step) {
  final isText = step.type == 'expectText' ||
      step.type == 'expectTextContains' ||
      step.type == 'waitForText' ||
      step.type == 'expectNoText';
  return StepScreenshotOptions(
    pumpBeforeCapture: step.type != 'waitForText',
    ensureTargetVisible: true,
    waitForTarget: false,
    waitForLottie: step.type != 'waitForNavigation',
    stabilize: !isText,
  );
}