getBehaviorDrivenDescription method
Gets the most appropriate BDD string based on the values set on the step.
Implementation
@override
String getBehaviorDrivenDescription(TestController tester) {
var result = retryCount == null
? behaviorDrivenDescriptions[0]
: behaviorDrivenDescriptions[1];
TestRunnerStep? runnerStep;
try {
runnerStep = tester.registry.getRunnerStep(
id: step['id'],
values: step['values'],
);
} catch (e) {
// no-op
}
result = result.replaceAll('{{retryCount}}', retryCount ?? '1');
var desc = runnerStep == null
? 'nothing.'
: runnerStep.getBehaviorDrivenDescription(tester);
result += '\n1. Then I will execute the sub-step, $desc\n';
return result;
}