TestStep.scrollTo constructor

TestStep.scrollTo({
  1. required TargetFinder target,
  2. String? description,
  3. bool isBreakpoint = false,
})

Create an auto-scroll step to bring target into viewport.

Implementation

factory TestStep.scrollTo({
  required TargetFinder target,
  String? description,
  bool isBreakpoint = false,
}) {
  return TestStep(
    type: TestStepType.scrollTo,
    target: target,
    description: description ?? 'Scroll into view: ${target.description}',
    isBreakpoint: isBreakpoint,
  );
}