onAfterStep method
Run after a step has executed
Implementation
@override
Future<void> onAfterStep(World world, String step, StepResult stepResult) async {
try {
if ([StepExecutionResult.fail, StepExecutionResult.error].contains(stepResult.result)) {
var dumpFileName = _getDumpFilePath();
currentWorld.dumpFile = File("$dumpFileName.txt");
currentWorld.screenshot = File("$dumpFileName.png");
await takeScreenshot(withWidgetTreeRender: true);
}
} catch (e) {
throwsAssertionError;
}
}