You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by mb...@apache.org on 2010/04/07 11:27:06 UTC

svn commit: r931475 [2/3] - in /archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test: ./ listener/ parent/

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/UserRolesTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/UserRolesTest.java?rev=931475&r1=931474&r2=931475&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/UserRolesTest.java (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/UserRolesTest.java Wed Apr  7 09:27:05 2010
@@ -23,288 +23,260 @@ import org.apache.archiva.web.test.paren
 import org.testng.annotations.Test;
 
 @Test( groups = { "userroles" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
-public class UserRolesTest 
-	extends AbstractArchivaTest
+public class UserRolesTest
+    extends AbstractArchivaTest
 {
 
-	public void testBasicAddDeleteUser()
-	{
-		username = getProperty( "GUEST_USERNAME" );
-		fullname = getProperty( "GUEST_FULLNAME" );
-		
-		createUser( username, fullname, getUserEmail(), getUserRolePassword(), true);
-		deleteUser( username, fullname, getUserEmail() );
-        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" );
-
-        logout();
-        login(username, getUserRolePassword());
-		changePassword( getUserRolePassword(), getUserRoleNewPassword());
-		
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-        logout();
-        //assertTextPresent("You are already logged in.");
-		
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-        logout();
-        login( getAdminUsername() , getAdminPassword() );
-	}
-	
-	@Test (dependsOnMethods = { "testUserWithGuestRole" } )
-	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" );
-
-        logout();
-        login(username, getUserRolePassword());
-		changePassword( getUserRolePassword(), getUserRoleNewPassword());
-		
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-        logout();
-        //assertTextPresent("You are already logged in.");
-		
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-        logout();
-        login( getAdminUsername() , getAdminPassword() );
-	}
-	
-	@Test (dependsOnMethods = { "testUserWithRegisteredUserRole" } )
-	public void testUserWithSysAdminUserRole()
-	{
-		username = getProperty("SYSAD_USERNAME");
-		fullname = getProperty("SYSAD_FULLNAME");
-		
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-        logout();
-        login(username, getUserRolePassword());
-		changePassword( getUserRolePassword(), getUserRoleNewPassword());
-		
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-        logout();
-        //assertTextPresent("You are already logged in.");
-		
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-        logout();
-        login( getAdminUsername() , getAdminPassword() );
-	}
-	
-	@Test (dependsOnMethods = { "testUserWithSysAdminUserRole" } )
-	public void testUserWithUserAdminUserRole()
-	{
-		username = getProperty("USERADMIN_USERNAME");
-		fullname = getProperty("USERADMIN_FULLNAME");
-		
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-        logout();
-        login(username, getUserRolePassword());
-		changePassword( getUserRolePassword(), getUserRoleNewPassword());
-		
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-        logout();
-        //assertTextPresent("You are already logged in.");
-		
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-        logout();
-        login( getAdminUsername() , getAdminPassword() );
-	}
-	
-	@Test (dependsOnMethods = { "testUserWithUserAdminUserRole" } )
-	public void testUserWithGlobalRepoManagerRole()
-	{
-		username = getProperty("GLOBALREPOMANAGER_USERNAME");
-		fullname = getProperty("GLOBALREPOMANAGER_FULLNAME");
-		
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-        logout();
-        login(username, getUserRolePassword());
-		changePassword( getUserRolePassword(), getUserRoleNewPassword());
-		
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-        logout();
-        //assertTextPresent("You are already logged in.");
-		
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-        logout();
-        login( getAdminUsername() , getAdminPassword() );
-	}
-
-	@Test (dependsOnMethods = { "testUserWithGlobalRepoManagerRole" } )
-	public void testUserWithGlobalRepoObserverRole()
-	{
-		username = getProperty("GLOBALREPOOBSERVER_USERNAME");
-		fullname = getProperty("GLOBALREPOOBSERVER_FULLNAME");
-		
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkUserRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-        logout();
-        login(username, getUserRolePassword());
-		changePassword( getUserRolePassword(), getUserRoleNewPassword());
-		
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-        logout();
-        //assertTextPresent("You are already logged in.");
-		
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-        logout();
-        login( getAdminUsername() , getAdminPassword() );
-	}
-	
-	@Test (dependsOnMethods = { "testUserWithGlobalRepoObserverRole" } )
-	public void testUserWithRepoManagerInternalRole()
-	{
-		username = getProperty("REPOMANAGER_INTERNAL_USERNAME");
-		fullname = getProperty("REPOMANAGER_INTERNAL_FULLNAME");
-		
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkResourceRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-        logout();
-        login(username, getUserRolePassword());
-		changePassword( getUserRolePassword(), getUserRoleNewPassword());
-		
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-        logout();
-        //assertTextPresent("You are already logged in.");
-		
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-        logout();
-        login( getAdminUsername() , getAdminPassword() );
-	}
-	
-	/*@Test (dependsOnMethods = { "testUserWithRepoManagerInternalRole" } )
-	public void testUserWithRepoManagerSnapshotsRole()
-	{
-		username = getProperty("REPOMANAGER_SNAPSHOTS_USERNAME");
-		fullname = getProperty("REPOMANAGER_SNAPSHOTS_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();
-		clickLinkWithText("Logout");
-		//assertTextPresent("You are already logged in.");
-		
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-		clickLinkWithText("Logout");
-		login( getAdminUsername() , getAdminPassword() );
-	}*/
-	
-	@Test (dependsOnMethods = { "testUserWithRepoManagerInternalRole" } )
-	public void testUserWithRepoObserverInternalRole()
-	{
-		username = getProperty( "REPOOBSERVER_INTERNAL_USERNAME" );
-		fullname = getProperty( "REPOOBSERVER_INTERNAL_FULLNAME" );
-		
-		createUser(username, fullname, getUserEmail(), getUserRolePassword(), true);
-		clickLinkWithText( username );
-		clickLinkWithText( "Edit Roles" );
-		checkResourceRoleWithValue( fullname );
-		clickButtonWithValue( "Submit" );
-
-        logout();
-        login(username, getUserRolePassword());
-		changePassword( getUserRolePassword(), getUserRoleNewPassword());
-		
-		// this section will be removed if issue from redback after changing password will be fixed.
-		getSelenium().goBack();
-        logout();
-        //assertTextPresent("You are already logged in.");
-		
-		login(username, getUserRoleNewPassword());
-		assertLeftNavMenuWithRole( fullname );
-        logout();
-        login( getAdminUsername() , getAdminPassword() );
-	}
-
-    /*@Test (dependsOnMethods = { "testUserWithRepoObserverInternalRole" } )
-     public void testUserWithRepoObserverSnapshotsRole()
-     {
-         username = getProperty( "REPOOBSERVER_SNAPSHOTS_USERNAME" );
-         fullname = getProperty( "REPOOBSERVER_SNAPSHOTS_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();
-         clickLinkWithText("Logout");
-         //assertTextPresent("You are already logged in.");
-
-         login(username, getUserRoleNewPassword());
-         assertLeftNavMenuWithRole( fullname );
-         clickLinkWithText("Logout");
-         login( getAdminUsername() , getAdminPassword() );
-     }*/
-}
+    public void testBasicAddDeleteUser()
+    {
+        username = getProperty( "GUEST_USERNAME" );
+        fullname = getProperty( "GUEST_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        deleteUser( username, fullname, getUserEmail() );
+        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" );
+
+        logout();
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        logout();
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        logout();
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithGuestRole" } )
+    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" );
+
+        logout();
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        logout();
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        logout();
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithRegisteredUserRole" } )
+    public void testUserWithSysAdminUserRole()
+    {
+        username = getProperty( "SYSAD_USERNAME" );
+        fullname = getProperty( "SYSAD_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        clickLinkWithText( username );
+        clickLinkWithText( "Edit Roles" );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+
+        logout();
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        logout();
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        logout();
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithSysAdminUserRole" } )
+    public void testUserWithUserAdminUserRole()
+    {
+        username = getProperty( "USERADMIN_USERNAME" );
+        fullname = getProperty( "USERADMIN_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        clickLinkWithText( username );
+        clickLinkWithText( "Edit Roles" );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+
+        logout();
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        logout();
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        logout();
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithUserAdminUserRole" } )
+    public void testUserWithGlobalRepoManagerRole()
+    {
+        username = getProperty( "GLOBALREPOMANAGER_USERNAME" );
+        fullname = getProperty( "GLOBALREPOMANAGER_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        clickLinkWithText( username );
+        clickLinkWithText( "Edit Roles" );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+
+        logout();
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        logout();
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        logout();
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithGlobalRepoManagerRole" } )
+    public void testUserWithGlobalRepoObserverRole()
+    {
+        username = getProperty( "GLOBALREPOOBSERVER_USERNAME" );
+        fullname = getProperty( "GLOBALREPOOBSERVER_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        clickLinkWithText( username );
+        clickLinkWithText( "Edit Roles" );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+
+        logout();
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        logout();
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        logout();
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithGlobalRepoObserverRole" } )
+    public void testUserWithRepoManagerInternalRole()
+    {
+        username = getProperty( "REPOMANAGER_INTERNAL_USERNAME" );
+        fullname = getProperty( "REPOMANAGER_INTERNAL_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        clickLinkWithText( username );
+        clickLinkWithText( "Edit Roles" );
+        checkResourceRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+
+        logout();
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        logout();
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        logout();
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    /*
+     * @Test (dependsOnMethods = { "testUserWithRepoManagerInternalRole" } ) public void
+     * testUserWithRepoManagerSnapshotsRole() { username = getProperty("REPOMANAGER_SNAPSHOTS_USERNAME"); fullname =
+     * getProperty("REPOMANAGER_SNAPSHOTS_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();
+     * clickLinkWithText("Logout"); //assertTextPresent("You are already logged in."); login(username,
+     * getUserRoleNewPassword()); assertLeftNavMenuWithRole( fullname ); clickLinkWithText("Logout"); login(
+     * getAdminUsername() , getAdminPassword() ); }
+     */
+
+    @Test( dependsOnMethods = { "testUserWithRepoManagerInternalRole" } )
+    public void testUserWithRepoObserverInternalRole()
+    {
+        username = getProperty( "REPOOBSERVER_INTERNAL_USERNAME" );
+        fullname = getProperty( "REPOOBSERVER_INTERNAL_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        clickLinkWithText( username );
+        clickLinkWithText( "Edit Roles" );
+        checkResourceRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+
+        logout();
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+
+        // this section will be removed if issue from redback after changing password will be fixed.
+        getSelenium().goBack();
+        logout();
+        // assertTextPresent("You are already logged in.");
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        logout();
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    /*
+     * @Test (dependsOnMethods = { "testUserWithRepoObserverInternalRole" } ) public void
+     * testUserWithRepoObserverSnapshotsRole() { username = getProperty( "REPOOBSERVER_SNAPSHOTS_USERNAME" ); fullname =
+     * getProperty( "REPOOBSERVER_SNAPSHOTS_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();
+     * clickLinkWithText("Logout"); //assertTextPresent("You are already logged in."); login(username,
+     * getUserRoleNewPassword()); assertLeftNavMenuWithRole( fullname ); clickLinkWithText("Logout"); login(
+     * getAdminUsername() , getAdminPassword() ); }
+     */
+}
\ No newline at end of file

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/VirtualRepositoryTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/VirtualRepositoryTest.java?rev=931475&r1=931474&r2=931475&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/VirtualRepositoryTest.java (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/VirtualRepositoryTest.java Wed Apr  7 09:27:05 2010
@@ -24,53 +24,52 @@ import org.testng.annotations.Test;
 import org.testng.Assert;
 
 @Test( groups = { "virtualrepository" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
-public class VirtualRepositoryTest 
-	extends AbstractRepositoryTest
+public class VirtualRepositoryTest
+    extends AbstractRepositoryTest
 {
-	public void testAddRepositoryGroupNullValue()
-	{
-		addRepositoryGroup( " " );
-		assertTextPresent( "Identifier field is required." );
-	}
-	
-	@Test(dependsOnMethods = { "testWithCorrectUsernamePassword" } )
-	public void testAddRepositoryGroupValidValue()
-	{
-		addRepositoryGroup( "testing" );
-		//assertAddedRepositoryLink( "testing" );
-		Assert.assertEquals( getSelenium().getText( "//div[@id='contentArea']/div[2]/div/div[1]/p[1]" ), "testing" );
-	}
-	
-	@Test(dependsOnMethods = { "testAddRepositoryGroupValidValue" } )
-	public void testAddRepositoryToRepositoryGroup()
-	{
-		addRepositoryToRepositoryGroup( "testing", "internal" );
-		Assert.assertEquals( getSelenium().getText( "//div[@id='contentArea']/div[2]/div/div[3]/div[2]/p[1]" ), "internal" );
-		//clickLinkWithXPath( "/html/body/div[4]/div/div/div[2]/div/div/p[2]/a" );
-		//getSelenium().goBack();
-	}
-	
-	@Test(dependsOnMethods = { "testAddRepositoryToRepositoryGroup" } )
-	public void testDeleteRepositoryOfRepositoryGroup()
-	{
-		deleteRepositoryInRepositoryGroups();
-		assertTextPresent( "Repository Groups" );
-		assertTextNotPresent( "No Repository Groups Defined." );
-		Assert.assertFalse( getSelenium().isElementPresent( "//div[@id='contentArea']/div[2]/div/div[3]/div[2]/p[1]" ) );
-	}
-	
-	@Test(dependsOnMethods = { "testDeleteRepositoryOfRepositoryGroup" } )
-	public void testDeleteRepositoryGroup()
-	{	    
-	    assertRepositoryGroupsPage();
-		deleteRepositoryGroup( "testing" );
-		assertTextPresent( "No Repository Groups Defined." );
-	}
-	
-	/*@Test(dependsOnMethods = { "testAddRepositoryToRepositoryGroup" } )
-	public void testCheckRepositoryGroup()
-	{
-		clickLinkWithXPath( "/html/body/div[4]/div/div/div[2]/div/div/p[2]/a" );
-		getSelenium().goBack();
-	}*/
-}
+    public void testAddRepositoryGroupNullValue()
+    {
+        addRepositoryGroup( " " );
+        assertTextPresent( "Identifier field is required." );
+    }
+
+    @Test( dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+    public void testAddRepositoryGroupValidValue()
+    {
+        addRepositoryGroup( "testing" );
+        // assertAddedRepositoryLink( "testing" );
+        Assert.assertEquals( getSelenium().getText( "//div[@id='contentArea']/div[2]/div/div[1]/p[1]" ), "testing" );
+    }
+
+    @Test( dependsOnMethods = { "testAddRepositoryGroupValidValue" } )
+    public void testAddRepositoryToRepositoryGroup()
+    {
+        addRepositoryToRepositoryGroup( "testing", "internal" );
+        Assert.assertEquals( getSelenium().getText( "//div[@id='contentArea']/div[2]/div/div[3]/div[2]/p[1]" ),
+                             "internal" );
+        // clickLinkWithXPath( "/html/body/div[4]/div/div/div[2]/div/div/p[2]/a" );
+        // getSelenium().goBack();
+    }
+
+    @Test( dependsOnMethods = { "testAddRepositoryToRepositoryGroup" } )
+    public void testDeleteRepositoryOfRepositoryGroup()
+    {
+        deleteRepositoryInRepositoryGroups();
+        assertTextPresent( "Repository Groups" );
+        assertTextNotPresent( "No Repository Groups Defined." );
+        Assert.assertFalse( getSelenium().isElementPresent( "//div[@id='contentArea']/div[2]/div/div[3]/div[2]/p[1]" ) );
+    }
+
+    @Test( dependsOnMethods = { "testDeleteRepositoryOfRepositoryGroup" } )
+    public void testDeleteRepositoryGroup()
+    {
+        assertRepositoryGroupsPage();
+        deleteRepositoryGroup( "testing" );
+        assertTextPresent( "No Repository Groups Defined." );
+    }
+
+    /*
+     * @Test(dependsOnMethods = { "testAddRepositoryToRepositoryGroup" } ) public void testCheckRepositoryGroup() {
+     * clickLinkWithXPath( "/html/body/div[4]/div/div/div[2]/div/div/p[2]/a" ); getSelenium().goBack(); }
+     */
+}
\ No newline at end of file

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/XPathExpressionUtil.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/XPathExpressionUtil.java?rev=931475&r1=931474&r2=931475&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/XPathExpressionUtil.java (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/XPathExpressionUtil.java Wed Apr  7 09:27:05 2010
@@ -62,7 +62,7 @@ public class XPathExpressionUtil
             xpathExpression += LIST;
             xpathExpression += START_NODE_TEST;
 
-            for (int nIndex = 0; nIndex < values.length; nIndex++ )
+            for ( int nIndex = 0; nIndex < values.length; nIndex++ )
             {
                 xpathExpression += ( ( nIndex > 0 ) ? AND : "" );
                 xpathExpression += contains( LINE + position( nIndex + 1 ), values[nIndex] );
@@ -76,8 +76,8 @@ public class XPathExpressionUtil
 
     /**
      * expression for acquiring an element in one of the table columns
-     *
-     * @param element      the node element
+     * 
+     * @param element the node element
      * @param elementIndex column index of the element, used for skipping
      * @param columnValues the values to be matched in each column, element column is included
      * @return
@@ -89,38 +89,36 @@ public class XPathExpressionUtil
 
     /**
      * expression for acquiring an element in one of the table columns
-     *
-     * @param element      the node element
+     * 
+     * @param element the node element
      * @param elementIndex column index of the element, used for skipping
      * @param elementValue the matched element value
      * @param columnValues the values to be matched in each column, element column is included
      * @return
      */
-    public static String getColumnElement( String element, int elementIndex, String elementValue,
-                                           String[] columnValues )
+    public static String getColumnElement( String element, int elementIndex, String elementValue, String[] columnValues )
     {
         return getColumnElement( element, elementIndex, elementValue, "TEXT", columnValues );
     }
 
     /**
      * expression for acquiring an element in one of the table columns
-     *
-     * @param element      the node element
+     * 
+     * @param element the node element
      * @param elementIndex column index of the element, used for skipping
      * @param imageName the matched image name
      * @param columnValues the values to be matched in each column, element column is included
      * @return
      */
-    public static String getImgColumnElement( String element, int elementIndex, String imageName,
-                                           String[] columnValues )
+    public static String getImgColumnElement( String element, int elementIndex, String imageName, String[] columnValues )
     {
         return getColumnElement( element, elementIndex, imageName, IMG, columnValues );
     }
 
     /**
      * expression for acquiring an element in one of the table columns
-     *
-     * @param element      the node element
+     * 
+     * @param element the node element
      * @param elementIndex column index of the element, used for skipping
      * @param imageName the matched image name
      * @param columnValues the values to be matched in each column, element column is included
@@ -160,9 +158,8 @@ public class XPathExpressionUtil
     }
 
     /**
-     * expression for acquiring the table row that matches all column values with the same order
-     * as the list
-     *
+     * expression for acquiring the table row that matches all column values with the same order as the list
+     * 
      * @param columnValues the matched list of columnValues
      * @return
      */

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java?rev=931475&r1=931474&r2=931475&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java Wed Apr  7 09:27:05 2010
@@ -106,4 +106,4 @@ public class CaptureScreenShotsListener
         i--;
         return i;
     }
-}
+}
\ No newline at end of file

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java?rev=931475&r1=931474&r2=931475&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArchivaTest.java Wed Apr  7 09:27:05 2010
@@ -24,31 +24,32 @@ import org.apache.archiva.web.test.XPath
  * under the License.
  */
 
-public abstract class AbstractArchivaTest 
-	extends AbstractSeleniumTest
+public abstract class AbstractArchivaTest
+    extends AbstractSeleniumTest
 {
-	protected String username;
-	protected String fullname;
-	
-	public String getUserEmail()
-	{
-		String email = getProperty("USERROLE_EMAIL");
-		return email;
-	}
-	
-	public String getUserRolePassword() 
-	{
-		String password = getProperty("USERROLE_PASSWORD");
-		return password;
-	}
-
-	public String getUserRoleNewPassword() 
-	{
-		String password_new = getProperty( "NEW_USERROLE_PASSWORD" );
-		return password_new;
-	}
+    protected String username;
 
-	public String getBasedir()
+    protected String fullname;
+
+    public String getUserEmail()
+    {
+        String email = getProperty( "USERROLE_EMAIL" );
+        return email;
+    }
+
+    public String getUserRolePassword()
+    {
+        String password = getProperty( "USERROLE_PASSWORD" );
+        return password;
+    }
+
+    public String getUserRoleNewPassword()
+    {
+        String password_new = getProperty( "NEW_USERROLE_PASSWORD" );
+        return password_new;
+    }
+
+    public String getBasedir()
     {
         String basedir = System.getProperty( "basedir" );
 
@@ -59,208 +60,207 @@ public abstract class AbstractArchivaTes
 
         return basedir;
     }
-	
-	public String getAdminUsername()
-	{
-		String adminUsername = getProperty( "ADMIN_USERNAME" );
-		return adminUsername;
-	}
-	
-	public String getAdminPassword()
-	{
-		String adminPassword = getProperty( "ADMIN_PASSWORD" );
-		return adminPassword;
-	}
-	
-	public void assertCreateAdmin()
-	{
-			assertPage( "Apache Archiva \\ Create Admin User" );
-			assertTextPresent( "Username" );
-        	assertFieldValue( "admin", "user.username" );
-       		assertTextPresent( "Full Name*" );
-       		assertElementPresent( "user.fullName" );
-      		assertTextPresent( "Email Address*" );
-        	assertElementPresent( "user.email");
-        	assertTextPresent( "Password*" );
-        	assertElementPresent( "user.password" );
-        	assertTextPresent( "Confirm Password*"	 );
-        	assertElementPresent( "user.confirmPassword" );
-        	assertButtonWithValuePresent( "Create Admin" );
-	}
-	
-	public void submitAdminData( String fullname, String email, String password )
-    	{
-        	setFieldValue( "user.fullName", fullname );
-        	setFieldValue( "user.email", email );
-        	setFieldValue( "user.password", password );
-       	 	setFieldValue( "user.confirmPassword", password );
-        	submit();
-    	}
-	
-	//Go to Login Page
-	public void goToLoginPage()
-	{
-		getSelenium().open( baseUrl );
-		clickLinkWithText( "Login");
-		assertLoginPage();
-	}
-	
-	public void submitUserData( String username, String password, boolean rememberme, boolean success )
-    	{
-
-        	setFieldValue( "username", username );
-        	setFieldValue( "password", password );
-        	if ( rememberme )
-        	{
-            		checkField( "rememberMe" );
-        	}
-        	
-		submit();
-        	if ( success )
-        	{
-                assertUserLoggedIn( username );
-            }
-        	else
-        	{
-        	    assertLoginPage();
-        	}
-    	}
-	
-	public void assertLoginPage()
-	{
-			assertPage( "Apache Archiva \\ Login Page" );
-        	assertTextPresent( "Login" );
-        	assertTextPresent( "Register" );
-        	assertTextPresent( "Username" );
-        	assertElementPresent( "username" );
-        	assertTextPresent( "Password" );
-        	assertElementPresent( "password" );
-        	assertTextPresent( "Remember Me" );
-        	assertElementPresent( "rememberMe" );
-        	assertButtonWithValuePresent( "Login" );
-        	assertButtonWithValuePresent( "Cancel" );
-        	assertTextPresent( "Need an Account? Register!" );
-        	assertTextPresent( "Forgot your Password? Request a password reset." );
-	}
-
-    //User Management
-	public void goToUserManagementPage()
-	{
-		clickLinkWithText( "User Management" );
-		assertUserManagementPage();
-	}
-	
-	public void assertUserManagementPage()
-	{
-		assertPage( "Apache Archiva \\ [Admin] User List" );
-		assertTextPresent( "[Admin] List of Users in Role: Any" );
-		assertTextPresent( "Navigation" );
-		assertImgWithAlt( "First" );
-		assertImgWithAlt( "Prev" );
-		assertImgWithAlt( "Next" );
-		assertImgWithAlt( "Last" );
-		assertTextPresent( "Display Rows" );
-		assertTextPresent( "Username" );
-		assertTextPresent( "Full Name" );
-		assertTextPresent( "Email" );
-		assertTextPresent( "Permanent" );
-		assertTextPresent( "Validated" );
-		assertTextPresent( "Locked" );
-		assertTextPresent( "Tasks" );
-		assertTextPresent( "Tools" );
-		assertTextPresent( "Tasks" );
-		assertTextPresent( "The following tools are available for administrators to manipulate the user list." );
-		assertButtonWithValuePresent( "Create New User" );
-		assertButtonWithValuePresent( "Show Users In Role" );
-		assertElementPresent( "roleName" );
-		assertTextPresent( "Reports" );
-		assertTextPresent( "Name" );
-		assertTextPresent( "Types" );
-		assertTextPresent( "User List" );
-		assertTextPresent( "Roles Matrix" );
-	}
-	
-/*	//User Role
-	public void goToUserRolesPage()
-	{
-		clickLinkWithText( "User Roles" );
-		assertUserRolesPage();
-	}*/
-	
-	public void assertUserRolesPage()
-	{
-		assertPage( "Apache Archiva \\ [Admin] User Edit" );
-		assertTextPresent( "[Admin] User Roles" );
-		assertTextPresent( "Username" );
-		assertTextPresent( "Full Name" );
-		String userRoles = "Guest,Registered User,System Administrator,User Administrator,Global Repository Observer,Global Repository Manager,Repository Observer,Repository Manager,internal";
-		String[] arrayRole = userRoles.split( "," );
-		for ( String userroles : arrayRole )
-			assertTextPresent( userroles );
-	}
-	
-	public void assertDeleteUserPage( String username )
-	 {
-	        assertPage( "Apache Archiva \\ [Admin] User Delete" ); //TODO
-	        assertTextPresent( "[Admin] User Delete" );
-	        assertTextPresent( "The following user will be deleted:" );
-	        assertTextPresent( "Username: " + username );
-	        assertButtonWithValuePresent( "Delete User" );
-	 }
-	
-	public void createUser( String userName, String fullName, String email, String password, boolean valid )
-	{
-		createUser( userName, fullName, email, password, password, valid );
-	}
-	
-	private void createUser( String userName, String fullName, String emailAd, String password, String confirmPassword, boolean valid ) 
-	{
-		//login( getAdminUsername() , getAdminPassword() );
-		clickLinkWithText( "User Management" );
-		clickButtonWithValue( "Create New User" );
-		assertCreateUserPage();
+
+    public String getAdminUsername()
+    {
+        String adminUsername = getProperty( "ADMIN_USERNAME" );
+        return adminUsername;
+    }
+
+    public String getAdminPassword()
+    {
+        String adminPassword = getProperty( "ADMIN_PASSWORD" );
+        return adminPassword;
+    }
+
+    public void assertCreateAdmin()
+    {
+        assertPage( "Apache Archiva \\ Create Admin User" );
+        assertTextPresent( "Username" );
+        assertFieldValue( "admin", "user.username" );
+        assertTextPresent( "Full Name*" );
+        assertElementPresent( "user.fullName" );
+        assertTextPresent( "Email Address*" );
+        assertElementPresent( "user.email" );
+        assertTextPresent( "Password*" );
+        assertElementPresent( "user.password" );
+        assertTextPresent( "Confirm Password*" );
+        assertElementPresent( "user.confirmPassword" );
+        assertButtonWithValuePresent( "Create Admin" );
+    }
+
+    public void submitAdminData( String fullname, String email, String password )
+    {
+        setFieldValue( "user.fullName", fullname );
+        setFieldValue( "user.email", email );
+        setFieldValue( "user.password", password );
+        setFieldValue( "user.confirmPassword", password );
+        submit();
+    }
+
+    // Go to Login Page
+    public void goToLoginPage()
+    {
+        getSelenium().open( baseUrl );
+        clickLinkWithText( "Login" );
+        assertLoginPage();
+    }
+
+    public void submitUserData( String username, String password, boolean rememberme, boolean success )
+    {
+
+        setFieldValue( "username", username );
+        setFieldValue( "password", password );
+        if ( rememberme )
+        {
+            checkField( "rememberMe" );
+        }
+
+        submit();
+        if ( success )
+        {
+            assertUserLoggedIn( username );
+        }
+        else
+        {
+            assertLoginPage();
+        }
+    }
+
+    public void assertLoginPage()
+    {
+        assertPage( "Apache Archiva \\ Login Page" );
+        assertTextPresent( "Login" );
+        assertTextPresent( "Register" );
+        assertTextPresent( "Username" );
+        assertElementPresent( "username" );
+        assertTextPresent( "Password" );
+        assertElementPresent( "password" );
+        assertTextPresent( "Remember Me" );
+        assertElementPresent( "rememberMe" );
+        assertButtonWithValuePresent( "Login" );
+        assertButtonWithValuePresent( "Cancel" );
+        assertTextPresent( "Need an Account? Register!" );
+        assertTextPresent( "Forgot your Password? Request a password reset." );
+    }
+
+    // User Management
+    public void goToUserManagementPage()
+    {
+        clickLinkWithText( "User Management" );
+        assertUserManagementPage();
+    }
+
+    public void assertUserManagementPage()
+    {
+        assertPage( "Apache Archiva \\ [Admin] User List" );
+        assertTextPresent( "[Admin] List of Users in Role: Any" );
+        assertTextPresent( "Navigation" );
+        assertImgWithAlt( "First" );
+        assertImgWithAlt( "Prev" );
+        assertImgWithAlt( "Next" );
+        assertImgWithAlt( "Last" );
+        assertTextPresent( "Display Rows" );
+        assertTextPresent( "Username" );
+        assertTextPresent( "Full Name" );
+        assertTextPresent( "Email" );
+        assertTextPresent( "Permanent" );
+        assertTextPresent( "Validated" );
+        assertTextPresent( "Locked" );
+        assertTextPresent( "Tasks" );
+        assertTextPresent( "Tools" );
+        assertTextPresent( "Tasks" );
+        assertTextPresent( "The following tools are available for administrators to manipulate the user list." );
+        assertButtonWithValuePresent( "Create New User" );
+        assertButtonWithValuePresent( "Show Users In Role" );
+        assertElementPresent( "roleName" );
+        assertTextPresent( "Reports" );
+        assertTextPresent( "Name" );
+        assertTextPresent( "Types" );
+        assertTextPresent( "User List" );
+        assertTextPresent( "Roles Matrix" );
+    }
+
+    /*
+     * //User Role public void goToUserRolesPage() { clickLinkWithText( "User Roles" ); assertUserRolesPage(); }
+     */
+
+    public void assertUserRolesPage()
+    {
+        assertPage( "Apache Archiva \\ [Admin] User Edit" );
+        assertTextPresent( "[Admin] User Roles" );
+        assertTextPresent( "Username" );
+        assertTextPresent( "Full Name" );
+        String userRoles =
+            "Guest,Registered User,System Administrator,User Administrator,Global Repository Observer,Global Repository Manager,Repository Observer,Repository Manager,internal";
+        String[] arrayRole = userRoles.split( "," );
+        for ( String userroles : arrayRole )
+            assertTextPresent( userroles );
+    }
+
+    public void assertDeleteUserPage( String username )
+    {
+        assertPage( "Apache Archiva \\ [Admin] User Delete" ); // TODO
+        assertTextPresent( "[Admin] User Delete" );
+        assertTextPresent( "The following user will be deleted:" );
+        assertTextPresent( "Username: " + username );
+        assertButtonWithValuePresent( "Delete User" );
+    }
+
+    public void createUser( String userName, String fullName, String email, String password, boolean valid )
+    {
+        createUser( userName, fullName, email, password, password, valid );
+    }
+
+    private void createUser( String userName, String fullName, String emailAd, String password, String confirmPassword,
+                             boolean valid )
+    {
+        // login( getAdminUsername() , getAdminPassword() );
+        clickLinkWithText( "User Management" );
+        clickButtonWithValue( "Create New User" );
+        assertCreateUserPage();
         setFieldValue( "user.username", userName );
         setFieldValue( "user.fullName", fullName );
         setFieldValue( "user.email", emailAd );
         setFieldValue( "user.password", password );
         setFieldValue( "user.confirmPassword", confirmPassword );
         submit();
-        
-        assertUserRolesPage( );
+
+        assertUserRolesPage();
         clickButtonWithValue( "Submit" );
-        
-        if (valid )
+
+        if ( valid )
         {
-        	String[] columnValues = {userName, fullName, emailAd};
+            String[] columnValues = { userName, fullName, emailAd };
             assertElementPresent( XPathExpressionUtil.getTableRow( columnValues ) );
         }
         else
         {
             assertCreateUserPage();
         }
-	}
-	
-	public void deleteUser( String userName, String fullName, String emailAdd )
+    }
+
+    public void deleteUser( String userName, String fullName, String emailAdd )
     {
         deleteUser( userName, fullName, emailAdd, false, false );
     }
-	
-	public void deleteUser(String userName, String fullName, String emailAd, boolean validated, boolean locked)
-	{
-		String[] columnValues = {userName, fullName, emailAd};
-		//clickLinkWithText( "userlist" );
-		clickLinkWithXPath( "//table[@id='ec_table']/tbody[2]/tr[3]/td[7]/a/img" );
-		assertDeleteUserPage( userName );
+
+    public void deleteUser( String userName, String fullName, String emailAd, boolean validated, boolean locked )
+    {
+        String[] columnValues = { userName, fullName, emailAd };
+        // clickLinkWithText( "userlist" );
+        clickLinkWithXPath( "//table[@id='ec_table']/tbody[2]/tr[3]/td[7]/a/img" );
+        assertDeleteUserPage( userName );
         submit();
         assertElementNotPresent( XPathExpressionUtil.getTableRow( columnValues ) );
-	}
+    }
 
     public void login( String username, String password )
     {
         login( username, password, true, "Login Page" );
     }
-	
-	public void login( String username, String password, boolean valid, String assertReturnPage )
+
+    public void login( String username, String password, boolean valid, String assertReturnPage )
     {
         if ( isLinkPresent( "Login" ) )
         {
@@ -273,7 +273,7 @@ public abstract class AbstractArchivaTes
             assertUserLoggedIn( username );
         }
     }
-    
+
     public void submitLoginPage( String username, String password )
     {
         submitLoginPage( username, password, false, true, "Login Page" );
@@ -323,133 +323,143 @@ public abstract class AbstractArchivaTes
     }
 
     // User Roles
-	public void assertUserRoleCheckBoxPresent(String value) 
-	{
-		getSelenium()	.isElementPresent("xpath=//input[@id='addRolesToUser_addNDSelectedRoles' and @name='addNDSelectedRoles' and @value='"	+ value + "']");
-	}
-
-	public void assertResourceRolesCheckBoxPresent(String value) {
-		getSelenium().isElementPresent("xpath=//input[@name='addDSelectedRoles' and @value='" + value + "']");
-	}
-
-	public void checkUserRoleWithValue(String value) 
-	{
-		assertUserRoleCheckBoxPresent(value);
-		getSelenium().click( "xpath=//input[@id='addRolesToUser_addNDSelectedRoles' and @name='addNDSelectedRoles' and @value='" + value + "']");
-	}
-
-	public void checkResourceRoleWithValue(String value) 
-	{
-		assertResourceRolesCheckBoxPresent(value);
-		getSelenium().click( "xpath=//input[@name='addDSelectedRoles' and @value='" + value + "']" );
-	}
-	
-	
-	 public void changePassword(String oldPassword, String newPassword) {
-		assertPage("Apache Archiva \\ Change Password");
-		setFieldValue("existingPassword", oldPassword);
-		setFieldValue("newPassword", newPassword);
-		setFieldValue("newPasswordConfirm", newPassword);
-		clickButtonWithValue("Change Password");
-	}
-	
-	 public void assertCreateUserPage() 
-	 {
-		assertPage( "Apache Archiva \\ [Admin] User Create" );
-		assertTextPresent( "[Admin] User Create" );
-		assertTextPresent( "Username*:" );
-		assertElementPresent( "user.username" );
-		assertTextPresent( "Full Name*:");
-		assertElementPresent( "user.fullName" );
-		assertTextPresent( "Email Address*:" );
-		assertElementPresent( "user.email" );
-		assertTextPresent( "Password*:" );
-		assertElementPresent( "user.password" );
-		assertTextPresent( "Confirm Password*:" );
-		assertElementPresent( "user.confirmPassword" );
-		assertButtonWithValuePresent( "Create User" );
-	}
-	 
-	public void assertLeftNavMenuWithRole( String role )
-	{
-		if ( role.equals( "Guest" ) || role.equals( "Registered User" )  || role.equals( "Global Repository Observer" ) || role.equals( "Repository Observer - internal" ) || role.equals( "Repository Observer - snapshots" ) )
-		{
-			assertTextPresent( "Search" );
-			assertLinkPresent( "Find Artifact" );
-			assertLinkPresent( "Browse" );
-			assertLinkNotPresent( "Repositories" );
-		}
-		else if ( role.equals( "User Administrator" ) )
-		{
-			assertTextPresent( "Search" );
-			assertLinkPresent( "Find Artifact" );
-			assertLinkPresent( "Browse" );
-			assertLinkPresent( "User Management" );
-			assertLinkPresent( "User Roles" );
-			assertLinkNotPresent( "Repositories" );
-		}
-		else if ( role.equals( "Global Repository Manager" ) || role.equals( "Repository Manager - internal" ) || role.equals( "Repository Manager - snapshots" ) )
-		{
-			assertTextPresent( "Search" );
-			assertLinkPresent( "Find Artifact" );
-			assertLinkPresent( "Browse" );
-			assertLinkPresent( "Upload Artifact" );
-			assertLinkPresent( "Delete Artifact" );
-			assertLinkNotPresent( "Repositories" );
-		}
-		else 
-		{
-			assertTextPresent( "Search" );
-			String navMenu = "Find Artifact,Browse,Reports,User Management,User Roles,Appearance,Upload Artifact,Delete Artifact,Repository Groups,Repositories,Proxy Connectors,Legacy Support,Network Proxies,Repository Scanning";
-			String[] arrayMenu = navMenu.split( "," );
-			for (String navmenu : arrayMenu )
-				assertLinkPresent( navmenu );
-		}
-	}
-	//Find Artifact
-	public void goToFindArtifactPage()
-	{
-		clickLinkWithText( "Find Artifact" );
-		assertFindArtifactPage();
-	}
-	
-	public void assertFindArtifactPage()
-	{
-		assertPage( "Apache Archiva \\ Find Artifact" );
-		assertTextPresent( "Find Artifact" );
-		assertTextPresent( "Search for:" );
-		assertTextPresent( "Checksum:" );
-		assertElementPresent( "q" );
-		assertButtonWithValuePresent( "Search" );
-	}
-	
-	//Appearance
-	public void goToAppearancePage()
-	{
-		clickLinkWithText( "Appearance" );
-		assertAppearancePage();
-	}
-	
-	public void assertAppearancePage()
-	{
-		assertPage( "Apache Archiva \\ Configure Appearance" );
-		String appearance = "Appearance,Organization Details,The logo in the top right of the screen is controlled by the following settings.,Organization Information,Name,URL,Logo URL";
-		String[] arrayAppearance = appearance.split( "," );
-		for ( String appear : arrayAppearance )
-			assertTextPresent( appear );
-		assertLinkPresent( "Edit" );
-		assertLinkPresent( "Change your appearance" );
-	}
-	
-	public void addEditAppearance( String name, String url, String logoUrl )
-	{
-		setFieldValue( "organisationName" , name );
-		setFieldValue( "organisationUrl" , url );
-		setFieldValue( "organisationLogo" , logoUrl );
-		clickButtonWithValue( "Save" );
-	}
+    public void assertUserRoleCheckBoxPresent( String value )
+    {
+        getSelenium().isElementPresent(
+                                        "xpath=//input[@id='addRolesToUser_addNDSelectedRoles' and @name='addNDSelectedRoles' and @value='"
+                                            + value + "']" );
+    }
+
+    public void assertResourceRolesCheckBoxPresent( String value )
+    {
+        getSelenium().isElementPresent( "xpath=//input[@name='addDSelectedRoles' and @value='" + value + "']" );
+    }
+
+    public void checkUserRoleWithValue( String value )
+    {
+        assertUserRoleCheckBoxPresent( value );
+        getSelenium().click(
+                             "xpath=//input[@id='addRolesToUser_addNDSelectedRoles' and @name='addNDSelectedRoles' and @value='"
+                                 + value + "']" );
+    }
+
+    public void checkResourceRoleWithValue( String value )
+    {
+        assertResourceRolesCheckBoxPresent( value );
+        getSelenium().click( "xpath=//input[@name='addDSelectedRoles' and @value='" + value + "']" );
+    }
+
+    public void changePassword( String oldPassword, String newPassword )
+    {
+        assertPage( "Apache Archiva \\ Change Password" );
+        setFieldValue( "existingPassword", oldPassword );
+        setFieldValue( "newPassword", newPassword );
+        setFieldValue( "newPasswordConfirm", newPassword );
+        clickButtonWithValue( "Change Password" );
+    }
+
+    public void assertCreateUserPage()
+    {
+        assertPage( "Apache Archiva \\ [Admin] User Create" );
+        assertTextPresent( "[Admin] User Create" );
+        assertTextPresent( "Username*:" );
+        assertElementPresent( "user.username" );
+        assertTextPresent( "Full Name*:" );
+        assertElementPresent( "user.fullName" );
+        assertTextPresent( "Email Address*:" );
+        assertElementPresent( "user.email" );
+        assertTextPresent( "Password*:" );
+        assertElementPresent( "user.password" );
+        assertTextPresent( "Confirm Password*:" );
+        assertElementPresent( "user.confirmPassword" );
+        assertButtonWithValuePresent( "Create User" );
+    }
+
+    public void assertLeftNavMenuWithRole( String role )
+    {
+        if ( role.equals( "Guest" ) || role.equals( "Registered User" ) || role.equals( "Global Repository Observer" )
+            || role.equals( "Repository Observer - internal" ) || role.equals( "Repository Observer - snapshots" ) )
+        {
+            assertTextPresent( "Search" );
+            assertLinkPresent( "Find Artifact" );
+            assertLinkPresent( "Browse" );
+            assertLinkNotPresent( "Repositories" );
+        }
+        else if ( role.equals( "User Administrator" ) )
+        {
+            assertTextPresent( "Search" );
+            assertLinkPresent( "Find Artifact" );
+            assertLinkPresent( "Browse" );
+            assertLinkPresent( "User Management" );
+            assertLinkPresent( "User Roles" );
+            assertLinkNotPresent( "Repositories" );
+        }
+        else if ( role.equals( "Global Repository Manager" ) || role.equals( "Repository Manager - internal" )
+            || role.equals( "Repository Manager - snapshots" ) )
+        {
+            assertTextPresent( "Search" );
+            assertLinkPresent( "Find Artifact" );
+            assertLinkPresent( "Browse" );
+            assertLinkPresent( "Upload Artifact" );
+            assertLinkPresent( "Delete Artifact" );
+            assertLinkNotPresent( "Repositories" );
+        }
+        else
+        {
+            assertTextPresent( "Search" );
+            String navMenu =
+                "Find Artifact,Browse,Reports,User Management,User Roles,Appearance,Upload Artifact,Delete Artifact,Repository Groups,Repositories,Proxy Connectors,Legacy Support,Network Proxies,Repository Scanning";
+            String[] arrayMenu = navMenu.split( "," );
+            for ( String navmenu : arrayMenu )
+                assertLinkPresent( navmenu );
+        }
+    }
+
+    // Find Artifact
+    public void goToFindArtifactPage()
+    {
+        clickLinkWithText( "Find Artifact" );
+        assertFindArtifactPage();
+    }
+
+    public void assertFindArtifactPage()
+    {
+        assertPage( "Apache Archiva \\ Find Artifact" );
+        assertTextPresent( "Find Artifact" );
+        assertTextPresent( "Search for:" );
+        assertTextPresent( "Checksum:" );
+        assertElementPresent( "q" );
+        assertButtonWithValuePresent( "Search" );
+    }
+
+    // Appearance
+    public void goToAppearancePage()
+    {
+        clickLinkWithText( "Appearance" );
+        assertAppearancePage();
+    }
+
+    public void assertAppearancePage()
+    {
+        assertPage( "Apache Archiva \\ Configure Appearance" );
+        String appearance =
+            "Appearance,Organization Details,The logo in the top right of the screen is controlled by the following settings.,Organization Information,Name,URL,Logo URL";
+        String[] arrayAppearance = appearance.split( "," );
+        for ( String appear : arrayAppearance )
+            assertTextPresent( appear );
+        assertLinkPresent( "Edit" );
+        assertLinkPresent( "Change your appearance" );
+    }
+
+    public void addEditAppearance( String name, String url, String logoUrl )
+    {
+        setFieldValue( "organisationName", name );
+        setFieldValue( "organisationUrl", url );
+        setFieldValue( "organisationLogo", logoUrl );
+        clickButtonWithValue( "Save" );
+    }
 
-	// Upload Artifact
+    // Upload Artifact
     public void goToAddArtifactPage()
     {
         clickLinkWithText( "Upload Artifact" );
@@ -520,44 +530,44 @@ public abstract class AbstractArchivaTes
 
     public void goToRepositoriesPage()
     {
-        if( !getTitle().equals( "Apache Archiva \\ Administration - Repositories" ) )
+        if ( !getTitle().equals( "Apache Archiva \\ Administration - Repositories" ) )
         {
             clickLinkWithText( "Repositories" );
         }
-    	assertRepositoriesPage();
+        assertRepositoriesPage();
     }
 
     public void assertRepositoriesPage()
     {
-    	assertPage( "Apache Archiva \\ Administration - Repositories" );
-    	assertTextPresent( "Administration - Repositories" );
-    	assertTextPresent( "Managed Repositories" );
-    	assertTextPresent( "Remote Repositories" );
-    }
-
-    public void addManagedRepository( String identifier, String name, String directory, String indexDirectory, String type, String cron,
-                                         String daysOlder, String retentionCount )
-    {
-    	//goToRepositoriesPage();
-    	//clickLinkWithText( "Add" );
-    	setFieldValue( "repository.id" , identifier );
-    	setFieldValue( "repository.name" , name );
-    	setFieldValue( "repository.location" , directory );
-    	setFieldValue( "repository.indexDir" , indexDirectory );
-    	selectValue( "repository.layout", type );
-    	setFieldValue( "repository.refreshCronExpression" , cron );
-    	setFieldValue( "repository.daysOlder" , daysOlder );
-    	setFieldValue( "repository.retentionCount" , retentionCount );
-    	//TODO	
-    	clickButtonWithValue( "Add Repository" );
+        assertPage( "Apache Archiva \\ Administration - Repositories" );
+        assertTextPresent( "Administration - Repositories" );
+        assertTextPresent( "Managed Repositories" );
+        assertTextPresent( "Remote Repositories" );
+    }
+
+    public void addManagedRepository( String identifier, String name, String directory, String indexDirectory,
+                                      String type, String cron, String daysOlder, String retentionCount )
+    {
+        // goToRepositoriesPage();
+        // clickLinkWithText( "Add" );
+        setFieldValue( "repository.id", identifier );
+        setFieldValue( "repository.name", name );
+        setFieldValue( "repository.location", directory );
+        setFieldValue( "repository.indexDir", indexDirectory );
+        selectValue( "repository.layout", type );
+        setFieldValue( "repository.refreshCronExpression", cron );
+        setFieldValue( "repository.daysOlder", daysOlder );
+        setFieldValue( "repository.retentionCount", retentionCount );
+        // TODO
+        clickButtonWithValue( "Add Repository" );
     }
 
     protected void logout()
     {
-        clickLinkWithText("Logout");
+        clickLinkWithText( "Logout" );
         assertTextNotPresent( "Current User:" );
         assertLinkNotPresent( "Edit Details" );
         assertLinkNotPresent( "Logout" );
         assertLinkPresent( "Login" );
     }
-}
+}
\ No newline at end of file

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java?rev=931475&r1=931474&r2=931475&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactManagementTest.java Wed Apr  7 09:27:05 2010
@@ -1,112 +1,114 @@
 package org.apache.archiva.web.test.parent;
 
 public abstract class AbstractArtifactManagementTest
-	extends AbstractArchivaTest
+    extends AbstractArchivaTest
 {
-	
-	public String getGroupId()
-	{
-		String groupId = getProperty( "GROUPID" ) ;
-		return groupId;
-	}
-	
-	public String getArtifactId()
-	{
-		String artifactId = getProperty( "ARTIFACTID" ) ;
-		return artifactId;
-	}
-	
-	public String getVersion()
-	{
-		String version = getProperty( "VERSION" ) ;
-		return version;
-	}
-	
-	public String getPackaging()
-	{
-		String packaging = getProperty( "PACKAGING" ) ;
-		return packaging;
-	}
-	
-	public String getArtifactFilePath()
-	{
-		return "src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar";
-	}
-	
-	public String getRepositoryId()
-	{
-		String repositoryId = getProperty( "REPOSITORYID" ) ;
-		return repositoryId;
-	}
-	
-	public void goToDeleteArtifactPage()
-	{
+
+    public String getGroupId()
+    {
+        String groupId = getProperty( "GROUPID" );
+        return groupId;
+    }
+
+    public String getArtifactId()
+    {
+        String artifactId = getProperty( "ARTIFACTID" );
+        return artifactId;
+    }
+
+    public String getVersion()
+    {
+        String version = getProperty( "VERSION" );
+        return version;
+    }
+
+    public String getPackaging()
+    {
+        String packaging = getProperty( "PACKAGING" );
+        return packaging;
+    }
+
+    public String getArtifactFilePath()
+    {
+        return "src/test/resources/snapshots/org/apache/maven/archiva/web/test/foo-bar/1.0-SNAPSHOT/foo-bar-1.0-SNAPSHOT.jar";
+    }
+
+    public String getRepositoryId()
+    {
+        String repositoryId = getProperty( "REPOSITORYID" );
+        return repositoryId;
+    }
+
+    public void goToDeleteArtifactPage()
+    {
         login( getProperty( "ADMIN_USERNAME" ), getProperty( "ADMIN_PASSWORD" ) );
-		clickLinkWithText( "Delete Artifact" );
-		assertDeleteArtifactPage();
-	}
-		
-	public void deleteArtifact( String groupId, String artifactId, String version, String repositoryId )
-	{
-		goToDeleteArtifactPage();
-		setFieldValue( "groupId" , groupId );
-		setFieldValue( "artifactId" , artifactId );
-		setFieldValue( "version" , version );
-		selectValue( "repositoryId" ,  repositoryId );
-		clickButtonWithValue( "Submit" ) ;
-	}
-	
-	public void assertDeleteArtifactPage()
-	{
-		assertPage( "Apache Archiva \\ Delete Artifact" );
-		assertTextPresent( "Delete Artifact" );
-		assertTextPresent( "Group Id*:" );
-		assertTextPresent( "Artifact Id*:" );
-		assertTextPresent( "Version*:" );
-		assertTextPresent( "Repository Id:" );
-		assertElementPresent( "groupId" );
-		assertElementPresent( "artifactId" );
-		assertElementPresent( "version" );
-		assertElementPresent( "repositoryId" );
-		assertButtonWithValuePresent( "Submit" );
-	}
-	
-	// Legacy Support
-	public void goToLegacySupportPage()
-	{
-		clickLinkWithText( "Legacy Support" );
-		assertLegacySupportPage();
-	}
-	
-	public void assertLegacySupportPage()
-	{
-		assertPage( "Apache Archiva \\ Administration - Legacy Support" );
-		assertTextPresent( "Administration - Legacy Artifact Path Resolution" );
-		assertTextPresent( "Path Mappings" );
-		assertLinkPresent( "Add" );
-	}
-	
-	public void addLegacyArtifactPath( String path, String groupId, String artifactId, String version, String classifier, String type)
-	{
-		assertAddLegacyArtifactPathPage();
-		setFieldValue( "legacyArtifactPath.path" , path );
-		setFieldValue( "groupId" , groupId );
-		setFieldValue( "artifactId" , artifactId );
-		setFieldValue( "version" , version );
-		setFieldValue( "classifier" , classifier );
-		setFieldValue( "type" , type );
-		clickButtonWithValue( "Add Legacy Artifact Path" );
-	}
-	
-	public void assertAddLegacyArtifactPathPage()
-	{
-		assertPage( "Apache Archiva \\ Admin: Add Legacy Artifact Path" );
-		assertTextPresent( "Admin: Add Legacy Artifact Path" );
-		assertTextPresent( "Enter the legacy path to map to a particular artifact reference, then adjust the fields as necessary." );
-		String element = "addLegacyArtifactPath_legacyArtifactPath_path,addLegacyArtifactPath_groupId,addLegacyArtifactPath_artifactId,addLegacyArtifactPath_version,addLegacyArtifactPath_classifier,addLegacyArtifactPath_type";
-		String[] arrayElement = element.split( "," );
-		for ( String arrayelement : arrayElement )
-			assertElementPresent( arrayelement );
-		assertButtonWithValuePresent( "Add Legacy Artifact Path" );
-	}
+        clickLinkWithText( "Delete Artifact" );
+        assertDeleteArtifactPage();
+    }
+
+    public void deleteArtifact( String groupId, String artifactId, String version, String repositoryId )
+    {
+        goToDeleteArtifactPage();
+        setFieldValue( "groupId", groupId );
+        setFieldValue( "artifactId", artifactId );
+        setFieldValue( "version", version );
+        selectValue( "repositoryId", repositoryId );
+        clickButtonWithValue( "Submit" );
+    }
+
+    public void assertDeleteArtifactPage()
+    {
+        assertPage( "Apache Archiva \\ Delete Artifact" );
+        assertTextPresent( "Delete Artifact" );
+        assertTextPresent( "Group Id*:" );
+        assertTextPresent( "Artifact Id*:" );
+        assertTextPresent( "Version*:" );
+        assertTextPresent( "Repository Id:" );
+        assertElementPresent( "groupId" );
+        assertElementPresent( "artifactId" );
+        assertElementPresent( "version" );
+        assertElementPresent( "repositoryId" );
+        assertButtonWithValuePresent( "Submit" );
+    }
+
+    // Legacy Support
+    public void goToLegacySupportPage()
+    {
+        clickLinkWithText( "Legacy Support" );
+        assertLegacySupportPage();
+    }
+
+    public void assertLegacySupportPage()
+    {
+        assertPage( "Apache Archiva \\ Administration - Legacy Support" );
+        assertTextPresent( "Administration - Legacy Artifact Path Resolution" );
+        assertTextPresent( "Path Mappings" );
+        assertLinkPresent( "Add" );
+    }
+
+    public void addLegacyArtifactPath( String path, String groupId, String artifactId, String version,
+                                       String classifier, String type )
+    {
+        assertAddLegacyArtifactPathPage();
+        setFieldValue( "legacyArtifactPath.path", path );
+        setFieldValue( "groupId", groupId );
+        setFieldValue( "artifactId", artifactId );
+        setFieldValue( "version", version );
+        setFieldValue( "classifier", classifier );
+        setFieldValue( "type", type );
+        clickButtonWithValue( "Add Legacy Artifact Path" );
+    }
+
+    public void assertAddLegacyArtifactPathPage()
+    {
+        assertPage( "Apache Archiva \\ Admin: Add Legacy Artifact Path" );
+        assertTextPresent( "Admin: Add Legacy Artifact Path" );
+        assertTextPresent( "Enter the legacy path to map to a particular artifact reference, then adjust the fields as necessary." );
+        String element =
+            "addLegacyArtifactPath_legacyArtifactPath_path,addLegacyArtifactPath_groupId,addLegacyArtifactPath_artifactId,addLegacyArtifactPath_version,addLegacyArtifactPath_classifier,addLegacyArtifactPath_type";
+        String[] arrayElement = element.split( "," );
+        for ( String arrayelement : arrayElement )
+            assertElementPresent( arrayelement );
+        assertButtonWithValuePresent( "Add Legacy Artifact Path" );
+    }
 }

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactReportsTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactReportsTest.java?rev=931475&r1=931474&r2=931475&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactReportsTest.java (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractArtifactReportsTest.java Wed Apr  7 09:27:05 2010
@@ -19,62 +19,62 @@ package org.apache.archiva.web.test.pare
  * under the License.
  */
 
-public abstract class AbstractArtifactReportsTest 
-	extends AbstractArchivaTest
+public abstract class AbstractArtifactReportsTest
+    extends AbstractArchivaTest
 {
-	
-	//Reports
-	public void goToReportsPage()
-	{
-		clickLinkWithText( "Reports" );
-		assertReportsPage();
-	}
-	
-	public void assertReportsPage()
-	{
-		assertPage( "Apache Archiva \\ Reports" );
-		assertTextPresent( "Reports" );
-		assertTextPresent( "Repository Statistics" );
-		assertTextPresent( "Repositories To Be Compared" );
-		assertElementPresent( "availableRepositories" );
-		assertButtonWithValuePresent( "v" );
-		assertButtonWithValuePresent( "^" );
-		assertButtonWithValuePresent( "<-" );
-		assertButtonWithValuePresent( "->" );
-		assertButtonWithValuePresent( "<<--" );
-		assertButtonWithValuePresent( "-->>" );
-		assertButtonWithValuePresent( "<*>" );
-		assertElementPresent( "selectedRepositories" );
-		assertButtonWithValuePresent( "v" );
-		assertButtonWithValuePresent( "^" );
-		assertTextPresent( "Row Count" );
-		assertElementPresent( "rowCount" );
-		assertTextPresent( "Start Date" );
-		assertElementPresent( "startDate" );
-		assertTextPresent( "End Date" );
-		assertElementPresent( "endDate" );
-		assertButtonWithValuePresent( "View Statistics" );
-		assertTextPresent( "Repository Health" );
-		assertTextPresent( "Row Count" );
-		assertElementPresent( "rowCount" );
-		assertTextPresent( "Group ID" );
-		assertElementPresent( "groupId" );
-		assertTextPresent( "Repository ID" );
-		assertElementPresent( "repositoryId" );
-		assertButtonWithValuePresent( "Show Report" );
-	}
-	
-	public void compareRepositories( String labelSelected, String startDate, String endDate )
-	{
-		goToReportsPage();
-		getSelenium().removeSelection( "generateStatisticsReport_availableRepositories" , labelSelected );
-		clickButtonWithValue( "->" , false );
-		getSelenium().type( "startDate", startDate );
-		//clickLinkWithLocator( "1" , false );
-		//getSelenium().click( "endDate" );
-		getSelenium().type( "endDate", endDate );
-		//clickLinkWithLocator( "30" , false );
-		clickButtonWithValue( "View Statistics" );
-	}
+
+    // Reports
+    public void goToReportsPage()
+    {
+        clickLinkWithText( "Reports" );
+        assertReportsPage();
+    }
+
+    public void assertReportsPage()
+    {
+        assertPage( "Apache Archiva \\ Reports" );
+        assertTextPresent( "Reports" );
+        assertTextPresent( "Repository Statistics" );
+        assertTextPresent( "Repositories To Be Compared" );
+        assertElementPresent( "availableRepositories" );
+        assertButtonWithValuePresent( "v" );
+        assertButtonWithValuePresent( "^" );
+        assertButtonWithValuePresent( "<-" );
+        assertButtonWithValuePresent( "->" );
+        assertButtonWithValuePresent( "<<--" );
+        assertButtonWithValuePresent( "-->>" );
+        assertButtonWithValuePresent( "<*>" );
+        assertElementPresent( "selectedRepositories" );
+        assertButtonWithValuePresent( "v" );
+        assertButtonWithValuePresent( "^" );
+        assertTextPresent( "Row Count" );
+        assertElementPresent( "rowCount" );
+        assertTextPresent( "Start Date" );
+        assertElementPresent( "startDate" );
+        assertTextPresent( "End Date" );
+        assertElementPresent( "endDate" );
+        assertButtonWithValuePresent( "View Statistics" );
+        assertTextPresent( "Repository Health" );
+        assertTextPresent( "Row Count" );
+        assertElementPresent( "rowCount" );
+        assertTextPresent( "Group ID" );
+        assertElementPresent( "groupId" );
+        assertTextPresent( "Repository ID" );
+        assertElementPresent( "repositoryId" );
+        assertButtonWithValuePresent( "Show Report" );
+    }
+
+    public void compareRepositories( String labelSelected, String startDate, String endDate )
+    {
+        goToReportsPage();
+        getSelenium().removeSelection( "generateStatisticsReport_availableRepositories", labelSelected );
+        clickButtonWithValue( "->", false );
+        getSelenium().type( "startDate", startDate );
+        // clickLinkWithLocator( "1" , false );
+        // getSelenium().click( "endDate" );
+        getSelenium().type( "endDate", endDate );
+        // clickLinkWithLocator( "30" , false );
+        clickButtonWithValue( "View Statistics" );
+    }
 
 }
\ No newline at end of file

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractBrowseTest.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractBrowseTest.java?rev=931475&r1=931474&r2=931475&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractBrowseTest.java (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractBrowseTest.java Wed Apr  7 09:27:05 2010
@@ -19,22 +19,22 @@ package org.apache.archiva.web.test.pare
  * under the License.
  */
 
-public abstract class AbstractBrowseTest 
-	extends AbstractArchivaTest
+public abstract class AbstractBrowseTest
+    extends AbstractArchivaTest
 {
-	
-	//Browse
-	public void goToBrowsePage()
-	{
-		clickLinkWithText( "Browse" );
-		assertBrowsePage();
-	}
 
-	public void assertBrowsePage()
-	{
-		assertPage( "Apache Archiva \\ Browse Repository" );
-		assertTextPresent( "Browse Repository" );
-		assertTextPresent( "Groups" );
-	}
+    // Browse
+    public void goToBrowsePage()
+    {
+        clickLinkWithText( "Browse" );
+        assertBrowsePage();
+    }
+
+    public void assertBrowsePage()
+    {
+        assertPage( "Apache Archiva \\ Browse Repository" );
+        assertTextPresent( "Browse Repository" );
+        assertTextPresent( "Groups" );
+    }
 
 }
\ No newline at end of file