With v3 behat seems to have changed the formatter options in the config yml. There is no formatter section anymore but only a formatters one.
What I want is to get rid of the comments in the default output like
# FeatureContext::iSetTheParameterTo()
because they are
1. black on black by default
2. crash the output if the lines get longer.
Can anyone provide the exact parameters to set in the config or at least a link to the documentation for them?
you need to set paths: false
I can see that the official documentation does not mention that but you can follow my configuration, it works this way ;-)
default:
formatters:
pretty:
verbose: true
paths: false
snippets: true
I know this doesn't exactly answer the OPs question, but it does address point number 1 in the question, the black on black comments. This was driving me crazy trying to figure out how to change it to something (anything) else w/o removing them completely (or even worse, switching to a light color terminal BG!)
This is what's working for me.
Behat version: 3.7.0
default:
formatters:
pretty:
output_styles:
comment: [ cyan ]
The full list of elements can be found here: https://github.com/Behat/Behat/blob/v3.7.0/src/Behat/Behat/Output/Printer/ConsoleOutputFactory.php#L38-L61
And if you feel you've clicked enough links to get here, here is said definition(s).
/**
* Returns default styles.
*
* @return OutputFormatterStyle[string]
*/
private function getDefaultStyles()
{
return array(
'keyword' => new OutputFormatterStyle(null, null, array('bold')),
'stdout' => new OutputFormatterStyle(null, null, array()),
'exception' => new OutputFormatterStyle('red'),
'undefined' => new OutputFormatterStyle('yellow'),
'pending' => new OutputFormatterStyle('yellow'),
'pending_param' => new OutputFormatterStyle('yellow', null, array('bold')),
'failed' => new OutputFormatterStyle('red'),
'failed_param' => new OutputFormatterStyle('red', null, array('bold')),
'passed' => new OutputFormatterStyle('green'),
'passed_param' => new OutputFormatterStyle('green', null, array('bold')),
'skipped' => new OutputFormatterStyle('cyan'),
'skipped_param' => new OutputFormatterStyle('cyan', null, array('bold')),
'comment' => new OutputFormatterStyle('black'),
'tag' => new OutputFormatterStyle('cyan')
);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With