You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2013/05/17 00:00:11 UTC

[5/5] git commit: Add fix for slow page load

Add fix for slow page load


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/2015f1ec
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/2015f1ec
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/2015f1ec

Branch: refs/heads/master
Commit: 2015f1ece5723d327190b8cdd2e006db678ab4e2
Parents: 378986b
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Thu May 16 14:59:50 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Thu May 16 14:59:50 2013 -0700

----------------------------------------------------------------------
 .../itest/YUICompressorIntegrationTests.groovy     |   19 +++++++++-----
 1 files changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/2015f1ec/tapestry-yuicompressor/src/test/groovy/org/apache/tapestry5/yuicompressor/itest/YUICompressorIntegrationTests.groovy
----------------------------------------------------------------------
diff --git a/tapestry-yuicompressor/src/test/groovy/org/apache/tapestry5/yuicompressor/itest/YUICompressorIntegrationTests.groovy b/tapestry-yuicompressor/src/test/groovy/org/apache/tapestry5/yuicompressor/itest/YUICompressorIntegrationTests.groovy
index 5c091a0..76757f8 100644
--- a/tapestry-yuicompressor/src/test/groovy/org/apache/tapestry5/yuicompressor/itest/YUICompressorIntegrationTests.groovy
+++ b/tapestry-yuicompressor/src/test/groovy/org/apache/tapestry5/yuicompressor/itest/YUICompressorIntegrationTests.groovy
@@ -1,4 +1,4 @@
-// Copyright 2011, 2012 The Apache Software Foundation
+// Copyright 2011-2013 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -15,12 +15,12 @@
 package org.apache.tapestry5.yuicompressor.itest
 
 import org.apache.tapestry5.test.SeleniumTestCase
-import org.apache.tapestry5.test.TapestryTestConfiguration;
-import org.testng.annotations.Test;
+import org.apache.tapestry5.test.TapestryTestConfiguration
+import org.testng.annotations.Test
 
 @TapestryTestConfiguration(webAppFolder = "src/test/webapp")
-class YUICompressorIntegrationTests extends SeleniumTestCase
-{
+class YUICompressorIntegrationTests extends SeleniumTestCase {
+
     def AVAILABLE_OPTIONS = "css=.t-palette-available select";
 
     def SELECT_BUTTON = "css=.t-palette [data-action=select]";
@@ -30,6 +30,11 @@ class YUICompressorIntegrationTests extends SeleniumTestCase
 
         openBaseURL()
 
+        // Added this sleep in 5.4; necessary since JS is compressed
+        // during initial page render, not on subsequent request to
+        // load the JS.
+        sleep 500
+
         waitForPageInitialized()
 
         addSelection AVAILABLE_OPTIONS, "label=Clojure"
@@ -37,7 +42,7 @@ class YUICompressorIntegrationTests extends SeleniumTestCase
 
         addSelection AVAILABLE_OPTIONS, "label=Java"
         click SELECT_BUTTON
-        
+
         clickAndWait SUBMIT
 
         waitForPageInitialized()
@@ -53,4 +58,4 @@ class YUICompressorIntegrationTests extends SeleniumTestCase
 
         assertTitle "Tapestry 5: Bad JavaScript Demo"
     }
-}
+}
\ No newline at end of file