when method
Defines the key action or event that triggers the scenario behavior.
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: .when('they click the submit button'.step)
Callback Example: .when('theyClickTheSubmitButton.step)
Implementation
WhenScenario when(StepInput step) {
registration(
context,
step,
WhenScenarioStepData(getCallbackName(step), ''),
);
return WhenScenario(context);
}