UNPKG

protractor-angular-screenshot-reporter

Version:

An npm module and which generates your Protractor test reports in HTML (angular) with screenshots

1 lines 3.86 kB
<html><head><title>Generated test report</title><style>ul,li{margin-left:0;padding-left:0;width:100%;font-weight:bold;}table{width:95%;text-align:left;border-spacing:0;border-collapse: separate;margin-bottom:5px;}li{font-weight:bold;padding-left:5px;list-style:none;}ul table li{font-weight: normal}th,td{padding: 10px;border: 1px solid #000;}td.desc-col{width:400px;}th.desc-col{width: 390px;}td.status-col{width:75px;}th.status-col{width: 75px;}td.browser-col{width:345px;}th.browser-col{width: 345px;}td.os-col{width:100px;}th.os-col{width: 100px;}td.msg-col{width:135px;}th.msg-col{width: 135px;}table.header{background-color: gray; color: #fff;margin-left:20px;}.traceinfo{position: fixed;top: 0; bottom: 0;left: 0;right:0;background: rgba(0,0,0,0.8);z-index: 99999;opacity:0;-webkit-transition: opacity 400ms ease-in;transition: opacity 400ms ease-in;pointer-events: none;}.traceinfo.visible{opacity:1;pointer-events: auto;}.traceinfo > div{width: 400px;position: relative;margin: 10% auto;padding: 5px 20px 13px 20px;background: #fff;}.traceinfo .close{background: #606061;color: #FFFFFF;line-height: 25px;position: absolute;right: -12px;text-align: center;top: -10px;width: 24px;text-decoration: none;font-weight: bold;}.traceinfo .close:hover{background: #00d9ff;}</style><script type='text/javascript'>function showTrace(e){window.event.srcElement.parentElement.getElementsByClassName('traceinfo')[0].className = 'traceinfo visible';}function closeTraceModal(e){window.event.srcElement.parentElement.parentElement.className = 'traceinfo';}function openModal(imageSource){var myWindow = window.open('','screenshotWindow');myWindow.document.write('<img src="' +imageSource + '" alt="screenshot" />');}</script> </head><body style='font-family:Arial;'><h1>Test Results</h1><table class='header'><tr><th class='desc-col'>Description</th><th class='status-col'>Passed</th><th class='browser-col'>Browser</th><th class='os-col'>OS</th><th class='msg-col'>Message</th><th class='img-col'>Screenshot</th></tr></table><ul><li>angularjs homepage<ul><li><table><tr><td class="desc-col">should greet the named user</td><td class="status-col" style="color:#fff;background-color: red">false</td><td class="browser-col">chrome:35.0.1916.153</td><td class="os-col">WIN8</td><td class="msg-col">timeout: timed out after 10000 msec waiting for spec to complete<br/><a onclick="showTrace()" href="#trace-modal3">View Stack Trace Info</a><br/> <div id="#trace-modal3" class="traceinfo"><div><a href="#close" onclick="closeTraceModal()" title="Close" class="close">X</a>No Stack trace information</div></div></td><td class="img-col"><a href="#" onclick="openModal('should greet the named user-angularjs homepage.png')">View </a></td></tr></table></li><li>todo list<ul><li><table><tr><td class="desc-col">should list todos</td><td class="status-col" style="color:#fff;background-color: red">false</td><td class="browser-col">chrome:35.0.1916.153</td><td class="os-col">WIN8</td><td class="msg-col">timeout: timed out after 10000 msec waiting for spec to complete<br/><a onclick="showTrace()" href="#trace-modal4">View Stack Trace Info</a><br/> <div id="#trace-modal4" class="traceinfo"><div><a href="#close" onclick="closeTraceModal()" title="Close" class="close">X</a>No Stack trace information</div></div></td><td class="img-col"><a href="#" onclick="openModal('should list todos-todo list-angularjs homepage.png')">View </a></td></tr></table></li><li><table><tr><td class="desc-col">should add a todo</td><td class="status-col" style="color:#fff;background-color: green">true</td><td class="browser-col">chrome:35.0.1916.153</td><td class="os-col">WIN8</td><td class="msg-col">Passed.</td><td class="img-col"></td></tr></table></li></ul></li></ul><div><h2><u>Resuls summary</u></h2><b>Total tests passed</b>: 1 <br/> <b>Total tests failed</b>: 2 </div></body></html>