Closed smohylevskyi closed 5 years ago
Hey @SergeyMogilevsky, thanks for the kind words! :)
Right now, it does not support the configuration of a separate CSS file. But in the meantime, you should be able to simply overwrite the current css files and then make your adaptations.
base.css
, spec.css
and summary.css
to src/test/resources/templates/
in your projectI will implement the possibility to configure a custom css file in the future.
Hi @SergeyMogilevsky ,
as Tilman already said, you can overwrite the CSS. But you can even do more with the templating feature of Spock-Reports.
You might want to take a look at this repository https://github.com/docToolchain/SpockAsciiDocReports where I used the template feature of spock-reports to not only use another stylesheet but even use a different report template (it now creates AsciiDoc reports: https://spockasciidocreports.netlify.com/spock-reports.html)
As Tilman already mentioned, the original Geb-Spock-Reports templates can be found at https://github.com/AOEpeople/geb-spock-reports/tree/master/src/main/resources/templates
So follow the instruction of Spock-Reports (https://github.com/renatoathaydes/spock-reports#customizing-the-reports) copy the original templates and modify the css - that should give you all the freedom you need...
Ralf
Indeed, the templating feature of spock-reports is quite nice, and only made this library (and others) possible! :) Writing a full-featured custom template can be quite some work though. So I think you should be able to add custom css, without the need to manually copy the original files.
@SergeyMogilevsky I have just published release v0.2.4 with the option to provide a custom css file. :)
I have also added some further documentation to the readme.
@tilmanginzel @rdmueller guys, thank you so much for the help! I will try and use this new feature asap. It's ok to close the thread now, right?
Good day, guys! Our project was using spock-reports for a pretty long time for API test reports but recently we starred doing UI auto testing and your reports are very helpful, thanks a lot for your work!
My question is as follows: does your report support custom css styles as the original spock-report does?
I did a couple of tries to make it work but with no luck... Is your styling hardcoded into the lib or maybe I was just not able to do it correctly?
Thanks!