test/test-automation/style.xsl
changeset 5748 91a7152856f3
parent 5739 be70f1dfd7aa
child 5755 35d4ae5dea90
     1.1 --- a/test/test-automation/style.xsl	Wed Jul 06 17:05:07 2011 +0300
     1.2 +++ b/test/test-automation/style.xsl	Wed Jul 06 23:49:36 2011 +0300
     1.3 @@ -102,22 +102,27 @@
     1.4  	$("div.asserts").hide();
     1.5  	
     1.6  	/* Color the tests based on the result */
     1.7 -	$("div.test[result='passed']").addClass('passed');
     1.8 -	$("div.test[result='failed']").addClass('failed');
     1.9 +	$("span.testResult[result='passed']").addClass('passed');
    1.10 +	$("span.testResult[result='failed']").addClass('failed');
    1.11  	
    1.12  	/* Color the asserts based on the result */
    1.13 -	$("div.assert[result='pass']").addClass('passed');
    1.14 -	$("div.assert[result='failure']").addClass('failed');
    1.15 +	$("span.assertResult[result='pass']").addClass('passed');
    1.16 +	$("span.assertResult[result='failure']").addClass('failed');
    1.17  });
    1.18  
    1.19  </script>
    1.20  <style>
    1.21  
    1.22  div, h1 {
    1.23 -  padding: 3px 10px 2px 10px;
    1.24 +  padding: 2px 10px 2px 10px;
    1.25    margin: 5px 0px 5px 0px;
    1.26  }
    1.27  
    1.28 +.assert {
    1.29 +  padding: 0px 10px 0px 10px;
    1.30 +  margin: 0px 0px 0px 0px;
    1.31 +}
    1.32 +
    1.33  .document {
    1.34    font-family: Arial;
    1.35    font-size: 11pt;
    1.36 @@ -139,17 +144,17 @@
    1.37  	
    1.38  .switch {
    1.39    font-style: italic;
    1.40 -  color: rgb(10, 10, 200); /*#024A68;*/
    1.41 +  color: rgb(10, 10, 200); 
    1.42    font-size: 10pt;
    1.43    cursor: pointer;
    1.44  }	
    1.45  	
    1.46  .passed {
    1.47 - background-color: #64AA2B;
    1.48 + color: green;
    1.49  }
    1.50  
    1.51  .failed {
    1.52 - background-color: #FF6E40;
    1.53 + color: red;
    1.54  }
    1.55  
    1.56  </style>
    1.57 @@ -193,33 +198,29 @@
    1.58          <div class="tests" uid="{generate-id(test)}">
    1.59  	      <xsl:for-each select="test">
    1.60  			<div class="test">
    1.61 +			Test <span class="title"><xsl:value-of select="name"/>: </span>
    1.62 +			<span class="testResult">
    1.63  			  <xsl:attribute name="result">
    1.64 -			    <xsl:value-of select="result"/>
    1.65 -	          </xsl:attribute>
    1.66 -		      
    1.67 -		      Name:  <xsl:value-of select="name"/> (<xsl:value-of select="startTime"/>  - <xsl:value-of select="endTime"/>  ) <br/>
    1.68 -		      Description: <span class="description"> <xsl:value-of select="description"/> </span><br/> 
    1.69 -		
    1.70 -	          Total runtime: <xsl:value-of select="totalRuntime"/> seconds  <br/>
    1.71 -		      Result: <xsl:value-of select="result"/>  <br/>
    1.72 -		      
    1.73 +			    <xsl:value-of select="result"/> 
    1.74 +	           </xsl:attribute><xsl:value-of select="result"/> 
    1.75 +	        </span> 
    1.76 +			(Total runtime: <xsl:value-of select="totalRuntime"/> seconds)<br/>
    1.77 +			Description: <span class="description"> <xsl:value-of select="description"/> </span><br/>
    1.78  		      <span class="switch show-asserts" uid="{generate-id(assertSummary)}">[Show Assert Summary]</span><br/>
    1.79  			  <div class="asserts" uid="{generate-id(assertSummary)}">
    1.80  		        <xsl:for-each select="assert"> 
    1.81  			      <div class="assert">
    1.82 -  			        <xsl:attribute name="result">
    1.83 -				      <xsl:value-of select="result"/>
    1.84 -				    </xsl:attribute>
    1.85 -		            Assert name: <xsl:value-of select="name"/> <br/>
    1.86 -		            Result: <xsl:value-of select="result"/> <br/>
    1.87 -		            Message <xsl:value-of select="message"/> <br/>
    1.88 -		            Time <xsl:value-of select="time"/> <br/>
    1.89 +					<xsl:value-of select="name"/>: 
    1.90 +					<span class="assertResult">
    1.91 +						<xsl:attribute name="result">
    1.92 +					      <xsl:value-of select="result"/>
    1.93 +					    </xsl:attribute>
    1.94 +					  <xsl:value-of select="result"/>  
    1.95 +					</span>.
    1.96 +					 Message: <span class="description"><xsl:value-of select="message"/></span>
    1.97  		          </div>
    1.98  		        </xsl:for-each>
    1.99 -		        AssertSummary:
   1.100 -		        Assert count: <xsl:value-of select="assertSummary/assertCount"/> <br/>
   1.101 -		        Asserts Passed <xsl:value-of select="assertSummary/assertsPassed"/> <br/>
   1.102 -		        Asserts Failed <xsl:value-of select="assertSummary/assertsFailed"/> <br/>
   1.103 +				Asserts in total: <xsl:value-of select="assertSummary/assertCount"/> (passed: <xsl:value-of select="assertSummary/assertsPassed"/>, failed: <xsl:value-of select="assertSummary/assertsFailed"/>)
   1.104  		      </div>
   1.105      		</div>
   1.106  		  </xsl:for-each>