You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2014/04/26 14:06:33 UTC

[10/10] git commit: re-enable the integration tests in tapestry-upload

re-enable the integration tests in tapestry-upload


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

Branch: refs/heads/master
Commit: 138414fafd3c835b3aaa705cc095952c82ec3058
Parents: 6ef3fba
Author: Jochen Kemnade <jo...@web.de>
Authored: Sat Apr 26 13:43:56 2014 +0200
Committer: Jochen Kemnade <jo...@web.de>
Committed: Sat Apr 26 13:43:56 2014 +0200

----------------------------------------------------------------------
 tapestry-upload/src/test/conf/testng.xml                      | 5 ++---
 .../tapestry5/upload/integration/UploadIntegrationTest.java   | 7 +++----
 2 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/138414fa/tapestry-upload/src/test/conf/testng.xml
----------------------------------------------------------------------
diff --git a/tapestry-upload/src/test/conf/testng.xml b/tapestry-upload/src/test/conf/testng.xml
index 6e63873..a6ed192 100755
--- a/tapestry-upload/src/test/conf/testng.xml
+++ b/tapestry-upload/src/test/conf/testng.xml
@@ -17,12 +17,11 @@
 
 <suite name="Tapesty Upload Component" parallel="false" annotations="1.5" verbose="2">
     <test name="Tapesty Upload Component">
-        <parameter name="tapestry.integration-webapp" value="src/test/webapp"/>
+        <parameter name="tapestry.web-app-folder" value="src/test/webapp"/>
         <packages>
             <package name="org.apache.tapestry5.upload.components"/>
             <package name="org.apache.tapestry5.upload.internal.services"/>
-            <!-- One day might be able to run this too -->
-            <!--package name="org.apache.tapestry5.upload.integration"/-->
+            <package name="org.apache.tapestry5.upload.integration"/>
         </packages>
     </test>
 </suite>

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/138414fa/tapestry-upload/src/test/java/org/apache/tapestry5/upload/integration/UploadIntegrationTest.java
----------------------------------------------------------------------
diff --git a/tapestry-upload/src/test/java/org/apache/tapestry5/upload/integration/UploadIntegrationTest.java b/tapestry-upload/src/test/java/org/apache/tapestry5/upload/integration/UploadIntegrationTest.java
index 2819995..81f308e 100755
--- a/tapestry-upload/src/test/java/org/apache/tapestry5/upload/integration/UploadIntegrationTest.java
+++ b/tapestry-upload/src/test/java/org/apache/tapestry5/upload/integration/UploadIntegrationTest.java
@@ -22,9 +22,6 @@ import org.testng.annotations.Test;
 import java.io.File;
 import java.io.IOException;
 
-/**
- * TODO: These tests wont work because Selenium cannot enter values for input type="file'
- */
 public class UploadIntegrationTest extends SeleniumTestCase
 {
 
@@ -44,7 +41,7 @@ public class UploadIntegrationTest extends SeleniumTestCase
         }
     }
 
-    @Test(enabled = false)
+    @Test
     public void integration_test() throws Exception
     {
 
@@ -52,7 +49,9 @@ public class UploadIntegrationTest extends SeleniumTestCase
 
         File source = new File("test/data/upload.txt");
 
+        type("name", "Sample file");
         type("file", source.getCanonicalPath());
+
         clickAndWait("//input[@value='Upload']");
     }
 }