Implementation
@override
ReportActionHandler<ScenarioMessage> get scenario => ReportActionHandler(
onStarted: ([message]) async {
logger.i(coolColor("\n${"-" * 100}\n"));
if (message == null) {
logger.i(failColor('Cannot get scenario information'));
} else {
logger.i(coolColor(
'${DateTime.now()} - Running scenario: ${message.name + _getContext(message.context)}'));
}
},
onFinished: ([message]) async {
if (message == null) {
logger.i(failColor('Cannot get scenario information'));
} else {
var scenarioColor = message.hasPassed ? passColor : failColor;
var scenarioStatus = message.hasPassed ? "PASSED" : "FAILED";
logger.i(
"${scenarioColor(scenarioStatus)}: Scenario ${message.name}");
}
},
);