continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wsm...@apache.org
Subject svn commit: r781903 - in /continuum/trunk/continuum-webapp-test/src/test: resources/ testng/config/ testng/org/apache/continuum/web/test/ testng/org/apache/continuum/web/test/parent/
Date Fri, 05 Jun 2009 03:36:42 GMT
Author: wsmoak
Date: Fri Jun  5 03:36:41 2009
New Revision: 781903

URL: http://svn.apache.org/viewvc?rev=781903&view=rev
Log:
[CONTINUUM-2245] Selenium tests for Continuum user roles
Submitted by: Marecor Baclay

Added:
    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/XPathExpressionUtil.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/resources/testng.properties
    continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml

Modified: continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties?rev=781903&r1=781902&r2=781903&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Fri Jun  5
03:36:41 2009
@@ -174,4 +174,63 @@
 TEMPLATE_BUILD_POM_NAME =pom.xml
 TEMPLATE_BUILD_GOALS =test
 TEMPLATE_BUILD_ARGUMENTS =--batch-mode --non-recursive
-TEMPLATE_BUILD_DESCRIPTION =Template Maven Test
\ No newline at end of file
+TEMPLATE_BUILD_DESCRIPTION =Template Maven Test
+
+########################
+# userRoles group
+########################
+# General
+USERROLE_EMAIL=user@localhost.localdomain
+USERROLE_PASSWORD=pass123
+NEW_USERROLE_PASSWORD=pass12345
+# Guest Role
+GUEST_USERNAME=guest1
+GUEST_FULLNAME=Guest
+# Registered User Role
+REGISTERED_USERNAME=reg_user
+REGISTERED_FULLNAME=Registered User
+# System Administrator
+SYSAD_USERNAME=sys_admin
+SYSAD_FULLNAME=System Administrator
+# User Administrator
+USERADMIN_USERNAME=user_admin
+USERADMIN_FULLNAME=User Administrator
+# Continuum Group Project Administrator
+GROUPPROJECTADMIN_USERNAME=groupprojectadmin
+GROUPPROJECTADMIN_FULLNAME=Continuum Group Project Administrator
+# Continuum Group Project Developer
+GROUPPROJECTDEVELOPER_USERNAME=groupprojectdev
+GROUPPROJECTDEVELOPER_FULLNAME=Continuum Group Project Developer
+# Continuum Group Project User
+GROUPPROJECTUSER_USERNAME=groupprojectuser
+GROUPPROJECTUSER_FULLNAME=Continuum Group Project User
+# Continuum Manage Build Environment
+MANAGEBUILDENVIRONMENT_USERNAME=managebuildenv
+MANAGEBUILDENVIRONMENT_FULLNAME=Continuum Manage Build Environments
+# Continuum Manage Build Templates
+MANAGEBUILDTEMPLATES_USERNAME=managebuildtemp
+MANAGEBUILDTEMPLATES_FULLNAME=Continuum Manage Build Templates
+# Continuum Manage Installations
+MANAGEINSTALLATIONS_USERNAME=manageinstallations
+MANAGEINSTALLATIONS_FULLNAME=Continuum Manage Installations
+# Continuum Manage Local Repositories
+MANAGELOCALREPOS_USERNAME=managelocalrepo
+MANAGELOCALREPOS_FULLNAME=Continuum Manage Local Repositories
+# Continuum Manage Purging
+MANAGEPURGING_USERNAME=managepurging
+MANAGEPURGING_FULLNAME=Continuum Manage Purging
+# Continuum Manage Queues
+MANAGEQUEUES_USERNAME=managequeues
+MANAGEQUEUES_FULLNAME=Continuum Manage Queues
+# Continuum Manage Scheduling
+MANAGESCHEDULING_USERNAME=manageschedule
+MANAGESCHEDULING_FULLNAME=Continuum Manage Scheduling
+# Project Administrator
+PROJECTADMINISTRATOR_DEFAULTPROJECTGROUP_USERNAME=projectadmin
+PROJECTADMINISTRATOR_DEFAULTPROJECTGROUP_FULLNAME=Project Administrator - Default Project
Group
+# Project Developer
+PROJECTDEVELOPER_DEFAULTPROJECTGROUP_USERNAME=projectdev
+PROJECTDEVELOPER_DEFAULTPROJECTGROUP_FULLNAME=Project Developer - Default Project Group
+# Project User
+PROJECTUSER_DEFAULTPROJECTGROUP_USERNAME=projectuser
+PROJECTUSER_DEFAULTPROJECTGROUP_FULLNAME=Project User - Default Project Group

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml?rev=781903&r1=781902&r2=781903&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml Fri Jun  5 03:36:41
2009
@@ -54,10 +54,11 @@
 				<include name="installation" />
 				<include name="buildEnvironment" />
 				<include name="buildDefinitionTemplate" />
+				<include name="userroles"/>
 			</run>
 		</groups>
 		<packages>
 			<package name="org.apache.continuum.web.test" />
 		</packages>
 	</test>
-</suite>
\ No newline at end of file
+</suite>

Added: 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=781903&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
(added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
Fri Jun  5 03:36:41 2009
@@ -0,0 +1,522 @@
+package org.apache.continuum.web.test;
+
+import org.apache.continuum.web.test.parent.AbstractUserRolesManagementTest;
+import org.testng.annotations.Test;
+
+
+@Test( groups = { "userroles" }, dependsOnMethods = { "testWithCorrectUsernamePassword" }
)
+public class UserRolesManagementTest 
+	extends AbstractUserRolesManagementTest
+{
+	public void testBasicAddDeleteUser()
+	{
+		username = p.getProperty( "GUEST_USERNAME" );
+		fullname = p.getProperty( "GUEST_FULLNAME" );
+		
+		createUser( username, fullname, getUserEmail(), getUserRolePassword(), true);
+		deleteUser( username, fullname, getUserEmail() );
+		clickLinkWithText( "Logout" );
+	}
+	
+        @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+	public void testUserWithGuestRole()
+	{
+		username = p.getProperty("GUEST_USERNAME");
+		fullname = p.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 = p.getProperty( "REGISTERED_USERNAME" );
+		fullname = p.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 = p.getProperty( "SYSAD_USERNAME" );
+		fullname = p.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 = p.getProperty( "USERADMIN_USERNAME" );
+		fullname = p.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 = p.getProperty( "GROUPPROJECTADMIN_USERNAME" );
+		fullname = p.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 = p.getProperty( "GROUPPROJECTDEVELOPER_USERNAME" );
+		fullname = p.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 = p.getProperty( "GROUPPROJECTUSER_USERNAME" );
+		fullname = p.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 = p.getProperty( "MANAGEBUILDENVIRONMENT_USERNAME" );
+		fullname = p.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 = p.getProperty( "MANAGEBUILDTEMPLATES_USERNAME" );
+		fullname = p.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 = p.getProperty( "MANAGEINSTALLATIONS_USERNAME" );
+		fullname = p.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 = p.getProperty( "MANAGELOCALREPOS_USERNAME" );
+		fullname = p.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 = p.getProperty( "MANAGEPURGING_USERNAME" );
+		fullname = p.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 = p.getProperty( "MANAGEQUEUES_USERNAME" );
+		fullname = p.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 = p.getProperty( "MANAGESCHEDULING_USERNAME" );
+		fullname = p.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 = p.getProperty( "PROJECTADMINISTRATOR_DEFAULTPROJECTGROUP_USERNAME" );
+		fullname = p.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 = p.getProperty( "PROJECTDEVELOPER_DEFAULTPROJECTGROUP_USERNAME" );
+		fullname = p.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 = p.getProperty( "PROJECTUSER_DEFAULTPROJECTGROUP_USERNAME" );
+		fullname = p.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());
+	}
+
+}

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/XPathExpressionUtil.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/XPathExpressionUtil.java?rev=781903&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/XPathExpressionUtil.java
(added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/XPathExpressionUtil.java
Fri Jun  5 03:36:41 2009
@@ -0,0 +1,245 @@
+package org.apache.continuum.web.test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Utility class for creating xpath expressions
+ */
+public class XPathExpressionUtil
+{
+    public static final String CONTAINS = "contains";
+
+    public static final String AND = " and ";
+
+    public static final String CURRENT_NODE = "./";
+
+    public static final String PARENT_NODE = "../";
+
+    public static final String GRANDPARENT_NODE = "../../";
+
+    public static final String ELEMENT_ANY_LEVEL = "//";
+
+    public static final String TABLE_COLUMN = "td";
+
+    public static final String TABLE_ROW = "tr";
+
+    public static final String START_NODE_TEST = "[";
+
+    public static final String END_NODE_TEST = "]";
+
+    public static final String ANCHOR = "a";
+
+    public static final String IMG = "img";
+
+    public static final String LIST = "ul";
+
+    public static final String LINE = "li";
+
+    public static String getList( String[] values )
+    {
+        String xpathExpression = "";
+
+        if ( values.length > 0 )
+        {
+            xpathExpression += ELEMENT_ANY_LEVEL;
+            xpathExpression += LIST;
+            xpathExpression += START_NODE_TEST;
+
+            for (int nIndex = 0; nIndex < values.length; nIndex++ )
+            {
+                xpathExpression += ( ( nIndex > 0 ) ? AND : "" );
+                xpathExpression += contains( LINE + position( nIndex + 1 ), values[nIndex]
);
+            }
+
+            xpathExpression += END_NODE_TEST;
+        }
+
+        return xpathExpression;
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     *
+     * @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
+     */
+    public static String getColumnElement( String element, int elementIndex, String[] columnValues
)
+    {
+        return getColumnElement( element, elementIndex, null, columnValues );
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     *
+     * @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 )
+    {
+        return getColumnElement( element, elementIndex, elementValue, "TEXT", columnValues
);
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     *
+     * @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 )
+    {
+        return getColumnElement( element, elementIndex, imageName, IMG, columnValues );
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     *
+     * @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
+     */
+    private static String getColumnElement( String element, int elementIndex, String elementValue,
+                                            String elementValueType, String[] columnValues
)
+    {
+        String xpathExpression = null;
+
+        if ( ( columnValues != null ) && ( columnValues.length > 0 ) )
+        {
+            xpathExpression = ELEMENT_ANY_LEVEL + element;
+            xpathExpression += START_NODE_TEST;
+
+            if ( elementValue != null )
+            {
+                if ( "TEXT".equals( elementValueType ) )
+                {
+                    xpathExpression += contains( elementValue );
+                    xpathExpression += ( columnValues.length > 0 ) ? AND : "";
+                }
+            }
+
+            // we are two levels below the table row element ( tr/td/<element> )
+            xpathExpression += matchColumns( GRANDPARENT_NODE, columnValues, elementIndex
);
+
+            xpathExpression += END_NODE_TEST;
+        }
+
+        if ( IMG.equals( elementValueType ) )
+        {
+            xpathExpression += "/img[contains(@src, '" + elementValue + "')]";
+        }
+
+        return xpathExpression;
+    }
+
+    /**
+     * 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
+     */
+    public static String getTableRow( String[] columnValues )
+    {
+        String xpathExpression = null;
+
+        if ( ( columnValues != null ) && ( columnValues.length > 0 ) )
+        {
+            xpathExpression = new String( ELEMENT_ANY_LEVEL + TABLE_ROW + START_NODE_TEST
);
+            xpathExpression += matchColumns( columnValues );
+            xpathExpression += END_NODE_TEST;
+        }
+
+        return xpathExpression;
+    }
+
+    private static String matchColumns( String[] columnValues )
+    {
+        return matchColumns( columnValues, -1 );
+    }
+
+    private static String matchColumns( String[] columnValues, int skipIndex )
+    {
+        return matchColumns( null, columnValues, skipIndex );
+    }
+
+    private static String matchColumns( String parent, String[] columnValues, int skipIndex
)
+    {
+        String xpathExpression = "";
+
+        for ( int nIndex = 0; nIndex < columnValues.length; nIndex++ )
+        {
+            if ( ( skipIndex != nIndex ) || ( skipIndex == -1 ) )
+            {
+                // prepend "and" if index > 0
+                xpathExpression += ( ( nIndex > 0 ) ? AND : "" );
+                xpathExpression += contains( parent, TABLE_COLUMN + position( nIndex + 1
), columnValues[nIndex] );
+            }
+        }
+
+        return xpathExpression;
+    }
+
+    private static String position( int nIndex )
+    {
+        return new String( "[" + nIndex + "]" );
+    }
+
+    private static String contains( String parent, String element, String matchedString )
+    {
+        String finalElement = ( parent != null ) ? parent : "";
+        finalElement += element;
+
+        return contains( finalElement, matchedString );
+    }
+
+    private static String contains( String matchedString )
+    {
+        return contains( ".", matchedString );
+    }
+
+    private static String contains( String axis, String matchedString )
+    {
+        return new String( CONTAINS + "(" + axis + "," + "'" + matchedString + "')" );
+    }
+
+    private static String equals( String parent, String element, String matchedString )
+    {
+        String finalElement = ( parent != null ) ? parent : "";
+        finalElement += element;
+
+        return equals( finalElement, matchedString );
+    }
+
+    private static String equals( String axis, String matchedString )
+    {
+        return new String( axis + "==" + "'" + matchedString + "'" );
+    }
+}
\ No newline at end of file

Added: 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=781903&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java
(added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java
Fri Jun  5 03:36:41 2009
@@ -0,0 +1,343 @@
+package org.apache.continuum.web.test.parent;
+
+import java.io.File;
+
+import org.apache.continuum.web.test.XPathExpressionUtil;
+
+public abstract class AbstractUserRolesManagementTest 
+	extends AbstractContinuumTest
+{
+	protected String username;
+	protected String fullname;
+	
+	public String getUserEmail()
+	{
+		String email = p.getProperty("USERROLE_EMAIL");
+		return email;
+	}
+	
+	public String getUserRolePassword() 
+	{
+		String password = p.getProperty("USERROLE_PASSWORD");
+		return password;
+	}
+
+	public String getUserRoleNewPassword() 
+	{
+		String password_new = p.getProperty( "NEW_USERROLE_PASSWORD" );
+		return password_new;
+	}
+
+	public String getBasedir()
+    {
+        String basedir = System.getProperty( "basedir" );
+
+        if ( basedir == null )
+        {
+            basedir = new File( "" ).getAbsolutePath();
+        }
+
+        return basedir;
+    }
+	
+	public String getAdminUsername()
+	{
+		String adminUsername = p.getProperty( "ADMIN_USERNAME" );
+		return adminUsername;
+	}
+	
+	public String getAdminPassword()
+	{
+		String adminPassword = p.getProperty( "ADMIN_PASSWORD" );
+		return adminPassword;
+	}
+	
+	////////////////////////////
+	// Assertions
+	////////////////////////////
+	public void assertCreateUserPage()
+	{
+		assertPage( "[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 assertUserRolesPage()
+	{
+		assertPage( "[Admin] User Edit" );
+		assertTextPresent( "[Admin] User Roles" );
+		String userRoles = "Username,Full Name,Email,redback-xwork-integration-core,Redback XWork
Integration Security Core,Guest,Registered User,System Administrator,User Administrator,Continuum
Group Project Administrator,Continuum Group Project Developer,Continuum Group Project User,Continuum
Manage Build Environments,Continuum Manage Build Templates,Continuum Manage Installations,Continuum
Manage Local Repositories,Continuum Manage Purging,Continuum Manage Queues,Continuum Manage
Scheduling,Project Administrator,Project Developer,Project User,Default Project Group";
+		String[] arrayUserRoles = userRoles.split( "," );
+			for ( String userroles : arrayUserRoles )
+				assertTextPresent( userroles );
+	}
+	
+	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 assertLeftNavMenuWithRole( String role )
+	{
+		if( role == "System Administrator" )
+    	{
+    		String navMenu = "About,Show Project Groups,Maven 2.0.x Project,Maven 1.x Project,Ant
Project,Shell Project,Local Repositories,Purge Configurations,Schedules,Installations,Build
Environments,Queues,Build Definition Templates,Configuration,Appearance,Users,Roles,Build
Queue";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "User Administrator" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Users,Roles";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Group Project Administrator" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Maven 2.0.x Project,Maven 1.x Project,Ant
Project,Shell Project,Schedules,Queues,Users,Roles";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Group Project Developer" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Queues";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Group Project User" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Queues";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Build Environments" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Build Environments";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Build Templates" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Build Definition Templates";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Installations" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Installations";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Local Repositories" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Local Repositories";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Purging" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Purge Configurations";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Queues" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Queues";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Scheduling" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Schedules";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+	else if( role == "Project Administrator - Default Project Group" )
+	{
+    		String navMenu = "About,Show Project Groups,Queues,Users,Roles";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );		
+	}
+    	else if( role == "Project Developer - Default Project Group" || role == "Project User
- Default Project Group" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Queues";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else
+    	{
+    		String navMenu = "About,Show Project Groups";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    		assertTextPresent( "Project Groups" );
+    		//assertTextPresent( "Project Groups list is empty." );
+    	}
+
+	}
+	
+	public void assertDeleteUserPage( String username )
+	 {
+	        assertPage( "[Admin] User Delete" ); //TODO
+	        assertTextPresent( "[Admin] User Delete" );
+	        assertTextPresent( "The following user will be deleted:" );
+	        assertTextPresent( "Username: " + username );
+	        assertButtonWithValuePresent( "Delete User" );
+	 }
+	
+	/////////////////////////////////////////
+	// User Roles Management
+	/////////////////////////////////////////
+	public void changePassword(String oldPassword, String newPassword) 
+	{
+		assertPage( "Change Password" );
+		setFieldValue( "existingPassword", oldPassword );
+		setFieldValue( "newPassword", newPassword );
+		setFieldValue( "newPasswordConfirm", newPassword );
+		clickButtonWithValue( "Change Password" );
+	}
+	
+	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( "Users" );
+		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( );
+        clickButtonWithValue( "Submit" );
+        
+        /*if (valid )
+        {
+        	String[] columnValues = {userName, fullName, emailAd};
+            assertElementPresent( XPathExpressionUtil.getTableRow( columnValues ) );
+        }
+        else
+        {
+            assertCreateUserPage();
+        }*/
+	}
+	
+	
+	 public void login( String username, String password )
+	    {
+	        login( username, password, true, "Login Page" );
+	    }
+		
+		public void login( String username, String password, boolean valid, String assertReturnPage
)
+	    {
+	        if ( isLinkPresent( "Login" ) )
+	        {
+	            goToLoginPage();
+
+	            submitLoginPage( username, password, false, valid, assertReturnPage );
+	        }
+	    }
+	    
+		public void submitLoginPage( String username, String password )
+	    {
+	        submitLoginPage( username, password, false, true, "Login Page" );
+	    }
+
+	    public void submitLoginPage( String username, String password, boolean validUsernamePassword
)
+	    {
+	        submitLoginPage( username, password, false, validUsernamePassword, "Login Page"
);
+	    }
+
+	    public void submitLoginPage( String username, String password, boolean rememberMe, boolean
validUsernamePassword,
+	                                 String assertReturnPage )
+	    {
+	        assertLoginPage();
+	        setFieldValue( "username", username );
+	        setFieldValue( "password", password );
+	        if ( rememberMe )
+	        {
+	            checkField( "rememberMe" );
+	        }
+	        clickButtonWithValue( "Login" );
+
+	        if ( validUsernamePassword )
+	        {
+	            assertTextPresent( "Current User:" );
+	            assertTextPresent( username );
+	            assertLinkPresent( "Edit Details" );
+	            assertLinkPresent( "Logout" );
+	        }
+	        else
+	        {
+	            if ( "Login Page".equals( assertReturnPage ) )
+	            {
+	                assertLoginPage();
+	            }
+	            else
+	            {
+	                assertPage( assertReturnPage );
+	            }
+	        }
+	    }
+	
+	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)
+	{
+		//clickLinkWithText( "userlist" );
+		clickLinkWithXPath( "//table[@id='ec_table']/tbody[2]/tr[3]/td[7]/a/img" );
+		assertDeleteUserPage( userName );
+        submit();
+        assertElementNotPresent( userName );
+	}
+}



Mime
View raw message