WhenTapBackButtonWidget function

StepDefinitionGeneric<World> WhenTapBackButtonWidget()

Taps the back button widget

Examples:

When I tap the back button" When I tap the back element" When I tap the back widget"

Implementation

StepDefinitionGeneric WhenTapBackButtonWidget() {
  return when<FlutterWorld>(
    RegExp(r'I tap the back (?:button|element|widget|icon|text)$'),
    (context) async {
      await context.world.appDriver.pageBack();
      await context.world.appDriver.waitForAppToSettle();
    },
  );
}