and method

AndScenario and(
  1. StepInput step
)

Appends an additional test condition to the current setup block.

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: .and('their account is active'.step) Callback Example: .and(theirAccountIsActive.step)

Implementation

AndScenario and(StepInput step) {
  registration(context, step, AndScenarioStepData(getCallbackName(step), ''));
  return AndScenario(context);
}