WhenTapWidgetWithoutScroll function

StepDefinitionGeneric<World> WhenTapWidgetWithoutScroll()

Implementation

StepDefinitionGeneric WhenTapWidgetWithoutScroll() {
  return when1<String, FlutterWorld>(
    RegExp(
        r'I tap the {string} (?:button|element|label|icon|field|text|widget) without scrolling it into view$'),
    (key, context) async {
      final finder =
          context.world.appDriver.findByDescendant(key, FindType.key);

      await context.world.appDriver.tap(
        finder,
      );

      await context.world.appDriver.waitForAppToSettle();
    },
  );
}