tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r1141349 - /tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/js-testing.js
Date Thu, 30 Jun 2011 00:38:25 GMT
Author: hlship
Date: Thu Jun 30 00:38:24 2011
New Revision: 1141349

URL: http://svn.apache.org/viewvc?rev=1141349&view=rev
Log:
TAP5-999: More control over scrolling in both success and failure scenarios

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/js-testing.js

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/js-testing.js
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/js-testing.js?rev=1141349&r1=1141348&r2=1141349&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/js-testing.js
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/js-testing.js
Thu Jun 30 00:38:24 2011
@@ -47,7 +47,7 @@ var JST = (function() {
 		resultElement.insert({
 			top : "FAIL - ",
 			after : "<hr>" + text
-		}).up("div").addClassName("fail");
+		}).up("div").addClassName("fail").scrollTo();
 
 		throw $fail;
 	}
@@ -89,8 +89,6 @@ var JST = (function() {
 
 					test.addClassName("active");
 
-					test.scrollTo();
-
 					resultElement = test.down("p");
 					resultNoted = false;
 
@@ -118,7 +116,7 @@ var JST = (function() {
 												+ toString(e) + "</div>"
 									});
 
-							test.addClassName("fail");
+							test.addClassName("fail").scrollTo();
 						}
 					}
 
@@ -136,6 +134,10 @@ var JST = (function() {
 										fail : failCount
 									})
 						});
+
+		if (failCount == 0) {
+			$(elementId).down("p").scrollTo();
+		}
 	}
 
 	function runTestSuite(elementId) {



Mime
View raw message