continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmora...@apache.org
Subject svn commit: r784889 [3/3] - in /continuum/trunk/continuum-webapp-test: ./ src/test/resources/ src/test/testng/org/apache/continuum/web/test/ src/test/testng/org/apache/continuum/web/test/parent/
Date Mon, 15 Jun 2009 17:56:53 GMT
Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java?rev=784889&r1=784888&r2=784889&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
Mon Jun 15 17:56:52 2009
@@ -23,7 +23,7 @@
 
 /**
  * Based on AbstractContinuumTestCase of Emmanuel Venisse test.
- * 
+ *
  * @author José Morales Martínez
  * @version $Id$
  */
@@ -50,7 +50,7 @@
         assertButtonWithValuePresent( "Create Admin" );
     }
 
-    public void submitAdminData( String fullname, String email, String password )
+    public void submitAdminData(String fullname,String email,String password )
     {
         setFieldValue( "user.fullName", fullname );
         setFieldValue( "user.email", email );
@@ -64,8 +64,8 @@
     // ////////////////////////////////////
     public void goToAboutPage()
     {
+        getSelenium().open( baseUrl );
         clickLinkWithText( "About" );
-
         assertAboutPage();
     }
 
@@ -104,7 +104,7 @@
         assertTextPresent( "Forgot your Password? Request a password reset." );
     }
 
-    public void submitUserData( String username, String password, boolean rememberme, boolean
success )
+    public void submitUserData(String username,String password,boolean rememberme,boolean
success )
     {
 
         setFieldValue( "username", username );
@@ -124,7 +124,7 @@
         }
     }
 
-    public void assertAutenticatedPage( String username )
+    public void assertAutenticatedPage(String username )
     {
         assertTextPresent( "Current User" );
         assertTextPresent( "Edit Details" );
@@ -163,7 +163,7 @@
     // Build Queue
     // ////////////////////////////////////
 
-    public void setMaxBuildQueue( int maxBuildQueue )
+    public void setMaxBuildQueue(int maxBuildQueue )
     {
         clickLinkWithText( "Configuration" );
         setFieldValue( "numberOfAllowedBuildsinParallel", String.valueOf( maxBuildQueue )
);
@@ -201,7 +201,7 @@
     // ////////////////////////////////////
     // Project Group
     // ////////////////////////////////////
-    public void showProjectGroup( String name, String groupId, String description )
+    public void showProjectGroup(String name,String groupId,String description )
         throws Exception
     {
         goToProjectGroupsSummaryPage();
@@ -213,7 +213,7 @@
         assertProjectGroupSummaryPage( name, groupId, description );
     }
 
-    public void assertProjectGroupSummaryPage( String name, String groupId, String description
)
+    public void assertProjectGroupSummaryPage(String name,String groupId,String description
)
     {
         assertPage( "Continuum - Project Group" );
         assertTextPresent( "Project Group Name" );
@@ -243,7 +243,7 @@
         }
     }
 
-    public void addProjectGroup( String name, String groupId, String description, boolean
success )
+    public void addProjectGroup(String name,String groupId,String description,boolean success
)
         throws Exception
     {
         goToProjectGroupsSummaryPage();
@@ -280,7 +280,7 @@
         assertElementPresent( "description" );
     }
 
-    public void removeProjectGroup( String name, String groupId, String description )
+    public void removeProjectGroup(String name,String groupId,String description )
         throws Exception
     {
         showProjectGroup( name, groupId, description );
@@ -294,7 +294,7 @@
         assertProjectGroupsSummaryPage();
     }
 
-    public void editProjectGroup( String name, String groupId, String description, String
newName, String newDescription )
+    public void editProjectGroup(String name,String groupId,String description,String newName,String
newDescription )
         throws Exception
     {
         showProjectGroup( name, groupId, description );
@@ -305,7 +305,7 @@
         clickButtonWithValue( "Save" );
     }
 
-    public void assertEditGroupPage( String groupId )
+    public void assertEditGroupPage(String groupId )
         throws Exception
     {
         assertPage( "Continuum - Update Project Group" );
@@ -320,7 +320,7 @@
         assertElementPresent( "Cancel" );
     }
 
-    public void buildProjectGroup( String projectGroupName, String groupId, String description,
String projectName )
+    public void buildProjectGroup(String projectGroupName,String groupId,String description,String
projectName )
         throws Exception
     {
         int currentIt = 1;
@@ -356,8 +356,8 @@
         assertButtonWithValuePresent( "Submit" );
     }
 
-    public void addValidM2ProjectFromProjectGroup( String projectGroupName, String groupId,
String description,
-                                                   String m2PomUrl )
+    public void addValidM2ProjectFromProjectGroup(String projectGroupName,String groupId,String
description,
+                                                  String m2PomUrl )
         throws Exception
     {
         showProjectGroup( projectGroupName, groupId, description );
@@ -370,7 +370,7 @@
         assertProjectGroupsSummaryPage();
     }
 
-    public void goToGroupBuildDefinitionPage( String projectGroupName, String groupId, String
description )
+    public void goToGroupBuildDefinitionPage(String projectGroupName,String groupId,String
description )
         throws Exception
     {
         showProjectGroup( projectGroupName, groupId, description );
@@ -378,12 +378,12 @@
         assertGroupBuildDefinitionPage( projectGroupName );
     }
 
-    public void assertGroupBuildDefinitionPage( String projectGroupName )
+    public void assertGroupBuildDefinitionPage(String projectGroupName )
     {
         assertTextPresent( "Project Group Build Definitions of " + projectGroupName + " group"
);
     }
 
-    public void assertDeleteBuildDefinitionPage( String description, String goals )
+    public void assertDeleteBuildDefinitionPage(String description,String goals )
     {
         assertTextPresent( "Are you sure you want to delete the build definition with description
\"" + description
             + "\", goals \"" + goals + "\" and id" );
@@ -415,9 +415,9 @@
         assertElementPresent( "profileId" );
     }
 
-    public void addEditGroupBuildDefinition( String groupName, String buildFile, String goals,
String arguments,
-                                             String description, boolean buildFresh, boolean
alwaysBuild,
-                                             boolean isDefault )
+    public void addEditGroupBuildDefinition(String groupName,String buildFile,String goals,String
arguments,
+                                            String description,boolean buildFresh,boolean
alwaysBuild,
+                                            boolean isDefault )
     {
         assertAddEditBuildDefinitionPage();
         // Enter values into Add Build Definition fields, and submit
@@ -468,7 +468,7 @@
     // ////////////////////////////////////
     // General Project Pages
     // ////////////////////////////////////
-    public void goToEditProjectPage( String projectGroupName, String projectName )
+    public void goToEditProjectPage(String projectGroupName,String projectName )
     {
         clickLinkWithText( "Show Project Groups" );
         clickLinkWithText( projectGroupName );
@@ -497,7 +497,7 @@
         assertElementPresent( "scmTag" );
     }
 
-    public void goToProjectInformationPage( String projectGroupName, String projectName )
+    public void goToProjectInformationPage(String projectGroupName,String projectName )
     {
         clickLinkWithText( "Show Project Groups" );
         clickLinkWithText( projectGroupName );
@@ -518,8 +518,8 @@
         assertTextPresent( "Developers" );
     }
 
-    public void moveProjectToProjectGroup( String groupName, String groupId, String groupDescription,
-                                           String projectName, String newProjectGroup )
+    public void moveProjectToProjectGroup(String groupName,String groupId,String groupDescription,
+                                          String projectName,String newProjectGroup )
         throws Exception
     {
         showProjectGroup( groupName, groupId, groupDescription );
@@ -556,8 +556,8 @@
         assertElementPresent( "selectedProjectGroup" );
     }
 
-    public void addMavenTwoProject( String pomUrl, String username, String password, String
projectGroup,
-                                    boolean success )
+    public void addMavenTwoProject(String pomUrl,String username,String password,String projectGroup,
+                                   boolean success )
         throws Exception
     {
         goToAddMavenTwoProjectPage();
@@ -586,11 +586,11 @@
 
     /**
      * submit the page
-     * 
+     *
      * @param m2PomUrl
      * @param validPom
      */
-    public void submitAddMavenTwoProjectPage( String m2PomUrl, boolean validPom )
+    public void submitAddMavenTwoProjectPage(String m2PomUrl,boolean validPom )
         throws Exception
     {
         addMavenTwoProject( m2PomUrl, "", "", null, validPom );
@@ -634,8 +634,8 @@
         assertButtonWithValuePresent( "Cancel" );
     }
 
-    public void addMavenOneProject( String pomUrl, String username, String password, String
projectGroup,
-                                    String buildTemplate, boolean success )
+    public void addMavenOneProject(String pomUrl,String username,String password,String projectGroup,
+                                   String buildTemplate,boolean success )
         throws Exception
     {
         setFieldValue( "m1PomUrl", pomUrl );
@@ -679,7 +679,7 @@
         assertAddProjectPage( "shell" );
     }
 
-    public void assertAddProjectPage( String type )
+    public void assertAddProjectPage(String type )
     {
         String title = type.substring( 0, 1 ).toUpperCase() + type.substring( 1 ).toLowerCase();
         assertPage( "Continuum - Add " + title + " Project" );
@@ -712,9 +712,9 @@
         assertButtonWithValuePresent( "Cancel" );
     }
 
-    public void addProject( String name, String description, String version, String scmUrl,
String scmUser,
-                            String scmPassword, String scmTag, boolean useCache, String projectGroup,
-                            String buildTemplate, boolean success )
+    public void addProject(String name,String description,String version,String scmUrl,String
scmUser,
+                           String scmPassword,String scmTag,boolean useCache,String projectGroup,
+                           String buildTemplate,boolean success )
         throws Exception
     {
         setFieldValue( "projectName", name );
@@ -749,11 +749,11 @@
         waitAddProject( title );
     }
 
-    private void waitAddProject( String title )
+    private void waitAddProject(String title )
         throws Exception
     {
-    	
-    	Thread.sleep( 4000 ); 
+
+    	Thread.sleep( 4000 );
         String condition = "selenium.browserbot.getCurrentWindow().document.title != ''";
         getSelenium().waitForCondition( condition, maxWaitTimeInMs );
         Thread.sleep( 1000 );

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java?rev=784889&r1=784888&r2=784889&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
Mon Jun 15 17:56:52 2009
@@ -19,6 +19,9 @@
  * under the License.
  */
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
@@ -26,8 +29,8 @@
 import java.util.Properties;
 import java.util.Map.Entry;
 
+import org.apache.commons.io.IOUtils;
 import org.codehaus.plexus.util.StringUtils;
-
 import org.testng.Assert;
 
 import com.thoughtworks.selenium.DefaultSelenium;
@@ -35,7 +38,7 @@
 
 /**
  * Based on AbstractSeleniumTestCase of Emmanuel Venisse test.
- * 
+ *
  * @author José Morales Martínez
  * @version $Id$
  */
@@ -47,7 +50,9 @@
 
     private static ThreadLocal<Selenium> selenium;
 
-    public static Properties p;
+    private static Properties p;
+
+    private final static String PROPERTIES_SEPARATOR = "=";
 
     /**
      * Initialize selenium an others properties. This method is called from BeforeSuite method
of sub-class.
@@ -55,24 +60,26 @@
     public void open()
         throws Exception
     {
+        InputStream input = this.getClass().getClassLoader().getResourceAsStream( "testng.properties"
);
         p = new Properties();
-        p.load( this.getClass().getClassLoader().getResourceAsStream( "testng.properties"
) );
+        p.load( input );
 
-        baseUrl = p.getProperty( "BASE_URL" );
-        maxWaitTimeInMs = p.getProperty( "MAX_WAIT_TIME_IN_MS" );
+        baseUrl = getProperty( "BASE_URL" );
+        maxWaitTimeInMs = getProperty( "MAX_WAIT_TIME_IN_MS" );
 
-        String seleniumHost = p.getProperty( "SELENIUM_HOST" );
-        int seleniumPort = Integer.parseInt( ( p.getProperty( "SELENIUM_PORT" ) ) );
+        String seleniumHost = getProperty( "SELENIUM_HOST" );
+        int seleniumPort = Integer.parseInt( ( getProperty( "SELENIUM_PORT" ) ) );
 
         String seleniumBrowser = System.getProperty( "browser" );
         if ( StringUtils.isEmpty( seleniumBrowser ) )
         {
-            seleniumBrowser = p.getProperty( "SELENIUM_BROWSER" );
+            seleniumBrowser = getProperty( "SELENIUM_BROWSER" );
         }
-       
+
         final Selenium s = new DefaultSelenium( seleniumHost, seleniumPort, seleniumBrowser,
baseUrl );
         selenium = new ThreadLocal<Selenium>()
         {
+            @Override
             protected Selenium initialValue()
             {
                 return s;
@@ -86,6 +93,37 @@
         return selenium.get();
     }
 
+    protected String getProperty( String key )
+    {
+        return p.getProperty( key );
+    }
+
+    protected String getEscapeProperty( String key )
+    {
+        InputStream input = this.getClass().getClassLoader().getResourceAsStream( "testng.properties"
);
+        String value = null;
+        List<String> lines;
+        try
+        {
+            lines = IOUtils.readLines( input );
+        }
+        catch ( IOException e )
+        {
+            lines = new ArrayList<String>();
+        }
+        for ( String l : lines )
+        {
+            if ( l != null && l.startsWith( key ) )
+            {
+                int indexSeparator = l.indexOf( PROPERTIES_SEPARATOR );
+                value = l.substring( indexSeparator + 1 ).trim();
+                break;
+            }
+        }
+        return value;
+    }
+
+
     /**
      * Close selenium session. Called from AfterSuite method of sub-class
      */
@@ -361,14 +399,15 @@
     {
         Assert.assertFalse( getSelenium().isChecked( locator ) );
     }
-    public void clickAndWait (String locator) 
+    public void clickAndWait( String locator )
 	{
 	  getSelenium().click(locator);
 	  getSelenium().waitForPageToLoad(maxWaitTimeInMs);
 	}
-    
-    public void waitForElementPresent(String locator) throws InterruptedException
-    {   
+
+    public void waitForElementPresent( String locator )
+        throws InterruptedException
+    {
     	getSelenium().waitForPageToLoad(maxWaitTimeInMs);
     	for (int second = 0;; second++) {
     		if (second >= 60) Assert.fail("timeout");
@@ -377,8 +416,9 @@
     	}
     }
 
-    public void waitForTextPresent(String text) throws InterruptedException
-    {   
+    public void waitForTextPresent( String text )
+        throws InterruptedException
+    {
     	getSelenium().waitForPageToLoad(maxWaitTimeInMs);
     	for (int second = 0;; second++) {
     		if (second >= 60) Assert.fail( "Timeout" );
@@ -386,5 +426,4 @@
     		Thread.sleep(1000);
     	}
     }
-    
 }
\ No newline at end of file

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java?rev=784889&r1=784888&r2=784889&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java
Mon Jun 15 17:56:52 2009
@@ -4,27 +4,27 @@
 
 import org.apache.continuum.web.test.XPathExpressionUtil;
 
-public abstract class AbstractUserRolesManagementTest 
+public abstract class AbstractUserRolesManagementTest
 	extends AbstractContinuumTest
 {
 	protected String username;
 	protected String fullname;
-	
+
 	public String getUserEmail()
 	{
-		String email = p.getProperty("USERROLE_EMAIL");
+		String email = getProperty( "USERROLE_EMAIL" );
 		return email;
 	}
-	
-	public String getUserRolePassword() 
+
+	public String getUserRolePassword()
 	{
-		String password = p.getProperty("USERROLE_PASSWORD");
+		String password = getProperty( "USERROLE_PASSWORD" );
 		return password;
 	}
 
-	public String getUserRoleNewPassword() 
+	public String getUserRoleNewPassword()
 	{
-		String password_new = p.getProperty( "NEW_USERROLE_PASSWORD" );
+		String password_new = getProperty( "NEW_USERROLE_PASSWORD" );
 		return password_new;
 	}
 
@@ -39,19 +39,19 @@
 
         return basedir;
     }
-	
+
 	public String getAdminUsername()
 	{
-		String adminUsername = p.getProperty( "ADMIN_USERNAME" );
+		String adminUsername = getProperty( "ADMIN_USERNAME" );
 		return adminUsername;
 	}
-	
+
 	public String getAdminPassword()
 	{
-		String adminPassword = p.getProperty( "ADMIN_PASSWORD" );
+		String adminPassword = getProperty( "ADMIN_PASSWORD" );
 		return adminPassword;
 	}
-	
+
 	////////////////////////////
 	// Assertions
 	////////////////////////////
@@ -71,7 +71,7 @@
 		assertElementPresent( "user.confirmPassword" );
 		assertButtonWithValuePresent( "Create User" );
 	}
-	
+
 	public void assertUserRolesPage()
 	{
 		assertPage( "[Admin] User Edit" );
@@ -81,29 +81,29 @@
 			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 ) 
+
+    public void assertResourceRolesCheckBoxPresent( String value )
     {
     	getSelenium().isElementPresent( "xpath=//input[@name='addDSelectedRoles' and @value='"
+ value + "']" );
     }
-  
-    public void checkUserRoleWithValue( String 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 ) 
+    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" )
@@ -113,77 +113,77 @@
     		for( String navmenu : arrayNavMenu )
     			assertLinkPresent( navmenu );
     	}
-    	else if( role == "User Administrator" ) 
+    	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" ) 
+    	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" ) 
+    	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" ) 
+    	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" ) 
+    	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" ) 
+    	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" ) 
+    	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" ) 
+    	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" ) 
+    	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" ) 
+    	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" ) 
+    	else if( role == "Continuum Manage Scheduling" )
     	{
     		String navMenu = "About,Show Project Groups,Schedules";
     		String[] arrayNavMenu = navMenu.split( "," );
@@ -195,9 +195,9 @@
     		String navMenu = "About,Show Project Groups,Queues,Users,Roles";
     		String[] arrayNavMenu = navMenu.split( "," );
     		for( String navmenu : arrayNavMenu )
-    			assertLinkPresent( navmenu );		
+    			assertLinkPresent( navmenu );
 	}
-    	else if( role == "Project Developer - Default Project Group" || role == "Project User
- Default Project Group" ) 
+    	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( "," );
@@ -215,7 +215,7 @@
     	}
 
 	}
-	
+
 	public void assertDeleteUserPage( String username )
 	 {
 	        assertPage( "[Admin] User Delete" ); //TODO
@@ -224,11 +224,11 @@
 	        assertTextPresent( "Username: " + username );
 	        assertButtonWithValuePresent( "Delete User" );
 	 }
-	
+
 	/////////////////////////////////////////
 	// User Roles Management
 	/////////////////////////////////////////
-	public void changePassword(String oldPassword, String newPassword) 
+    public void changePassword( String oldPassword, String newPassword )
 	{
 		assertPage( "Change Password" );
 		setFieldValue( "existingPassword", oldPassword );
@@ -236,13 +236,14 @@
 		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 ) 
+
+	private void createUser( String userName, String fullName, String emailAd, String password,
String confirmPassword,
+                             boolean valid )
 	{
 		login( getAdminUsername() , getAdminPassword() );
 		clickLinkWithText( "Users" );
@@ -254,10 +255,10 @@
         setFieldValue( "user.password", password );
         setFieldValue( "user.confirmPassword", confirmPassword );
         submit();
-        
+
         assertUserRolesPage( );
         clickButtonWithValue( "Submit" );
-        
+
         /*if (valid )
         {
         	String[] columnValues = {userName, fullName, emailAd};
@@ -268,13 +269,13 @@
             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" ) )
@@ -284,7 +285,7 @@
 	            submitLoginPage( username, password, false, valid, assertReturnPage );
 	        }
 	    }
-	    
+
 		public void submitLoginPage( String username, String password )
 	    {
 	        submitLoginPage( username, password, false, true, "Login Page" );
@@ -296,7 +297,7 @@
 	    }
 
 	    public void submitLoginPage( String username, String password, boolean rememberMe, boolean
validUsernamePassword,
-	                                 String assertReturnPage )
+                                 String assertReturnPage )
 	    {
 	        assertLoginPage();
 	        setFieldValue( "username", username );
@@ -326,13 +327,13 @@
 	            }
 	        }
 	    }
-	
+
 	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)
+
+	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" );



Mime
View raw message