then method

ThenScenario then(
  1. StepInput step
)

Defines the expected outcome or postcondition of the 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: .then('an error message should appear'.step) Callback String Example: .then(anErrorMessageShouldAppear.step)

Implementation

ThenScenario then(StepInput step) {
  registration(
    context,
    step,
    ThenScenarioStepData(getCallbackName(step), ''),
  );
  return ThenScenario(context);
}