continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r899086 - in /continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test: UserRolesManagementTest.java parent/AbstractContinuumTest.java
Date Thu, 14 Jan 2010 07:35:17 GMT
Author: brett
Date: Thu Jan 14 07:35:17 2010
New Revision: 899086

URL: http://svn.apache.org/viewvc?rev=899086&view=rev
Log:
fix user roles management test

Modified:
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java?rev=899086&r1=899085&r2=899086&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
Thu Jan 14 07:35:17 2010
@@ -268,17 +268,7 @@
         assertAddMavenTwoProjectPage();
         setFieldValue( "m2PomUrl", "https://svn.apache.org/repos/asf/continuum/sandbox/continuum-build-queue-test-data/pom.xml"
);
         clickButtonWithValue( "Add" );
-        String title;
-        boolean success = true;
-        if ( success )
-        {
-            title = "Continuum - Project Group";
-        }
-        else
-        {
-            title = "Continuum - Add Maven 2 Project";
-        }
-        waitAddProject( title );
+        waitAddProject( "Continuum - Project Group" );
         assertTextPresent( "ContinuumBuildQueueTestData" );
     }
     

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java?rev=899086&r1=899085&r2=899086&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
Thu Jan 14 07:35:17 2010
@@ -796,13 +796,9 @@
     public void waitAddProject(String title )
         throws Exception
     {
-
-    	Thread.sleep( 4000 );
-        String condition = "selenium.browserbot.getCurrentWindow().document.title != ''";
+        String condition = "selenium.browserbot.getCurrentWindow().document.title.replace(/^\\s*/,
\"\").replace(/\\s*$/, \"\") != ''";
         getSelenium().waitForCondition( condition, maxWaitTimeInMs );
-        Thread.sleep( 1000 );
-        String t = getTitle();
-        Assert.assertTrue( t.contains( title ) );
+        Assert.assertEquals( getTitle(), title );
     }
 
     public void createAndAddUserAsDeveloperToGroup( String username, String name, String
email, String password, String groupName )



Mime
View raw message