continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1542933 - in /continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test: QueueTest.java parent/AbstractSeleniumTest.java
Date Mon, 18 Nov 2013 07:40:59 GMT
Author: brett
Date: Mon Nov 18 07:40:59 2013
New Revision: 1542933

URL: http://svn.apache.org/r1542933
Log:
[CONTINUUM-2713] don't wait for page

JavaScript based validation picks this up

Modified:
    continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java
    continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java

Modified: continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java?rev=1542933&r1=1542932&r2=1542933&view=diff
==============================================================================
--- continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java
(original)
+++ continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java
Mon Nov 18 07:40:59 2013
@@ -44,7 +44,7 @@ public class QueueTest
     public void testAddBuildQueue()
     {
         setMaxBuildQueue( 2 );
-        addBuildQueue( buildQueueName, true );
+        addBuildQueue( buildQueueName );
     }
 
     public void testQueuePageWithoutBuild()
@@ -107,7 +107,7 @@ public class QueueTest
     public void testAddEmptyBuildQueue()
     {
         setMaxBuildQueue( 3 );
-        addBuildQueue( "", false );
+        addBuildQueue( "", false, false );
         assertTextPresent( "You must define a name" );
     }
 
@@ -116,7 +116,7 @@ public class QueueTest
         setMaxBuildQueue( 3 );
         goToBuildQueuePage();
         String testBuildQueue = "test_build_queue";
-        addBuildQueue( testBuildQueue, true );
+        addBuildQueue( testBuildQueue );
 
         removeBuildQueue( testBuildQueue );
         assertTextNotPresent( testBuildQueue );
@@ -195,21 +195,32 @@ public class QueueTest
         assertButtonWithValuePresent( "Cancel" );
     }
 
+    protected void addBuildQueue( String name )
+    {
+        addBuildQueue( name, true );
+    }
+
     protected void addBuildQueue( String name, boolean success )
     {
+        addBuildQueue( name, success, true );
+    }
+
+    protected void addBuildQueue( String name, boolean success, boolean waitForError )
+    {
         goToBuildQueuePage();
         assertBuildQueuePage();
         submit();
         assertAddBuildQueuePage();
         setFieldValue( "name", name );
-        submit();
         if ( success )
         {
+            submit();
             assertBuildQueuePage();
             assertTextPresent( name );
         }
         else
         {
+            submit( waitForError );
             assertAddBuildQueuePage();
         }
     }

Modified: continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java?rev=1542933&r1=1542932&r2=1542933&view=diff
==============================================================================
--- continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
(original)
+++ continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
Mon Nov 18 07:40:59 2013
@@ -249,7 +249,12 @@ public abstract class AbstractSeleniumTe
 
     protected void submit()
     {
-        clickLinkWithXPath( "//input[@type='submit']" );
+        submit( true );
+    }
+
+    protected void submit( boolean wait )
+    {
+        clickLinkWithXPath( "//input[@type='submit']", wait );
     }
 
     protected void assertButtonWithValuePresent( String text )



Mime
View raw message