continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmora...@apache.org
Subject svn commit: r787299 - in /continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test: UserRolesManagementTest.java parent/AbstractSeleniumTest.java parent/AbstractUserRolesManagementTest.java
Date Mon, 22 Jun 2009 16:03:40 GMT
Author: jmorales
Date: Mon Jun 22 16:03:40 2009
New Revision: 787299

URL: http://svn.apache.org/viewvc?rev=787299&view=rev
Log:
[CONTINUUM-2267][CONTINUUM-2268] . Selenium tests fail when run with JDK 1.6

Change useroletest, and for CONTINUUM-2268 change filename pattern, replace character ':' for '_'. Character ':' is not allowed in filename for windows.

Modified:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java?rev=787299&r1=787298&r2=787299&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java Mon Jun 22 16:03:40 2009
@@ -3,520 +3,500 @@
 import org.apache.continuum.web.test.parent.AbstractUserRolesManagementTest;
 import org.testng.annotations.Test;
 
-
 @Test( groups = { "userroles" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
 public class UserRolesManagementTest
-	extends AbstractUserRolesManagementTest
+    extends AbstractUserRolesManagementTest
 {
-	public void testBasicAddDeleteUser()
-	{
-		username = getProperty( "GUEST_USERNAME" );
+    public void testBasicAddDeleteUser()
+    {
+        username = getProperty( "GUEST_USERNAME" );
         fullname = getProperty( "GUEST_FULLNAME" );
 
-		createUser( username, fullname, getUserEmail(), getUserRolePassword(), true);
-		deleteUser( username, fullname, getUserEmail() );
-		clickLinkWithText( "Logout" );
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithGuestRole()
-	{
-		username = getProperty( "GUEST_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        deleteUser( username, fullname, getUserEmail() );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithGuestRole()
+    {
+        username = getProperty( "GUEST_USERNAME" );
         fullname = getProperty( "GUEST_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText( "Show Project Groups" );
-		assertTextPresent( "Project Groups list is empty." );
-		clickLinkWithText("Logout");
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithRegisteredUserRole()
-	{
-		username = getProperty( "REGISTERED_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Show Project Groups" );
+        assertTextPresent( "Project Groups list is empty." );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithRegisteredUserRole()
+    {
+        username = getProperty( "REGISTERED_USERNAME" );
         fullname = getProperty( "REGISTERED_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText( "Show Project Groups" );
-		assertTextPresent( "Project Groups list is empty." );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithSystemAdminRole()
-	{
-		username = getProperty( "SYSAD_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Show Project Groups" );
+        assertTextPresent( "Project Groups list is empty." );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithSystemAdminRole()
+    {
+        username = getProperty( "SYSAD_USERNAME" );
         fullname = getProperty( "SYSAD_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText( "Show Project Groups" );
-		assertTextNotPresent( "Project Groups list is empty." );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithUserAdminRole()
-	{
-		username = getProperty( "USERADMIN_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Show Project Groups" );
+        assertTextNotPresent( "Project Groups list is empty." );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithUserAdminRole()
+    {
+        username = getProperty( "USERADMIN_USERNAME" );
         fullname = getProperty( "USERADMIN_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		selectValue( "name=ec_rd" , "50" );
-		waitPage();
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText( "Show Project Groups" );
-		assertTextPresent( "Project Groups list is empty." );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithContinuumGroupProjectAdminRole()
-	{
-		username = getProperty( "GROUPPROJECTADMIN_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+            checkUserRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Show Project Groups" );
+        assertTextPresent( "Project Groups list is empty." );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithContinuumGroupProjectAdminRole()
+    {
+        username = getProperty( "GROUPPROJECTADMIN_USERNAME" );
         fullname = getProperty( "GROUPPROJECTADMIN_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithContinuumGroupProjectDeveloperRole()
-	{
-		username = getProperty( "GROUPPROJECTDEVELOPER_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithContinuumGroupProjectDeveloperRole()
+    {
+        username = getProperty( "GROUPPROJECTDEVELOPER_USERNAME" );
         fullname = getProperty( "GROUPPROJECTDEVELOPER_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithContinuumGroupProjectUserRole()
-	{
-		username = getProperty( "GROUPPROJECTUSER_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithContinuumGroupProjectUserRole()
+    {
+        username = getProperty( "GROUPPROJECTUSER_USERNAME" );
         fullname = getProperty( "GROUPPROJECTUSER_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithContinuumManageBuildEnvironmentRole()
-	{
-		username = getProperty( "MANAGEBUILDENVIRONMENT_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithContinuumManageBuildEnvironmentRole()
+    {
+        username = getProperty( "MANAGEBUILDENVIRONMENT_USERNAME" );
         fullname = getProperty( "MANAGEBUILDENVIRONMENT_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithContinuumManageBuildTemplatesRole()
-	{
-		username = getProperty( "MANAGEBUILDTEMPLATES_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithContinuumManageBuildTemplatesRole()
+    {
+        username = getProperty( "MANAGEBUILDTEMPLATES_USERNAME" );
         fullname = getProperty( "MANAGEBUILDTEMPLATES_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithContinuumManageInstallationsRole()
-	{
-		username = getProperty( "MANAGEINSTALLATIONS_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithContinuumManageInstallationsRole()
+    {
+        username = getProperty( "MANAGEINSTALLATIONS_USERNAME" );
         fullname = getProperty( "MANAGEINSTALLATIONS_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithContinuumManageLocalRepoRole()
-	{
-		username = getProperty( "MANAGELOCALREPOS_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithContinuumManageLocalRepoRole()
+    {
+        username = getProperty( "MANAGELOCALREPOS_USERNAME" );
         fullname = getProperty( "MANAGELOCALREPOS_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithContinuumManagePurgingRole()
-	{
-		username = getProperty( "MANAGEPURGING_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithContinuumManagePurgingRole()
+    {
+        username = getProperty( "MANAGEPURGING_USERNAME" );
         fullname = getProperty( "MANAGEPURGING_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithContinuumManageQueuesRole()
-	{
-		username = getProperty( "MANAGEQUEUES_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithContinuumManageQueuesRole()
+    {
+        username = getProperty( "MANAGEQUEUES_USERNAME" );
         fullname = getProperty( "MANAGEQUEUES_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithContinuumManageSchedulingRole()
-	{
-		username = getProperty( "MANAGESCHEDULING_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithContinuumManageSchedulingRole()
+    {
+        username = getProperty( "MANAGESCHEDULING_USERNAME" );
         fullname = getProperty( "MANAGESCHEDULING_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithProjectAdminDefaultProjectGroup()
-	{
-		username = getProperty( "PROJECTADMINISTRATOR_DEFAULTPROJECTGROUP_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithProjectAdminDefaultProjectGroup()
+    {
+        username = getProperty( "PROJECTADMINISTRATOR_DEFAULTPROJECTGROUP_USERNAME" );
         fullname = getProperty( "PROJECTADMINISTRATOR_DEFAULTPROJECTGROUP_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkResourceRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithProjectDevDefaultProjectGroup()
-	{
-		username = getProperty( "PROJECTDEVELOPER_DEFAULTPROJECTGROUP_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkResourceRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithProjectDevDefaultProjectGroup()
+    {
+        username = getProperty( "PROJECTDEVELOPER_DEFAULTPROJECTGROUP_USERNAME" );
         fullname = getProperty( "PROJECTDEVELOPER_DEFAULTPROJECTGROUP_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkResourceRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
-
-        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
-	public void testUserWithProjectUserDefaultProjectGroup()
-	{
-		username = getProperty( "PROJECTUSER_DEFAULTPROJECTGROUP_USERNAME" );
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkResourceRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testUserWithProjectUserDefaultProjectGroup()
+    {
+        username = getProperty( "PROJECTUSER_DEFAULTPROJECTGROUP_USERNAME" );
         fullname = getProperty( "PROJECTUSER_DEFAULTPROJECTGROUP_FULLNAME" );
 
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkResourceRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-		clickLinkWithText("Logout");
-
-		login( username, getUserRolePassword() );
-		changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-		waitPage();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText("Logout");
-		login( getAdminUsername(), getAdminPassword());
-	}
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkResourceRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        waitPage();
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
 
 }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java?rev=787299&r1=787298&r2=787299&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java Mon Jun 22 16:03:40 2009
@@ -129,7 +129,6 @@
         return value;
     }
 
-
     /**
      * Close selenium session. Called from AfterSuite method of sub-class
      */
@@ -146,20 +145,26 @@
     public void assertFieldValue( String fieldValue, String fieldName )
     {
         assertElementPresent( fieldName );
-        try {
-	    Assert.assertEquals( fieldValue, getSelenium().getValue( fieldName ) );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertEquals( fieldValue, getSelenium().getValue( fieldName ) );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public void assertPage( String title )
     {
-        try {
-	    Assert.assertEquals( getTitle(), title );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertEquals( getTitle(), title );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public String getTitle()
@@ -174,56 +179,74 @@
 
     public void assertTextPresent( String text )
     {
-        try {
-	    Assert.assertTrue( getSelenium().isTextPresent( text ), "'" + text + "' isn't present." );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertTrue( getSelenium().isTextPresent( text ), "'" + text + "' isn't present." );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public void assertTextNotPresent( String text )
     {
-        try {
-	    Assert.assertFalse( getSelenium().isTextPresent( text ), "'" + text + "' is present." );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertFalse( getSelenium().isTextPresent( text ), "'" + text + "' is present." );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public void assertElementPresent( String elementLocator )
     {
-        try {
-	    Assert.assertTrue( isElementPresent( elementLocator ), "'" + elementLocator + "' isn't present." );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertTrue( isElementPresent( elementLocator ), "'" + elementLocator + "' isn't present." );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public void assertElementNotPresent( String elementLocator )
     {
- 	try {
-	    Assert.assertFalse( isElementPresent( elementLocator ), "'" + elementLocator + "' is present." );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertFalse( isElementPresent( elementLocator ), "'" + elementLocator + "' is present." );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public void assertLinkPresent( String text )
     {
-        try {
-	    Assert.assertTrue( isElementPresent( "link=" + text ), "The link '" + text + "' isn't present." );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertTrue( isElementPresent( "link=" + text ), "The link '" + text + "' isn't present." );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public void assertLinkNotPresent( String text )
     {
-        try {
-	    Assert.assertFalse( isElementPresent( "link=" + text ), "The link '" + text + "' is present." );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertFalse( isElementPresent( "link=" + text ), "The link '" + text + "' is present." );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public void assertImgWithAlt( String alt )
@@ -242,11 +265,14 @@
 
     public void assertCellValueFromTable( String expected, String tableElement, int row, int column )
     {
-        try {
-	    Assert.assertEquals( expected, getCellValueFromTable( tableElement, row, column ) );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertEquals( expected, getCellValueFromTable( tableElement, row, column ) );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public boolean isTextPresent( String text )
@@ -290,22 +316,28 @@
         String[] optionsPresent = getSelenium().getSelectOptions( selectField );
         List<String> expected = Arrays.asList( options );
         List<String> present = Arrays.asList( optionsPresent );
-        try {
-	    Assert.assertTrue( present.containsAll( expected ), "Options expected are not included in present options" );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertTrue( present.containsAll( expected ), "Options expected are not included in present options" );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public void assertSelectedValue( String value, String fieldName )
     {
         assertElementPresent( fieldName );
         String optionsPresent = getSelenium().getSelectedLabel( value );
-        try {
-	    Assert.assertEquals( optionsPresent, value );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertEquals( optionsPresent, value );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public void submit()
@@ -315,29 +347,38 @@
 
     public void assertButtonWithValuePresent( String text )
     {
-        try {
-	    Assert.assertTrue( isButtonWithValuePresent( text ), "'" + text + "' button isn't present" );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertTrue( isButtonWithValuePresent( text ), "'" + text + "' button isn't present" );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public void assertButtonWithIdPresent( String id )
     {
-        try {
-	    Assert.assertTrue( isButtonWithIdPresent( id ), "'Button with id =" + id + "' isn't present" );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertTrue( isButtonWithIdPresent( id ), "'Button with id =" + id + "' isn't present" );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public void assertButtonWithValueNotPresent( String text )
     {
-        try {
-	    Assert.assertFalse( isButtonWithValuePresent( text ), "'" + text + "' button is present" );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertFalse( isButtonWithValuePresent( text ), "'" + text + "' button is present" );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public boolean isButtonWithValuePresent( String text )
@@ -454,91 +495,119 @@
 
     public void assertIsChecked( String locator )
     {
-        try {
-	    Assert.assertTrue( getSelenium().isChecked( locator ) );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertTrue( getSelenium().isChecked( locator ) );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public void assertIsNotChecked( String locator )
     {
-        try {
-	    Assert.assertFalse( getSelenium().isChecked( locator ) );
-	} catch(java.lang.AssertionError e){        	
-       	    captureAssertionError(e);
-	}
+        try
+        {
+            Assert.assertFalse( getSelenium().isChecked( locator ) );
+        }
+        catch ( java.lang.AssertionError e )
+        {
+            captureAssertionError( e );
+        }
     }
 
     public void clickAndWait( String locator )
-	{
-	  getSelenium().click(locator);
-	  getSelenium().waitForPageToLoad(maxWaitTimeInMs);
-	}
+    {
+        getSelenium().click( locator );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+    }
 
     public void waitForElementPresent( String locator )
         throws InterruptedException
     {
-    	getSelenium().waitForPageToLoad(maxWaitTimeInMs);
-    	for (int second = 0;; second++) {
-    		if (second >= 60) Assert.fail("timeout");
-    		try { if ( isElementPresent(locator)) break; } catch (Exception e) {}
-    		Thread.sleep(1000);
-    	}
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        for ( int second = 0;; second++ )
+        {
+            if ( second >= 60 )
+                Assert.fail( "timeout" );
+            try
+            {
+                if ( isElementPresent( locator ) )
+                    break;
+            }
+            catch ( Exception e )
+            {
+            }
+            Thread.sleep( 1000 );
+        }
     }
 
     public void waitForTextPresent( String text )
         throws InterruptedException
     {
-    	getSelenium().waitForPageToLoad(maxWaitTimeInMs);
-    	for (int second = 0;; second++) {
-    		if (second >= 60) Assert.fail( "Timeout" );
-    		try { if ( isTextPresent(text)) break; } catch (Exception e) {}
-    		Thread.sleep(1000);
-    	}
-    }
-
-    // captureAssertionError() creates a 'target/screenshots' directory and saves '.png' page screenshot of the encountered error
-    public void captureError() 
-    {
-    	File f = new File("");
-    	String filePath = f.getAbsolutePath();
-    	Date d = new Date();
-    	SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd-HH:mm:ss");
-    	String time = sdf.format(d);
-    	String fs = File.separator;
-    	File targetPath = new File(filePath + fs + "target" + fs + "screenshots");
-    	targetPath.mkdir();
-    	String cName = getClass().getName();
-    	StackTraceElement stackTrace [] = new Throwable().fillInStackTrace().getStackTrace();
-	int index = getStackTraceIndexOfCallingClass(cName, stackTrace);
-	String methodName = stackTrace[index].getMethodName();
-	int lNumber = stackTrace[index].getLineNumber();
-	String lineNumber = Integer.toString(lNumber);
-	String className = cName.substring(cName.lastIndexOf('.') + 1);
-	String fileName = targetPath.toString() + fs + methodName + "("  + className + ".java:" + lineNumber + ")-" + time + ".png";
-	getSelenium().windowMaximize();
-	getSelenium().captureEntirePageScreenshot(fileName, "");
-    }
-    
-    public int getStackTraceIndexOfCallingClass( String nameOfClass, StackTraceElement stackTrace [] ) 
-    {
-    	boolean match = false;
-    	int i = 0;
-    	do {
-    		String className = stackTrace[i].getClassName();
-    		match = Pattern.matches(nameOfClass, className);
-    		i++;
-        } while (match == false);
-	i--;
-    	return i;
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        for ( int second = 0;; second++ )
+        {
+            if ( second >= 60 )
+                Assert.fail( "Timeout" );
+            try
+            {
+                if ( isTextPresent( text ) )
+                    break;
+            }
+            catch ( Exception e )
+            {
+            }
+            Thread.sleep( 1000 );
+        }
+    }
+
+    // captureAssertionError() creates a 'target/screenshots' directory and saves '.png' page screenshot of the
+    // encountered error
+    public void captureError()
+    {
+        File f = new File( "" );
+        String filePath = f.getAbsolutePath();
+        Date d = new Date();
+        SimpleDateFormat sdf = new SimpleDateFormat( "yyyy.MM.dd-HH_mm_ss" );
+        String time = sdf.format( d );
+        String fs = File.separator;
+        File targetPath = new File( filePath + fs + "target" + fs + "screenshots" );
+        targetPath.mkdir();
+        String cName = getClass().getName();
+        StackTraceElement stackTrace[] = new Throwable().fillInStackTrace().getStackTrace();
+        int index = getStackTraceIndexOfCallingClass( cName, stackTrace );
+        String methodName = stackTrace[index].getMethodName();
+        int lNumber = stackTrace[index].getLineNumber();
+        String lineNumber = Integer.toString( lNumber );
+        String className = cName.substring( cName.lastIndexOf( '.' ) + 1 );
+        String fileName =
+            targetPath.toString() + fs + methodName + "(" + className + ".java_" + lineNumber + ")-" + time + ".png";
+        getSelenium().windowMaximize();
+        getSelenium().captureEntirePageScreenshot( fileName, "" );
+    }
+
+    public int getStackTraceIndexOfCallingClass( String nameOfClass, StackTraceElement stackTrace[] )
+    {
+        boolean match = false;
+        int i = 0;
+        do
+        {
+            String className = stackTrace[i].getClassName();
+            match = Pattern.matches( nameOfClass, className );
+            i++;
+        }
+        while ( match == false );
+        i--;
+        return i;
     }
 
-    // captureError calls the captureAssertionError method to capture screenshot and 
+    // captureError calls the captureAssertionError method to capture screenshot and
     // throw an assertion error for the errors to be displayed in the build results summary
-    public void captureAssertionError( Object e ) 
+    public void captureAssertionError( Object e )
     {
-    	captureError();
-    	throw new java.lang.AssertionError(e);
+        captureError();
+        throw new java.lang.AssertionError( e );
     }
 }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java?rev=787299&r1=787298&r2=787299&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java Mon Jun 22 16:03:40 2009
@@ -82,6 +82,14 @@
 				assertTextPresent( userroles );
 	}
 
+	   public void assertCreatedUserInfo( String username )
+    {
+        selectValue( "name=ec_rd", "50" );
+        waitPage();
+        clickLinkWithText( username );
+        clickLinkWithText( "Edit Roles" );
+    }
+
 	public void assertUserRoleCheckBoxPresent( String value )
     {
     	getSelenium().isElementPresent( "xpath=//input[@id='addRolesToUser_addNDSelectedRoles' and @name='addNDSelectedRoles' and @value='"+ value + "']" );



Mime
View raw message