Made the default XSL style less blocky.
authorMarkus Kauppila <markus.kauppila@gmail.com>
Wed, 06 Jul 2011 23:49:36 +0300
changeset 5748 91a7152856f3
parent 5747 cba233c8f7fa
child 5749 0c63fb52e749
Made the default XSL style less blocky.
test/test-automation/skeleton.xsl
test/test-automation/style.xsl
--- a/test/test-automation/skeleton.xsl	Wed Jul 06 17:05:07 2011 +0300
+++ b/test/test-automation/skeleton.xsl	Wed Jul 06 23:49:36 2011 +0300
@@ -125,7 +125,7 @@
 }
 	
 .title {
-  font-weight: bold;
+  font-weight: bold; 
 }	
 </style>
 	
--- a/test/test-automation/style.xsl	Wed Jul 06 17:05:07 2011 +0300
+++ b/test/test-automation/style.xsl	Wed Jul 06 23:49:36 2011 +0300
@@ -102,22 +102,27 @@
 	$("div.asserts").hide();
 	
 	/* Color the tests based on the result */
-	$("div.test[result='passed']").addClass('passed');
-	$("div.test[result='failed']").addClass('failed');
+	$("span.testResult[result='passed']").addClass('passed');
+	$("span.testResult[result='failed']").addClass('failed');
 	
 	/* Color the asserts based on the result */
-	$("div.assert[result='pass']").addClass('passed');
-	$("div.assert[result='failure']").addClass('failed');
+	$("span.assertResult[result='pass']").addClass('passed');
+	$("span.assertResult[result='failure']").addClass('failed');
 });
 
 </script>
 <style>
 
 div, h1 {
-  padding: 3px 10px 2px 10px;
+  padding: 2px 10px 2px 10px;
   margin: 5px 0px 5px 0px;
 }
 
+.assert {
+  padding: 0px 10px 0px 10px;
+  margin: 0px 0px 0px 0px;
+}
+
 .document {
   font-family: Arial;
   font-size: 11pt;
@@ -139,17 +144,17 @@
 	
 .switch {
   font-style: italic;
-  color: rgb(10, 10, 200); /*#024A68;*/
+  color: rgb(10, 10, 200); 
   font-size: 10pt;
   cursor: pointer;
 }	
 	
 .passed {
- background-color: #64AA2B;
+ color: green;
 }
 
 .failed {
- background-color: #FF6E40;
+ color: red;
 }
 
 </style>
@@ -193,33 +198,29 @@
         <div class="tests" uid="{generate-id(test)}">
 	      <xsl:for-each select="test">
 			<div class="test">
+			Test <span class="title"><xsl:value-of select="name"/>: </span>
+			<span class="testResult">
 			  <xsl:attribute name="result">
-			    <xsl:value-of select="result"/>
-	          </xsl:attribute>
-		      
-		      Name:  <xsl:value-of select="name"/> (<xsl:value-of select="startTime"/>  - <xsl:value-of select="endTime"/>  ) <br/>
-		      Description: <span class="description"> <xsl:value-of select="description"/> </span><br/> 
-		
-	          Total runtime: <xsl:value-of select="totalRuntime"/> seconds  <br/>
-		      Result: <xsl:value-of select="result"/>  <br/>
-		      
+			    <xsl:value-of select="result"/> 
+	           </xsl:attribute><xsl:value-of select="result"/> 
+	        </span> 
+			(Total runtime: <xsl:value-of select="totalRuntime"/> seconds)<br/>
+			Description: <span class="description"> <xsl:value-of select="description"/> </span><br/>
 		      <span class="switch show-asserts" uid="{generate-id(assertSummary)}">[Show Assert Summary]</span><br/>
 			  <div class="asserts" uid="{generate-id(assertSummary)}">
 		        <xsl:for-each select="assert"> 
 			      <div class="assert">
-  			        <xsl:attribute name="result">
-				      <xsl:value-of select="result"/>
-				    </xsl:attribute>
-		            Assert name: <xsl:value-of select="name"/> <br/>
-		            Result: <xsl:value-of select="result"/> <br/>
-		            Message <xsl:value-of select="message"/> <br/>
-		            Time <xsl:value-of select="time"/> <br/>
+					<xsl:value-of select="name"/>: 
+					<span class="assertResult">
+						<xsl:attribute name="result">
+					      <xsl:value-of select="result"/>
+					    </xsl:attribute>
+					  <xsl:value-of select="result"/>  
+					</span>.
+					 Message: <span class="description"><xsl:value-of select="message"/></span>
 		          </div>
 		        </xsl:for-each>
-		        AssertSummary:
-		        Assert count: <xsl:value-of select="assertSummary/assertCount"/> <br/>
-		        Asserts Passed <xsl:value-of select="assertSummary/assertsPassed"/> <br/>
-		        Asserts Failed <xsl:value-of select="assertSummary/assertsFailed"/> <br/>
+				Asserts in total: <xsl:value-of select="assertSummary/assertCount"/> (passed: <xsl:value-of select="assertSummary/assertsPassed"/>, failed: <xsl:value-of select="assertSummary/assertsFailed"/>)
 		      </div>
     		</div>
 		  </xsl:for-each>