continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r480084 - in /maven/continuum/trunk/continuum-webapp-test: ./ src/test/it/org/apache/continuum/web/test/
Date Tue, 28 Nov 2006 15:20:03 GMT
Author: evenisse
Date: Tue Nov 28 07:19:59 2006
New Revision: 480084

URL: http://svn.apache.org/viewvc?view=rev&rev=480084
Log:
Add more UI tests

Added:
    maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractAuthenticatedAdminAccessTestCase.java   (with props)
    maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTest.java   (with props)
    maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/MyAccountTest.java   (with props)
    maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/ProjectGroupTest.java   (with props)
    maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/UserGroupTest.java   (with props)
Modified:
    maven/continuum/trunk/continuum-webapp-test/Readme.txt
    maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractContinuumTestCase.java
    maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AccountSecurityTest.java
    maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenOneProjectTestCase.java
    maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTestCase.java
    maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AntTest.java
    maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/LoginTest.java
    maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/SchedulesPageTest.java

Modified: maven/continuum/trunk/continuum-webapp-test/Readme.txt
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/Readme.txt?view=diff&rev=480084&r1=480083&r2=480084
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/Readme.txt (original)
+++ maven/continuum/trunk/continuum-webapp-test/Readme.txt Tue Nov 28 07:19:59 2006
@@ -7,5 +7,11 @@
 Test Continuum with Tomcat 5.x and a specific browser
     'mvn clean install -Ptomcat5x,otherbrowser -DbrowserPath=PATH_TO_YOUR_BROWSER'
 
-Warning: If you specify your own custom browser, it's up to you to configure it correctly. At a minimum, you'll need to configure your browser to use the Selenium Server as a proxy, and disable all browser-specific prompting.
-http://release.openqa.org/selenium-remote-control/nightly/doc/java/com/thoughtworks/selenium/DefaultSelenium.html#DefaultSelenium(java.lang.String,%20int,%20java.lang.String,%20java.lang.String)
\ No newline at end of file
+Test Continuum with Tomcat 5.x and firefox wherein your firefox executable is not in the default installation directory
+    'mvn clean install' or 'mvn clean install -Ptomcat5x,firefox -Dbrowser="*firefox <full path of firefox executable>'
+
+Test Continuum with Tomcat 5.x and Internet Explorer wherein your Internet Explorer executable is not in the default installation directory
+    'mvn clean install' or 'mvn clean install -Ptomcat5x,firefox -Dbrowser="*iexplore <full path of Internet Explorer executable>'
+
+WARNING: If you specify your own custom browser, it's up to you to configure it correctly. At a minimum, you'll need to configure your browser to use the Selenium Server as a proxy, and disable all browser-specific prompting.
+http://release.openqa.org/selenium-remote-control/nightly/doc/java/com/thoughtworks/selenium/DefaultSelenium.html#DefaultSelenium(java.lang.String,%20int,%20java.lang.String,%20java.lang.String)

Added: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractAuthenticatedAdminAccessTestCase.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractAuthenticatedAdminAccessTestCase.java?view=auto&rev=480084
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractAuthenticatedAdminAccessTestCase.java (added)
+++ maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractAuthenticatedAdminAccessTestCase.java Tue Nov 28 07:19:59 2006
@@ -0,0 +1,43 @@
+/**
+ *
+ */
+package org.apache.continuum.web.test;
+
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ *
+ */
+public abstract class AbstractAuthenticatedAdminAccessTestCase
+    extends AbstractAuthenticatedAccessTestCase
+{
+    /**
+     * @see org.apache.continuum.web.test.AbstractAuthenticatedAccessTestCase#getPassword()
+     */
+    public String getPassword()
+    {
+        return adminPassword;
+    }
+
+    /**
+     * @see org.apache.continuum.web.test.AbstractAuthenticatedAccessTestCase#getUsername()
+     */
+    public String getUsername()
+    {
+        return adminUsername;
+    }
+}

Propchange: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractAuthenticatedAdminAccessTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractAuthenticatedAdminAccessTestCase.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractContinuumTestCase.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractContinuumTestCase.java?view=diff&rev=480084&r1=480083&r2=480084
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractContinuumTestCase.java (original)
+++ maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractContinuumTestCase.java Tue Nov 28 07:19:59 2006
@@ -33,15 +33,40 @@
 
     protected String adminEmail = "admin@localhost.localdomain.com";
 
-    private String baseUrl = "http://localhost:9595/continuum";
+    private String baseUrl = "http://localhost:9595";
+
+    public final static String DEFAULT_PROJ_GRP_NAME = "Default Project Group";
+
+    public final static String DEFAULT_PROJ_GRP_ID = "default";
+
+    public final static String DEFAULT_PROJ_GRP_DESCRIPTION =
+        "Contains all projects that do not have a group of their own";
+
+    public final static String TEST_PROJ_GRP_NAME = "Test Project Group Name";
+
+    public final static String TEST_PROJ_GRP_ID = "Test Project Group Id";
+
+    public final static String TEST_PROJ_GRP_DESCRIPTION = "Test Project Group Description";
+
+    public final static String TEST_POM_URL = "http://svn.apache.org/repos/asf/maven/pom/trunk/maven/pom.xml";
+
+    public final static String TEST_POM_USERNAME = "dummy";
+
+    public final static String TEST_POM_PASSWORD = "dummy";
+
+    private final static int ONE_SECOND = 1000;
+
+    private final static int ONE_MINUTE = 60 * ONE_SECOND;
+
+    private final static int LONG_WAIT = 5 * ONE_MINUTE;
 
     /**
      * We create an admin user if it doesn't exist
      */
     protected void initialize()
     {
+        getSelenium().setTimeout( String.valueOf( 5 * ONE_MINUTE ) );
         open( "/continuum" );
-        waitPage();
 
         if ( "Create Admin User".equals( getTitle() ) )
         {
@@ -51,10 +76,33 @@
             submitLoginPage( adminUsername, adminPassword );
             assertEditConfigurationPage();
             submitConfigurationPage( baseUrl, null, null, null );
-            logout();
+
+            try
+            {
+                addMavenTwoProject( TEST_POM_URL, TEST_POM_USERNAME, TEST_POM_PASSWORD, DEFAULT_PROJ_GRP_NAME );
+                removeProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION );
+                addProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION );
+
+                addProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
+                addMavenTwoProject( TEST_POM_URL, TEST_POM_USERNAME, TEST_POM_PASSWORD, TEST_PROJ_GRP_NAME );
+                removeProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
+            }
+            catch ( Exception e )
+            {
+                e.printStackTrace();
+            }
+
+            // logout with a longer delay
+            assertTrue( "User wasn't authenticated.", isAuthenticated() );
+            clickLinkWithText( "Logout", false );
+            waitPage( LONG_WAIT );
+            assertFalse( "The user is always authenticated after a logout.", isAuthenticated() );
         }
     }
 
+    //////////////////////////////////////
+    // Overriden AbstractSeleniumTestCase methods
+    //////////////////////////////////////
     protected String getApplicationName()
     {
         return "Continuum";
@@ -180,13 +228,28 @@
         assertAddProjectPage( "shell" );
     }
 
+    public void assertAddAdminUserListPage()
+        throws Exception
+    {
+        assertPage( "[Admin] User List" );
+    }
+
     //////////////////////////////////////
-    // Group Summary
+    // Project Groups
     //////////////////////////////////////
-    public void assertGroupSummaryPage()
+    public void goToProjectGroupsSummaryPage()
+        throws Exception
+    {
+        clickLinkWithText( "Show Project Groups" );
+
+        assertProjectGroupsSummaryPage();
+    }
+
+    public void assertProjectGroupsSummaryPage()
     {
         assertPage( "Continuum - Group Summary" );
         assertTextPresent( "Project Groups" );
+
         if ( isTextPresent( "No Project Groups Known." ) )
         {
             assertTextNotPresent( "Name" );
@@ -201,5 +264,242 @@
             assertTextPresent( "Projects" );
             assertTextPresent( "Build Status" );
         }
+
+        assertLinkPresent( "Add a Project Group" );
+    }
+
+    //////////////////////////////////////
+    // Project Group
+    //////////////////////////////////////
+    public void showProjectGroup( String name, String groupId, String description )
+        throws Exception
+    {
+        goToProjectGroupsSummaryPage();
+
+        // Checks the link to the created Project Group
+        assertLinkPresent( name );
+        clickLinkWithText( name );
+
+        assertProjectGroupSummaryPage( name, groupId, description);
+    }
+
+    public void assertProjectGroupSummaryPage( String name, String groupId, String description )
+    {
+        assertTextPresent( "Project Group Name" );
+        assertTextPresent( name );
+        assertTextPresent( "Group Id" );
+        assertTextPresent( groupId );
+        assertTextPresent( "Description" );
+        assertTextPresent( description );
+
+        // Assert the available Project Group Actions
+        assertTextPresent( "Project Group Actions" );
+        assertElementPresent( "build" );
+        assertElementPresent( "edit" );
+        assertElementPresent( "remove" );
+
+        if ( isTextPresent( "Projects" ) )
+        {
+            assertTextPresent( "Project Name" );
+            assertTextPresent( "Version" );
+            assertTextPresent( "Build" );
+        }
+
+        assertLinkPresent( "Add Maven 2.0+ Project" );
+
+        //TODO: Add these links in the page
+        //assertLinkPresent( "Add Maven 1.x Project");
+        //assertLinkPresent( "Add Ant Project");
+        //assertLinkPresent( "Add Shell Project");
+    }
+
+    public void addProjectGroup( String name, String groupId, String description )
+        throws Exception
+    {
+        goToProjectGroupsSummaryPage();
+
+        // Go to Add Project Group Page
+        assertLinkPresent( "Add a Project Group" );
+        clickLinkWithText( "Add a Project Group" );
+        assertAddProjectGroupPage();
+
+        // Enter values into Add Project Group fields, and submit  
+        setFieldValue( "name", name );
+        setFieldValue( "groupId", groupId );
+        setFieldValue( "description", description );
+
+        submit();
+        waitPage();
+
+    }
+
+    public void assertAddProjectGroupPage()
+    {
+        assertPage( "Continuum - Add Continuum Project Group" );
+
+        assertTextPresent( "Add Continuum Project Group" );
+        assertTextPresent( "Project Group Name" );
+        assertElementPresent( "name" );
+        assertTextPresent( "Project Group Id" );
+        assertElementPresent( "groupId" );
+        assertTextPresent( "Description" );
+        assertElementPresent( "description" );
+    }
+
+    public void removeProjectGroup( String name, String groupId, String description )
+        throws Exception
+    {
+        showProjectGroup( name, groupId, description );
+
+        // Remove
+        clickSubmitWithLocator( "remove" );
+
+        // Assert Confirmation
+        assertElementPresent( "removeProjectGroup_0" );
+        assertElementPresent( "Cancel" );
+
+        // Confirm Project Group deletion
+        clickSubmitWithLocator( "removeProjectGroup_0" );
+
+    }
+
+    //////////////////////////////////////
+    // Maven 2.0.x Project
+    //////////////////////////////////////
+    public void goToAddMavenProjectPage()
+        throws Exception
+    {
+        clickLinkWithText( "Maven 2.0.x Project" );
+
+        assertAddMavenTwoProjectPage();
+    }
+
+    public void assertAddMavenTwoProjectPage()
+        throws Exception
+    {
+        assertTextPresent( "POM Url" );
+        assertElementPresent( "m2PomUrl" );
+        assertTextPresent( "Username" );
+        assertElementPresent( "username" );
+        assertTextPresent( "Password" );
+        assertElementPresent( "password" );
+        assertTextPresent( "Upload POM" );
+        assertElementPresent( "m2PomFile" );
+        assertTextPresent( "Project Group" );
+        assertElementPresent( "selectedProjectGroup" );
+    }
+
+    public void addMavenTwoProject( String pomUrl, String username, String password, String projectGroup )
+        throws Exception
+    {
+        goToAddMavenProjectPage();
+
+        // Enter values into Add Maven Two Project fields, and submit  
+        setFieldValue( "m2PomUrl", pomUrl );
+        setFieldValue( "username", username );
+        setFieldValue( "password", password );
+
+        if ( projectGroup != null )
+        {
+            selectValue( "addMavenTwoProject_selectedProjectGroup", projectGroup );
+        }
+
+        submit();
+    }
+
+    public void moveProjectToProjectGroup( String name, String groupId, String description, String newProjectGroup )
+        throws Exception
+    {
+        showProjectGroup( name, groupId, description );
+
+        assertElementPresent( "edit" );
+        clickButtonWithValue( "Edit" );
+
+        assertTextPresent( "Move to Group" );
+        selectValue( "//select", newProjectGroup );
+
+        assertElementPresent( "saveProjectGroup_0" );
+        clickButtonWithValue( "Save" );
+    }
+
+    //////////////////////////////////////
+    // My Account
+    //////////////////////////////////////
+    public void goToMyAccount()
+    {
+        clickLinkWithText( "Edit user info" );
+    }
+
+    public void assertMyAccountDetails( String username, String newFullName, String newEmailAddress )
+        throws Exception
+    {
+        assertPage( "Account Details" );
+
+        isTextPresent( "Username" );
+        assertTextPresent( "Username" );
+        assertElementPresent( "registerForm_user_username" );
+        assertCellValueFromTable( username, "//form/table", 0, 1 );
+
+        assertTextPresent( "Full Name" );
+        assertElementPresent( "user.fullName" );
+        assertEquals( newFullName, getFieldValue( "user.fullName" ) );
+
+        assertTextPresent( "Email Address" );
+        assertElementPresent( "user.email" );
+        assertEquals( newEmailAddress, getFieldValue( "user.email" ) );
+
+        assertTextPresent( "Password" );
+        assertElementPresent( "user.password" );
+
+        assertTextPresent( "Confirm Password" );
+        assertElementPresent( "user.confirmPassword" );
+
+        assertTextPresent( "Last Password Change" );
+        assertElementPresent( "registerForm_user_timestampLastPasswordChange" );
+
+    }
+
+    public void editMyUserInfo( String newFullName, String newEmailAddress, String newPassword,
+                                String confirmNewPassword )
+    {
+        goToMyAccount();
+
+        setFieldValue( "user.fullName", newFullName );
+        setFieldValue( "user.email", newEmailAddress );
+        setFieldValue( "user.password", newPassword );
+        setFieldValue( "user.confirmPassword", confirmNewPassword );
+    }
+
+    //////////////////////////////////////
+    // Login
+    //////////////////////////////////////
+    public void goToLoginPage()
+    {
+        clickLinkWithText( "Login" );
+    }
+
+    public void tearDown()
+    {
+        try
+        {
+            goToProjectGroupsSummaryPage();
+
+            if ( isLinkPresent( TEST_PROJ_GRP_NAME ) )
+            {
+                removeProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
+            }
+            if ( isLinkPresent( DEFAULT_PROJ_GRP_NAME ) &&
+                "0".equals( getCellValueFromTable( "ec_table", 1, 2 ) ) == false )
+            {
+                removeProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION );
+                addProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION );
+            }
+        }
+        catch ( Exception e )
+        {
+            e.printStackTrace();
+        }
+
+        super.tearDown();
     }
 }

Modified: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AccountSecurityTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AccountSecurityTest.java?view=diff&rev=480084&r1=480083&r2=480084
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AccountSecurityTest.java (original)
+++ maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AccountSecurityTest.java Tue Nov 28 07:19:59 2006
@@ -1,177 +1,193 @@
 package org.apache.continuum.web.test;
 
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
 import org.apache.maven.shared.web.test.XPathExpressionUtil;
 
 public class AccountSecurityTest
     extends AbstractAuthenticatedAccessTestCase
 {
     // create user fields
-    final static public String CREATE_FORM_USERNAME_FIELD = "userCreateForm_user_username";    
-    
+    final static public String CREATE_FORM_USERNAME_FIELD = "userCreateForm_user_username";
+
     final static public String CREATE_FORM_FULLNAME_FIELD = "userCreateForm_user_fullName";
-    
+
     final static public String CREATE_FORM_EMAILADD_FIELD = "userCreateForm_user_email";
-    
+
     final static public String CREATE_FORM_PASSWORD_FIELD = "userCreateForm_user_password";
-    
+
     final static public String CREATE_FORM_CONFIRM_PASSWORD_FIELD = "userCreateForm_user_confirmPassword";
-    
+
     final static public String PASSWORD_FIELD = "user.password";
-    
+
     final static public String CONFIRM_PASSWORD_FIELD = "user.confirmPassword";
-        
+
     // user account 1
     final static public String CUSTOM_USERNAME = "custom";
-    
+
     final static public String CUSTOM_USERNAME2 = "custom2";
-    
+
     final static public String CUSTOM_USERNAME3 = "custom3";
-    
+
     final static public String CUSTOM_USERNAME4 = "custom4";
-    
+
     final static public String CUSTOM_FULLNAME = "custom fullname";
-    
+
     final static public String CUSTOM_EMAILADD = "custom@custom.com";
-    
+
     final static public String CUSTOM_PASSWORD = "custompassword";
-            
+
     public void setUp()
         throws Exception
     {
-        super.setUp();        
+        super.setUp();
     }
-             
+
     public String getUsername()
     {
         return super.adminUsername;
     }
-    
+
     public String getPassword()
     {
         return super.adminPassword;
-    }    
+    }
 
     public void testBasicUserAddDelete()
-    {                       
+    {
         createUser( CUSTOM_USERNAME, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true );
-                
+
         // delete custom user
-        deleteUser( CUSTOM_USERNAME, CUSTOM_FULLNAME, CUSTOM_EMAILADD );        
+        deleteUser( CUSTOM_USERNAME, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
         super.logout();
     }
-    
+
     public void testPasswordConfirmation()
         throws Exception
-    {                        
+    {
         // initial user account creation ignores the password creation checks
         createUser( CUSTOM_USERNAME2, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true );
         super.logout();
-        
+
         // start password creation validation test
         super.login( CUSTOM_USERNAME2, CUSTOM_PASSWORD );
-                
+
         // select profile
         clickLinkWithText( CUSTOM_USERNAME2 );
-        
+
         //TODO: verify account details page
         assertPage( "Account Details" );
-        
+
         // test password confirmation
         setFieldValue( PASSWORD_FIELD, CUSTOM_PASSWORD );
         setFieldValue( CONFIRM_PASSWORD_FIELD, CUSTOM_PASSWORD + "error" );
         clickButtonWithValue( "Submit" );
-        
+
         // we should still be in Account Details
         assertPage( "Account Details" );
         isTextPresent( "Password confirmation failed.  Passwords do not match" );
-        
+
         super.logout();
-                
+
         // house keeping
         super.login( super.adminUsername, super.adminPassword );
-        deleteUser( CUSTOM_USERNAME2, CUSTOM_FULLNAME, CUSTOM_EMAILADD );        
+        deleteUser( CUSTOM_USERNAME2, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
         super.logout();
-    }    
+    }
 
     public void testPasswordCreationValidation()
         throws Exception
-    {                        
+    {
         // initial user account creation ignores the password creation checks
-        createUser( CUSTOM_USERNAME3, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true );    
+        createUser( CUSTOM_USERNAME3, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true );
         super.logout();
-        
+
         // start password creation validation test
         super.login( CUSTOM_USERNAME3, CUSTOM_PASSWORD );
-        
+
         // password test
         String alphaTest = "abcdef";
         String numericalTest = "123456";
-        String characterLengthTest = "aaa12";
+        String characterLengthTest = "aaaaaaa12";
         String validPassword = "abc123";
-        
+
         // select profile
         clickLinkWithText( CUSTOM_USERNAME3 );
-        
+
         //TODO: verify account details page
         assertPage( "Account Details" );
-        
+
         // test all alpha
         setFieldValue( PASSWORD_FIELD, alphaTest );
         setFieldValue( CONFIRM_PASSWORD_FIELD, alphaTest );
         clickButtonWithValue( "Submit" );
-        
+
         // we should still be in Account Details
         assertPage( "Account Details" );
         isTextPresent( "You must provide a password containing at least 1 numeric character(s)." );
-        
+
         setFieldValue( PASSWORD_FIELD, numericalTest );
-        setFieldValue( CONFIRM_PASSWORD_FIELD, numericalTest );                
+        setFieldValue( CONFIRM_PASSWORD_FIELD, numericalTest );
         clickButtonWithValue( "Submit" );
-        
+
         // we should still be in Account Details
         assertPage( "Account Details" );
         isTextPresent( "You must provide a password containing at least 1 alphabetic character(s)." );
 
         setFieldValue( PASSWORD_FIELD, characterLengthTest );
-        setFieldValue( CONFIRM_PASSWORD_FIELD, characterLengthTest );                
+        setFieldValue( CONFIRM_PASSWORD_FIELD, characterLengthTest );
         clickButtonWithValue( "Submit" );
-        
+
         // we should still be in Account Details
         assertPage( "Account Details" );
-        isTextPresent( "You must provide a password between 6 and 10 characters in length." );
-        
+        isTextPresent( "You must provide a password between 1 and 8 characters in length." );
+
         // we should still be in Account Details
         assertPage( "Account Details" );
         isTextPresent( "You must provide a password containing at least 1 alphabetic character(s)." );
 
         setFieldValue( PASSWORD_FIELD, validPassword );
-        setFieldValue( CONFIRM_PASSWORD_FIELD, validPassword );                
+        setFieldValue( CONFIRM_PASSWORD_FIELD, validPassword );
         clickButtonWithValue( "Submit" );
-        
+
         // we should still be in Account Details
-        assertPage( "Continuum - Group Summary" );  
-        
+        assertPage( "Continuum - Group Summary" );
+
         super.logout();
-        
+
         // house keeping
         super.login( super.adminUsername, super.adminPassword );
-        deleteUser( CUSTOM_USERNAME3, CUSTOM_FULLNAME, CUSTOM_EMAILADD );        
+        deleteUser( CUSTOM_USERNAME3, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
         super.logout();
-    }    
-    
-    
+    }
+
+
     public void testThreeStrikeRule()
         throws Exception
-    {        
+    {
         createUser( CUSTOM_USERNAME4, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true );
         super.logout();
 
         int numberOfTries = 3;
-        
-        for ( int nIndex=0; nIndex < numberOfTries; nIndex++ )
-        {    
+
+        for ( int nIndex = 0; nIndex < numberOfTries; nIndex++ )
+        {
             if ( nIndex < 2 )
-            {    
+            {
                 super.login( this.CUSTOM_USERNAME4, this.CUSTOM_PASSWORD + "error", false, "Login Page" );
                 // login should fail
                 assertTextPresent( "You have entered an incorrect username and/or password" );
@@ -180,28 +196,29 @@
             else
             {
                 // on the 3rd try, account is locked and we are returned to the Group Summary Page
-                super.login( this.CUSTOM_USERNAME4, this.CUSTOM_PASSWORD + "error", false, "Continuum - Group Summary" );
+                super.login( this.CUSTOM_USERNAME4, this.CUSTOM_PASSWORD + "error", false,
+                             "Continuum - Group Summary" );
                 assertTextPresent( "Account Locked" );
-            }            
-        }            
-                        
+            }
+        }
+
         // house keeping
         super.login( super.adminUsername, super.adminPassword );
         deleteUser( CUSTOM_USERNAME4, CUSTOM_FULLNAME, CUSTOM_EMAILADD, false, true );
         super.logout();
     }
-        
-    private void createUser ( String userName, String fullName, String emailAdd, String password, boolean valid )
+
+    private void createUser( String userName, String fullName, String emailAdd, String password, boolean valid )
     {
         createUser( userName, fullName, emailAdd, password, password, valid );
     }
-    
-    private void createUser( String userName, String fullName, String emailAdd, String password, 
-                             String confirmPassword, boolean valid )
+
+    private void createUser( String userName, String fullName, String emailAdd, String password, String confirmPassword,
+                             boolean valid )
     {
         clickLinkWithText( "Users" );
         assertPage( "[Admin] User List" );
-        
+
         // create user
         // submit button : Create Users
         clickLinkWithText( "Create User" );
@@ -209,44 +226,46 @@
         getSelenium().type( CREATE_FORM_FULLNAME_FIELD, fullName );
         getSelenium().type( CREATE_FORM_EMAILADD_FIELD, emailAdd );
         getSelenium().type( CREATE_FORM_PASSWORD_FIELD, password );
-        getSelenium().type( CREATE_FORM_CONFIRM_PASSWORD_FIELD, confirmPassword );        
+        getSelenium().type( CREATE_FORM_CONFIRM_PASSWORD_FIELD, confirmPassword );
         submit();
-        
+
         if ( valid )
-        {            
+        {
             assertPage( "[Admin] User List" );
-            
-            String[] columnValues = { userName, fullName, emailAdd, "false", "false" };        
-            
+
+            String[] columnValues = {userName, fullName, emailAdd, "false", "false"};
+
             // check if custom user is created
-            assertElementPresent( XPathExpressionUtil.getTableRow( columnValues ) );            
-        }                
+            assertElementPresent( XPathExpressionUtil.getTableRow( columnValues ) );
+        }
     }
-    
+
     private void deleteUser( String userName, String fullName, String emailAdd )
     {
         deleteUser( userName, fullName, emailAdd, false, false );
     }
-    
+
     private void deleteUser( String userName, String fullName, String emailAdd, boolean validated, boolean locked )
-    {        
-        String[] columnValues = { userName, fullName, emailAdd, Boolean.toString( validated ), Boolean.toString( locked ) };
-        
+    {
+        String[] columnValues =
+            {userName, fullName, emailAdd, Boolean.toString( validated ), Boolean.toString( locked )};
+
         clickLinkWithText( "Users" );
-        
+
         // delete user
-        clickLinkWithXPath( XPathExpressionUtil.getColumnElement( XPathExpressionUtil.ANCHOR, 7, "Delete", columnValues ) );
-        
+        clickLinkWithXPath(
+            XPathExpressionUtil.getColumnElement( XPathExpressionUtil.ANCHOR, 7, "Delete", columnValues ) );
+
         // confirm
-        assertPage ( "[Admin] User Delete" );
+        assertPage( "[Admin] User Delete" );
         super.submit();
-        
+
         // check if account is successfuly deleted
-        super.assertElementNotPresent( XPathExpressionUtil.getTableRow( columnValues ) );    
+        super.assertElementNotPresent( XPathExpressionUtil.getTableRow( columnValues ) );
     }
-    
+
     public void tearDown()
-    {        
+    {
         super.tearDown();
-    }    
+    }
 }

Modified: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenOneProjectTestCase.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenOneProjectTestCase.java?view=diff&rev=480084&r1=480083&r2=480084
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenOneProjectTestCase.java (original)
+++ maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenOneProjectTestCase.java Tue Nov 28 07:19:59 2006
@@ -1,7 +1,7 @@
 package org.apache.continuum.web.test;
 
 /*
- * Copyright 2006 The Apache Software Foundation.
+ * Copyright 2005-2006 The Apache Software Foundation.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.

Added: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTest.java?view=auto&rev=480084
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTest.java (added)
+++ maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTest.java Tue Nov 28 07:19:59 2006
@@ -0,0 +1,42 @@
+package org.apache.continuum.web.test;
+
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+public class AddMavenTwoProjectTest
+    extends AbstractAuthenticatedAdminAccessTestCase
+{
+    public void testAddMavenTwoProjectFromRemoteSource()
+        throws Exception
+    {
+        // Enter values into Add Maven Two Project fields, and submit
+        addMavenTwoProject( TEST_POM_URL, TEST_POM_USERNAME, TEST_POM_PASSWORD, null );
+
+        assertProjectGroupsSummaryPage();
+
+        clickLinkWithText( DEFAULT_PROJ_GRP_NAME );
+    }
+
+    public void testAddMavenTwoProjectFromRemoteSourceToNonDefaultProjectGroup()
+        throws Exception
+    {
+        addProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
+
+        addMavenTwoProject( TEST_POM_URL, TEST_POM_USERNAME, TEST_POM_PASSWORD, TEST_PROJ_GRP_NAME );
+
+        assertCellValueFromTable( "1", "ec_table", 2, 2 );
+    }
+}

Propchange: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTestCase.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTestCase.java?view=diff&rev=480084&r1=480083&r2=480084
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTestCase.java (original)
+++ maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTestCase.java Tue Nov 28 07:19:59 2006
@@ -1,14 +1,23 @@
 package org.apache.continuum.web.test;
 
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
 import java.io.File;
 
-/**
- * Created by IntelliJ IDEA.
- * User: deng
- * Date: Nov 7, 2006
- * Time: 10:03:06 AM
- * To change this template use File | Settings | File Templates.
- */
 public class AddMavenTwoProjectTestCase
     extends AbstractAuthenticatedAccessTestCase
 {
@@ -53,25 +62,6 @@
     }
 
     /**
-     * Test multi module projects
-     */
-    public void testMultiModuleProject()
-    {
-        File pomFile =
-            new File( getBasedir(), "src/test/resources/unit/maven-two-projects/multi-module-maven-project/pom.xml" );
-        submitAddMavenTwoProjectPage( "file:/" + pomFile.getAbsolutePath(), "", true );
-        assertTextPresent( "Maven Two Multi-Module Project" );
-        assertTextPresent( "maven.two.multi.module.project" );
-
-        clickLinkWithText( "Maven Two Multi-Module Project" );
-        assertTextPresent( "Summary" );
-        assertTextPresent( "Summary" );
-        assertTextPresent( "Maven Two Multi-Module Project" );
-        assertTextPresent( "Maven Two Multi-Module Project Module 1" );
-        assertTextPresent( "Maven Two Multi-Module Project Module 2" );
-    }
-
-    /**
      * Test invalid pom url
      */
     public void testNoPomSpecified()
@@ -135,27 +125,6 @@
     }
 
     /**
-     * Test when notifier(s) are specified in the pom
-     */
-    public void testNotifiers()
-    {
-        File pomFile =
-            new File( getBasedir(), "src/test/resources/unit/maven-two-projects/specified-notifiers-pom.xml" );
-        submitAddMavenTwoProjectPage( "file:/" + pomFile.getAbsolutePath(), "", true );
-        assertTextPresent( "Maven Two Notifiers Project" );
-
-        clickLinkWithText( "Maven Two Notifiers Project" );
-        clickLinkWithText( "Notifiers" );
-
-        assertTextPresent( "Project Group Notifiers" );
-        assertTextPresent( "mail" );
-        assertTextPresent( "Error" );
-        assertTextPresent( "Fail" );
-        assertTextPresent( "Success" );
-        assertTextNotPresent( "Warning" );
-    }
-
-    /**
      * Test when the modules/subprojects specified in the pom are not found
      */
     public void testMissingModules()
@@ -166,16 +135,4 @@
         assertElementPresent( "m2PomUrl" );
         assertElementPresent( "m2PomFile" );
     }
-
-    /**
-     * Test valid pom
-     */
-    public void testValidPom()
-    {
-        File pomFile = new File( getBasedir(), "src/test/resources/unit/maven-two-projects/valid-pom.xml" );
-        submitAddMavenTwoProjectPage( "file:/" + pomFile.getAbsolutePath(), "", true );
-        assertTextPresent( "Maven Two Project" );
-        assertTextPresent( "maven.two.project" );
-    }
-
 }

Modified: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AntTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AntTest.java?view=diff&rev=480084&r1=480083&r2=480084
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AntTest.java (original)
+++ maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AntTest.java Tue Nov 28 07:19:59 2006
@@ -21,19 +21,10 @@
  * @version $Id$
  */
 public class AntTest
-    extends AbstractAuthenticatedAccessTestCase
+    extends AbstractAuthenticatedAdminAccessTestCase
 {
-    public String getUsername()
-    {
-        return adminUsername;
-    }
-
-    public String getPassword()
-    {
-        return adminPassword;
-    }
-
     public void testAddAntProject()
+        throws Exception
     {
         goToAddAntPage();
         setFieldValue( "projectName", "Foo" );
@@ -41,7 +32,8 @@
         setFieldValue( "projectScmUrl",
                        "https://svn.apache.org/repos/asf/maven/continuum/trunk/continuum-test-projects/ant/" );
         clickButtonWithValue( "Add" );
-        assertGroupSummaryPage();
+
+        assertProjectGroupsSummaryPage();
         assertTextPresent( "Default Project Group" );
         clickLinkWithText( "Default Project Group" );
         assertTextPresent( "Foo" );
@@ -88,4 +80,5 @@
         clickLinkWithText( "Ant Project" );
         assertAddAntProjectPage();
     }
+
 }

Modified: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/LoginTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/LoginTest.java?view=diff&rev=480084&r1=480083&r2=480084
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/LoginTest.java (original)
+++ maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/LoginTest.java Tue Nov 28 07:19:59 2006
@@ -35,14 +35,14 @@
     {
         submitLoginPage( "badUsername", "badPassword", false );
         assertLoginPage();
-        assertTextPresent( "Authentication failed" );
+        assertTextPresent( "You have entered an incorrect username and/or password" );
     }
 
     public void testWithBadPassword()
     {
         submitLoginPage( adminUsername, "badPassword", false );
         assertLoginPage();
-        assertTextPresent( "Authentication failed" );
+        assertTextPresent( "You have entered an incorrect username and/or password" );
     }
 
     public void testWithEmptyUsername()
@@ -56,7 +56,7 @@
     {
         submitLoginPage( adminUsername, "", false );
         assertLoginPage();
-        assertTextPresent( "Authentication failed" );
+        assertTextPresent( "You have entered an incorrect username and/or password" );
     }
 
     public void testWithCorrectUsernamePassword()
@@ -64,4 +64,5 @@
         submitLoginPage( adminUsername, adminPassword );
         logout();
     }
+
 }

Added: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/MyAccountTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/MyAccountTest.java?view=auto&rev=480084
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/MyAccountTest.java (added)
+++ maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/MyAccountTest.java Tue Nov 28 07:19:59 2006
@@ -0,0 +1,53 @@
+package org.apache.continuum.web.test;
+
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * Test update or edit account of the current user.
+ */
+public class MyAccountTest
+    extends AbstractAuthenticatedAdminAccessTestCase
+{
+    public void setUp()
+        throws Exception
+    {
+        super.setUp();
+    }
+
+    public void testMyAccountEdit()
+        throws Exception
+    {
+        String newFullName = "Continuum Admin _ new";
+        String newEmail = "admin_new@localhost.localdomain.com";
+        String newPassword = "admin1_new";
+        String newConfirmationPassword = newPassword;
+
+        goToMyAccount();
+
+        // check current account details
+        assertMyAccountDetails( adminUsername, adminFullName, adminEmail );
+
+        // change account details
+        editMyUserInfo( newFullName, newEmail, newPassword, newConfirmationPassword );
+        assertMyAccountDetails( adminUsername, newFullName, newEmail );
+
+        // revert to original account details
+        editMyUserInfo( adminFullName, adminEmail, adminPassword, adminPassword );
+        assertMyAccountDetails( adminUsername, adminFullName, adminEmail );
+    }
+
+}

Propchange: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/MyAccountTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/MyAccountTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/ProjectGroupTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/ProjectGroupTest.java?view=auto&rev=480084
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/ProjectGroupTest.java (added)
+++ maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/ProjectGroupTest.java Tue Nov 28 07:19:59 2006
@@ -0,0 +1,88 @@
+package org.apache.continuum.web.test;
+
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * Test case for project groups.
+ */
+public class ProjectGroupTest
+    extends AbstractAuthenticatedAdminAccessTestCase
+{
+    public void testAddRemoveProjectGroup()
+        throws Exception
+    {
+        addProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
+
+        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
+
+        removeProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
+    }
+
+    public void testDefaultBuildDefinition()
+        throws Exception
+    {
+        goToProjectGroupsSummaryPage();
+
+        showProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION );
+
+        assertLinkPresent( "Build Definitions" );
+        clickLinkWithText( "Build Definitions" );
+
+        String tableElement = "ec_table";
+        assertCellValueFromTable( "Goals", tableElement, 0, 0 );
+        assertCellValueFromTable( "Arguments", tableElement, 0, 1 );
+        assertCellValueFromTable( "Build File", tableElement, 0, 2 );
+        assertCellValueFromTable( "Profile", tableElement, 0, 3 );
+        assertCellValueFromTable( "schedule", tableElement, 0, 4 );
+        assertCellValueFromTable( "From", tableElement, 0, 5 );
+        assertCellValueFromTable( "Default", tableElement, 0, 6 );
+        assertCellValueFromTable( "", tableElement, 0, 7 );
+        assertCellValueFromTable( "", tableElement, 0, 8 );
+
+        assertCellValueFromTable( "clean install", tableElement, 1, 0 );
+        assertCellValueFromTable( "--batch-mode --non-recursive", tableElement, 1, 1 );
+        assertCellValueFromTable( "pom.xml", tableElement, 1, 2 );
+        assertCellValueFromTable( "", tableElement, 1, 3 );
+        assertCellValueFromTable( "DEFAULT_SCHEDULE", tableElement, 1, 4 );
+        assertCellValueFromTable( "GROUP", tableElement, 1, 5 );
+        assertCellValueFromTable( "true", tableElement, 1, 6 );
+        assertImgWithAlt( "Edit" );
+        assertImgWithAlt( "Delete" );
+    }
+
+    public void testMoveProject()
+        throws Exception
+    {
+        // Add a project group and a project to it
+        addProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
+        addMavenTwoProject( TEST_POM_URL, TEST_POM_USERNAME, TEST_POM_PASSWORD, TEST_PROJ_GRP_NAME );
+
+        // assert that the default project group has 0 projects while the test project group has 1
+        assertCellValueFromTable( "0", "ec_table", 1, 2 );
+        assertCellValueFromTable( "1", "ec_table", 2, 2 );
+
+        // move the project of the test project group to the default project group
+        moveProjectToProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION,
+                                   DEFAULT_PROJ_GRP_NAME );
+
+        // assert that the default project group now has 1 while the test project group has 0
+        goToProjectGroupsSummaryPage();
+        assertCellValueFromTable( "1", "ec_table", 1, 2 );
+        assertCellValueFromTable( "0", "ec_table", 2, 2 );
+    }
+
+}

Propchange: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/ProjectGroupTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/ProjectGroupTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/SchedulesPageTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/SchedulesPageTest.java?view=diff&rev=480084&r1=480083&r2=480084
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/SchedulesPageTest.java (original)
+++ maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/SchedulesPageTest.java Tue Nov 28 07:19:59 2006
@@ -164,8 +164,8 @@
         String[] columnValues = {SCHEDULE_NAME, SCHEDULE_DESCRIPTION, DELAY, cronSchedule, MAXJOBEXECUTIONTIME};
 
         // edit the schedule        
-        clickLinkWithXPath( XPathExpressionUtil.getColumnElement( XPathExpressionUtil.ANCHOR, 5,
-                                                                                      "Edit", columnValues ) );
+        clickLinkWithXPath(
+            XPathExpressionUtil.getColumnElement( XPathExpressionUtil.ANCHOR, 5, "Edit", columnValues ) );
 
         inputSchedule( SCHEDULE_NAME_EDIT + "modified", SCHEDULE_DESCRIPTION + "updated", "2", "3", "4", "?", "6", "7",
                        "2021", "8", "9", false );
@@ -175,12 +175,12 @@
         String[] editedColumnValues =
             {SCHEDULE_NAME_EDIT + "modified", SCHEDULE_DESCRIPTION + "updated", "9", cronSchedule, "8"};
 
-        assertTrue( "Can not edit schedule", getSelenium().isElementPresent(
-            XPathExpressionUtil.getTableRow( editedColumnValues ) ) );
+        assertTrue( "Can not edit schedule",
+                    getSelenium().isElementPresent( XPathExpressionUtil.getTableRow( editedColumnValues ) ) );
 
         // check if the active state has been saved
-        clickLinkWithXPath( XPathExpressionUtil.getColumnElement( XPathExpressionUtil.ANCHOR, 5,
-                                                                                      "Edit", editedColumnValues ) );
+        clickLinkWithXPath(
+            XPathExpressionUtil.getColumnElement( XPathExpressionUtil.ANCHOR, 5, "Edit", editedColumnValues ) );
 
         assertEquals( "Can disable the schedule", CHECKBOX_UNCHECK, getFieldValue( "active" ) );
 
@@ -298,8 +298,8 @@
 
         String[] columnValues = {scheduleName};
 
-        clickLinkWithXPath( XPathExpressionUtil.getColumnElement( XPathExpressionUtil.ANCHOR, 5,
-                                                                                      "Delete", columnValues ) );
+        clickLinkWithXPath(
+            XPathExpressionUtil.getColumnElement( XPathExpressionUtil.ANCHOR, 5, "Delete", columnValues ) );
 
         // deletion confirmation page
         assertPage( "Schedule Removal" );

Added: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/UserGroupTest.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/UserGroupTest.java?view=auto&rev=480084
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/UserGroupTest.java (added)
+++ maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/UserGroupTest.java Tue Nov 28 07:19:59 2006
@@ -0,0 +1,54 @@
+package org.apache.continuum.web.test;
+
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+/**
+ * Test case for User group.
+ */
+public class UserGroupTest
+    extends AbstractAuthenticatedAdminAccessTestCase
+{
+    public void testUserGroup()
+        throws Exception
+    {
+        goToUserGroup();
+    }
+
+    /*public void testAddAntProject()
+    {
+        goToAddAntPage();
+        setFieldValue( "projectName", "Foo" );
+        setFieldValue( "projectVersion", "1.0-SNAPSHOT" );
+        setFieldValue( "projectScmUrl",
+                            "https://svn.apache.org/repos/asf/maven/continuum/trunk/continuum-test-projects/ant/" );
+        clickButtonWithValue( "Add" );
+        assertGroupSummaryPage();
+        assertTextPresent( "Default Project Group" );
+        clickLinkWithText( "Default Project Group");
+        assertTextPresent( "Foo");
+
+        //TODO Add more tests (values in Default Project Group, values in project view, notifiers, build defintions, delete, build,...)
+    }*/
+
+    public void goToUserGroup()
+        throws Exception
+    {
+        clickLinkWithText( "Users" );
+        assertAddAdminUserListPage();
+    }
+
+}

Propchange: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/UserGroupTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/UserGroupTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"



Mime
View raw message