Quantcast
Channel: Chutzpah - A JavaScript Test Runner
Viewing all articles
Browse latest Browse all 1864

Commented Unassigned: Coverage via Blanket.js add ability to edit its template [265]

$
0
0
Currently the coverage is generated from code, which makes it uncustomizable.

E.g. for example some zebra-stripes should be added.

In order to do that, would be nice if there would be a template in the extension folder so you can customize it how you want.
Comments: ``` public static void GenerateHtml(CoverageData coverage, Stream stream) { using (StreamWriter writer = new StreamWriter(stream)) { writer.WriteLine("\r\n<html>\r\n<head>\r\n <title>Chutzpah Code Coverage Results</title>\r\n <script type='text/javascript'>\r\n {0}\r\n </script>\r\n <style>\r\n {1}\r\n </style>\r\n</head>\r\n<body>\r\n<div id='chutzpah-main'>\r\n\t<div class='chutzpah chutzpah-title'>\r\n\t\t<div class='chutzpah-cl chutzpah-file'>\r\n\t\t\t<a href='http://chutzpah.codeplex.com/' target='_blank' class='chutzpah-logo'>Chutzpah</a> code coverage via <a href='http://blanketjs.org' target='_blank' class='chutzpah-logo'>blanket.js</a> results\r\n\t\t</div>\r\n\t\t<div class='chutzpah-cl rs'>\r\n\t\t\tCoverage (%)\r\n\t\t</div>\r\n\t\t<div class='chutzpah-cl rs'>\r\n\t\t\tCovered/Total Smts.\r\n\t\t</div>\r\n\t\t<div style='clear:both;'>\r\n\t\t</div>\r\n\t</div>\r\n", "\r\nfunction chutzpah_toggleSource(id) {\r\n var element = document.getElementById(id);\r\n if(element.style.display === 'block') {\r\n element.style.display = 'none';\r\n } else {\r\n element.style.display = 'block';\r\n }\r\n }\r\n", "\r\n#chutzpah-main\r\n{\r\n background:#EEE;\r\n clear:both;\r\n color:#333;\r\n font-family:'Helvetica Neue Light', HelveticaNeue-Light, 'Helvetica Neue', Calibri, Helvetica, Arial, sans-serif;\r\n font-size:17px;\r\n margin:2px;\r\n}\r\n\r\n#chutzpah-main a\r\n{\r\n color:#333;\r\n text-decoration:none;\r\n}\r\n\r\n#chutzpah-main a:hover\r\n{\r\n text-decoration:underline;\r\n}\r\n\r\n.chutzpah\r\n{\r\n border-bottom:1px solid #FFF;\r\n clear:both;\r\n margin:0;\r\n padding:5px;\r\n}\r\n\r\n.chutzpah-error\r\n{\r\n color:red;\r\n}\r\n\r\n.chutzpah-success\r\n{\r\n color:#5E7D00;\r\n}\r\n\r\n.chutzpah-file\r\n{\r\n width:auto;\r\n}\r\n\r\n.chutzpah-cl\r\n{\r\n float:left;\r\n}\r\n\r\n.chutzpah div.rs\r\n{\r\n float:right;\r\n margin-left:50px;\r\n width:150px;\r\n}\r\n\r\n.chutzpah-nb\r\n{\r\n padding-right:10px;\r\n}\r\n\r\n#chutzpah-main a.chutzpah-logo\r\n{\r\n color:#3245FF;\r\n cursor:pointer;\r\n font-weight:700;\r\n text-decoration:none;\r\n}\r\n\r\n.chutzpah-source\r\n{\r\n background-color:#FFF;\r\n border:1px solid #CBCBCB;\r\n color:#363636;\r\n margin:25px 20px;\r\n overflow-x:scroll;\r\n width:80%;\r\n}\r\n\r\n.chutzpah-source div\r\n{\r\n white-space:nowrap;\r\n}\r\n\r\n.chutzpah-source span\r\n{\r\n background-color:#EAEAEA;\r\n color:#949494;\r\n display:inline-block;\r\n padding:0 10px;\r\n text-align:center;\r\n}\r\n\r\n.chutzpah-source .miss\r\n{\r\n background-color:#e6c3c7;\r\n}\r\n"); int totalSmts = 0; ``` Please move it into a separate HTML template and separated css

Viewing all articles
Browse latest Browse all 1864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>