given method

GivenScenario given(
  1. StepInput step
)

Sets up the initial state or preconditions for this scenario.

While the stated step parameter is an object, extension methods are provided for String and Function object to provide flexibility in the syntax used to define this as an executable test step.

String Example: .given('the user is logged out'.step) Callback Example: .given(theUserIsLoggedOut.step)

Implementation

GivenScenario given(StepInput step) {
  registration(
    context,
    step,
    GivenScenarioStepData(getCallbackName(step), ''),
  );
  return GivenScenario(context);
}