You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by jm...@apache.org on 2009/04/19 13:46:37 UTC

svn commit: r766453 [2/3] - in /continuum/trunk/continuum-webapp-test/src/test: resources/ testng/config/ testng/org/apache/continuum/web/aux/ testng/org/apache/continuum/web/aux/test/ testng/org/apache/continuum/web/test/

Copied: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractContinuumTest.java (from r766328, continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractContinuumTest.java)
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractContinuumTest.java?p2=continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractContinuumTest.java&p1=continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractContinuumTest.java&r1=766328&r2=766453&rev=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractContinuumTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractContinuumTest.java Sun Apr 19 11:46:36 2009
@@ -1,4 +1,4 @@
-package org.apache.continuum.web.test;
+package org.apache.continuum.web.aux.test;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -23,7 +23,7 @@
 
 /**
  * Based on AbstractContinuumTestCase of Emmanuel Venisse test.
- *
+ * 
  * @author José Morales Martínez
  * @version $Id$
  */
@@ -32,6 +32,34 @@
 {
 
     // ////////////////////////////////////
+    // Create Admin User
+    // ////////////////////////////////////
+    public void assertCreateAdmin()
+    {
+        assertPage( "Create Admin User" );
+        assertTextPresent( "Username" );
+        assertFieldValue( "admin", "user.username" );
+        assertTextPresent( "Full Name*" );
+        assertElementPresent( "user.fullName" );
+        assertTextPresent( "Email Address*" );
+        assertElementPresent( "user.email" );
+        assertTextPresent( "Password*" );
+        assertElementPresent( "user.password" );
+        assertTextPresent( "Confirm Password*" );
+        assertElementPresent( "user.confirmPassword" );
+        assertButtonWithValuePresent( "Create Admin" );
+    }
+
+    public void submitAdminData( String fullname, String email, String password )
+    {
+        setFieldValue( "user.fullName", fullname );
+        setFieldValue( "user.email", email );
+        setFieldValue( "user.password", password );
+        setFieldValue( "user.confirmPassword", password );
+        submit();
+    }
+
+    // ////////////////////////////////////
     // About
     // ////////////////////////////////////
     public void goToAboutPage()
@@ -49,453 +77,66 @@
     }
 
     // ////////////////////////////////////
-    // Build Queue
-    // ////////////////////////////////////
-    public void goToBuildQueuePage()
-    {
-        clickLinkWithText( "Build Queue" );
-
-        assertBuildQueuePage();
-    }
-
-    public void assertBuildQueuePage()
-    {
-        // TODO: Bug in title
-        assertPage( "Continumm - Parallel Build Queue" );
-        assertTextPresent( "Continuum - Parallel Build Queue" );
-        assertTextPresent( "Name" );
-        assertTextPresent( "DEFAULT_BUILD_QUEUE" );
-        assertButtonWithValuePresent( "Add" );
-    }
-
-    public void removeBuildQueue( String queueName )
-    {
-        clickLinkWithXPath( "(//a[contains(@href,'deleteBuildQueue.action') and contains(@href, '" + queueName
-            + "')])//img" );
-        assertTextPresent( "Delete Parallel Build Queue" );
-        assertTextPresent( "Are you sure you want to delete the build queue \"" + queueName + "\"?" );
-        assertButtonWithValuePresent( "Delete" );
-        assertButtonWithValuePresent( "Cancel" );
-        clickButtonWithValue( "Delete" );
-        assertBuildQueuePage();
-    }
-
-    public void assertAddBuildQueuePage()
-    {
-        assertPage( "Continuum - Add/Edit Parallel Build Queue" );
-        assertTextPresent( "Continuum - Add/Edit Parallel Build Queue" );
-        assertTextPresent( "Name*" );
-        assertElementPresent( "name" );
-        assertButtonWithValuePresent( "Save" );
-        assertButtonWithValuePresent( "Cancel" );
-    }
-
-    public void addBuildQueue( String name, boolean success )
-    {
-        goToBuildQueuePage();
-        assertBuildQueuePage();
-        submit();
-        assertAddBuildQueuePage();
-        setFieldValue( "name", name );
-        submit();
-        if ( success )
-        {
-            assertBuildQueuePage();
-            assertTextPresent( name );
-        }
-        else
-        {
-            assertAddBuildQueuePage();
-        }
-    }
-
-    public void setMaxBuildQueue( int maxBuildQueue )
-    {
-        goToConfigurationPage();
-        setFieldValue( "numberOfAllowedBuildsinParallel", String.valueOf( maxBuildQueue ) );
-        submit();
-    }
-
-    // ////////////////////////////////////
-    // Purge
+    // Login
     // ////////////////////////////////////
 
-    public void goToGeneralPurgePage()
-    {
-        clickLinkWithText( "Purge Configurations" );
-        assertGeneralPurgePage();
-    }
-
-    public void assertGeneralPurgePage()
-    {
-        assertPage( "Continuum - Purge Configurations" );
-        assertTextPresent( "Repository Purge Configurations" );
-        assertTextPresent( "Directory Purge Configurations" );
-        assertButtonWithValuePresent( "Add" );
-    }
-
-    public void removeRepositoryPurge( String purgeDescription )
-    {
-        goToGeneralPurgePage();
-        clickLinkWithXPath( "(//a[contains(@href,'removePurgeConfig.action') and contains(@href, '" + purgeDescription
-            + "')])//img" );
-        assertTextPresent( "Delete Purge Configuration" );
-        assertTextPresent( "Are you sure you want to delete Purge Configuration \"" + purgeDescription + "\"?" );
-        assertButtonWithValuePresent( "Delete" );
-        assertButtonWithValuePresent( "Cancel" );
-        clickButtonWithValue( "Delete" );
-        assertGeneralPurgePage();
-    }
-
-    public void removeDirectoryPurge( String purgeDescription )
-    {
-        goToGeneralPurgePage();
-        clickLinkWithXPath( "(//a[contains(@href,'removePurgeConfig.action') and contains(@href, '" + purgeDescription
-            + "')])//img" );
-        assertTextPresent( "Delete Purge Configuration" );
-        assertTextPresent( "Are you sure you want to delete Purge Configuration \"" + purgeDescription + "\"?" );
-        assertButtonWithValuePresent( "Delete" );
-        assertButtonWithValuePresent( "Cancel" );
-        clickButtonWithValue( "Delete" );
-        assertGeneralPurgePage();
-    }
-
-    public void assertAddRepositoryPurgePage()
+    public void goToLoginPage()
     {
-        assertPage( "Continuum - Add/Edit Purge Configuration" );
-        assertTextPresent( "Add/Edit Purge Configuration" );
-        assertTextPresent( "Repository" );
-        assertElementPresent( "repositoryId" );
-        assertTextPresent( "Days Older" );
-        assertElementPresent( "daysOlder" );
-        assertTextPresent( "Retention Count" );
-        assertElementPresent( "retentionCount" );
-        assertElementPresent( "deleteAll" );
-        assertElementPresent( "deleteReleasedSnapshots" );
-        assertElementPresent( "defaultPurgeConfiguration" );
-        assertTextPresent( "Schedule" );
-        assertElementPresent( "scheduleId" );
-        assertTextPresent( "Description" );
-        assertElementPresent( "description" );
-        assertButtonWithValuePresent( "Save" );
-        assertButtonWithValuePresent( "Cancel" );
+        getSelenium().open( baseUrl );
+        clickLinkWithText( "Login" );
+        assertLoginPage();
     }
 
-    public void assertAddEditDirectoryPurgePage()
+    public void assertLoginPage()
     {
-        assertPage( "Continuum - Add/Edit Purge Configuration" );
-        assertTextPresent( "Add/Edit Purge Configuration" );
-        assertTextPresent( "Directory Type" );
-        assertElementPresent( "directoryType" );
-        assertTextPresent( "Days Older" );
-        assertElementPresent( "daysOlder" );
-        assertTextPresent( "Retention Count" );
-        assertElementPresent( "retentionCount" );
-        assertElementPresent( "deleteAll" );
-        assertElementPresent( "defaultPurgeConfiguration" );
-        assertTextPresent( "Schedule" );
-        assertElementPresent( "scheduleId" );
-        assertTextPresent( "Description" );
-        assertElementPresent( "description" );
-        assertButtonWithValuePresent( "Save" );
+        assertPage( "Login Page" );
+        assertTextPresent( "Login" );
+        assertTextPresent( "Register" );
+        assertTextPresent( "Username" );
+        assertElementPresent( "username" );
+        assertTextPresent( "Password" );
+        assertElementPresent( "password" );
+        assertTextPresent( "Remember Me" );
+        assertElementPresent( "rememberMe" );
+        assertButtonWithValuePresent( "Login" );
         assertButtonWithValuePresent( "Cancel" );
+        assertTextPresent( "Need an Account? Register!" );
+        assertTextPresent( "Forgot your Password? Request a password reset." );
     }
 
-    public void goToAddRepositoryPurge()
-    {
-        goToGeneralPurgePage();
-        assertGeneralPurgePage();
-        clickLinkWithXPath( "//preceding::input[@value='repository' and @type='hidden']//following::input[@type='submit']" );
-        assertAddRepositoryPurgePage();
-    }
-
-    public void goToEditRepositoryPurge( String daysOlder, String retentionCount, String description )
-    {
-        goToGeneralPurgePage();
-        assertGeneralPurgePage();
-        String xPath = "//preceding::td[text()='" + description + "']//following::img[@alt='Edit']";
-        clickLinkWithXPath( xPath );
-        assertAddRepositoryPurgePage();
-        assertFieldValue( daysOlder, "daysOlder" );
-        assertFieldValue( retentionCount, "retentionCount" );
-        assertFieldValue( description, "description" );
-    }
-
-    public void goToEditDirectoryPurge( String daysOlder, String retentionCount, String description )
-    {
-        goToGeneralPurgePage();
-        assertGeneralPurgePage();
-        String xPath = "//preceding::td[text()='" + description + "']//following::img[@alt='Edit']";
-        clickLinkWithXPath( xPath );
-        assertAddEditDirectoryPurgePage();
-        assertFieldValue( daysOlder, "daysOlder" );
-        assertFieldValue( retentionCount, "retentionCount" );
-        assertFieldValue( description, "description" );
-    }
-
-    public void addEditRepositoryPurge( String daysOlder, String retentionCount, String description, boolean success )
-    {
-        setFieldValue( "daysOlder", daysOlder );
-        setFieldValue( "retentionCount", retentionCount );
-        setFieldValue( "description", description );
-        submit();
-        if ( success )
-        {
-            assertGeneralPurgePage();
-        }
-        else
-        {
-            assertAddRepositoryPurgePage();
-        }
-    }
-
-    public void goToAddDirectoryPurge()
+    public void submitUserData( String username, String password, boolean rememberme, boolean success )
     {
-        goToGeneralPurgePage();
-        assertGeneralPurgePage();
-        clickLinkWithXPath( "//preceding::input[@value='directory' and @type='hidden']//following::input[@type='submit']" );
-        assertAddEditDirectoryPurgePage();
-    }
 
-    public void addEditDirectoryPurge( String daysOlder, String retentionCount, String description, boolean success )
-    {
-        setFieldValue( "daysOlder", daysOlder );
-        setFieldValue( "retentionCount", retentionCount );
-        setFieldValue( "description", description );
-        submit();
-        if ( success )
-        {
-            assertGeneralPurgePage();
-        }
-        else
+        setFieldValue( "username", username );
+        setFieldValue( "password", password );
+        if ( rememberme )
         {
-            assertAddEditDirectoryPurgePage();
+            checkField( "rememberMe" );
         }
-    }
-
-    // ////////////////////////////////////
-    // LocalRepository
-    // ////////////////////////////////////
-    public void goToLocalRepositoryPage()
-    {
-        clickLinkWithText( "Local Repositories" );
-
-        assertLocalRepositoryPage();
-    }
-
-    public void assertLocalRepositoryPage()
-    {
-        assertPage( "Continuum - Local Repositories" );
-        assertTextPresent( "Local Repositories" );
-        assertTextPresent( "Name" );
-        assertTextPresent( "Location" );
-        assertTextPresent( "Layout" );
-        assertImgWithAlt( "Edit" );
-        assertImgWithAlt( "Purge" );
-        assertImgWithAlt( "Delete" );
-        assertButtonWithValuePresent( "Add" );
-    }
-
-    public void assertAddLocalRepositoryPage()
-    {
-        assertPage( "Continuum - Add/Edit Local Repository" );
-        assertTextPresent( "Continuum - Add/Edit Local Repository" );
-        assertTextPresent( "Name" );
-        assertElementPresent( "repository.name" );
-        assertTextPresent( "Location" );
-        assertElementPresent( "repository.location" );
-        assertTextPresent( "Layout" );
-        assertElementPresent( "repository.layout" );
-        assertButtonWithValuePresent( "Save" );
-        assertButtonWithValuePresent( "Cancel" );
-    }
-
-    public void removeLocalRepository( String name )
-    {
-        goToLocalRepositoryPage();
-        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Delete']";
-        clickLinkWithXPath( xPath );
-        assertTextPresent( "Delete Local Repository" );
-        assertTextPresent( "Are you sure you want to delete Local Repository \"" + name + "\" ?" );
-        assertButtonWithValuePresent( "Delete" );
-        assertButtonWithValuePresent( "Cancel" );
-        clickButtonWithValue( "Delete" );
-        assertLocalRepositoryPage();
-    }
-
-    public void goToAddLocalRepository()
-    {
-        goToLocalRepositoryPage();
-        clickButtonWithValue( "Add" );
-        assertAddLocalRepositoryPage();
-    }
-
-    public void goToEditLocalRepository( String name, String location )
-    {
-        goToLocalRepositoryPage();
-        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Edit']";
-        clickLinkWithXPath( xPath );
-        assertAddLocalRepositoryPage();
-        assertFieldValue( name, "repository.name" );
-        assertFieldValue( location, "repository.location" );
-    }
-
-    public void addEditLocalRepository( String name, String location, boolean success )
-    {
-        setFieldValue( "repository.name", name );
-        setFieldValue( "repository.location", location );
         submit();
         if ( success )
         {
-            assertLocalRepositoryPage();
+            assertAutenticatedPage( username );
         }
         else
         {
-            assertAddLocalRepositoryPage();
+            assertLoginPage();
         }
     }
 
-    // ////////////////////////////////////
-    // Schedule
-    // ////////////////////////////////////
-
-    public void goToSchedulePage()
-    {
-        clickLinkWithText( "Schedules" );
-
-        assertSchedulePage();
-    }
-
-    public void goToAddSchedule()
-    {
-        goToSchedulePage();
-        clickButtonWithValue( "Add" );
-        assertAddSchedulePage();
-    }
-
-    public void assertSchedulePage()
+    public void assertAutenticatedPage( String username )
     {
-        assertPage( "Continuum - Schedules" );
-        assertTextPresent( "Schedules" );
-        assertTextPresent( "Name" );
-        assertTextPresent( "Description" );
-        assertTextPresent( "Quiet Period" );
-        assertTextPresent( "Cron Expression" );
-        assertTextPresent( "Max Job Time" );
-        assertTextPresent( "Active" );
-        assertTextPresent( "DEFAULT_SCHEDULE" );
-        assertImgWithAlt( "Edit" );
-        assertImgWithAlt( "Delete" );
-        assertButtonWithValuePresent( "Add" );
-    }
-
-    public void assertAddSchedulePage()
-    {
-        assertPage( "Continuum - Edit Schedule" );
-        assertTextPresent( "Continuum - Edit Schedule" );
-        assertTextPresent( "Name" );
-        assertElementPresent( "name" );
-        assertTextPresent( "Description" );
-        assertElementPresent( "description" );
-        assertTextPresent( "Cron Expression" );
-        assertTextPresent( "Second" );
-        assertElementPresent( "second" );
-        assertTextPresent( "Minute" );
-        assertElementPresent( "minute" );
-        assertTextPresent( "Hour" );
-        assertElementPresent( "hour" );
-        assertTextPresent( "Day of Month" );
-        assertElementPresent( "dayOfMonth" );
-        assertTextPresent( "Month" );
-        assertElementPresent( "month" );
-        assertTextPresent( "Day of Week" );
-        assertElementPresent( "dayOfWeek" );
-        assertTextPresent( "Year [optional]" );
-        assertElementPresent( "year" );
-        assertTextPresent( "Maximum job execution time" );
-        assertElementPresent( "maxJobExecutionTime" );
-        assertTextPresent( "Quiet Period (seconds):" );
-        assertElementPresent( "delay" );
-        assertTextPresent( "Add Build Queue" );
-        assertElementPresent( "availableBuildQueues" );
-        assertElementPresent( "selectedBuildQueues" );
-        assertElementPresent( "active" );
-        assertTextPresent( "Enable/Disable the schedule" );
-        assertButtonWithValuePresent( "Save" );
-        assertButtonWithValuePresent( "Cancel" );
-    }
-
-    public void addEditSchedule( String name, String description, String second, String minute, String hour,
-                                 String dayMonth, String month, String dayWeek, String year, String maxTime,
-                                 String period, boolean success )
-    {
-        setFieldValue( "name", name );
-        setFieldValue( "description", description );
-        setFieldValue( "second", second );
-        setFieldValue( "minute", minute );
-        setFieldValue( "hour", hour );
-        setFieldValue( "dayOfMonth", dayMonth );
-        setFieldValue( "month", month );
-        setFieldValue( "dayOfWeek", dayWeek );
-        setFieldValue( "year", year );
-        setFieldValue( "maxJobExecutionTime", maxTime );
-        setFieldValue( "delay", period );
-        submit();
-        if ( success )
-        {
-            assertSchedulePage();
-        }
-        else
-        {
-            assertAddSchedulePage();
-        }
-    }
-
-    public void goToEditSchedule( String name, String description, String second, String minute, String hour,
-                                  String dayMonth, String month, String dayWeek, String year, String maxTime,
-                                  String period )
-    {
-        goToSchedulePage();
-        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Edit']";
-        clickLinkWithXPath( xPath );
-        assertAddSchedulePage();
-        assertFieldValue( name, "name" );
-        assertFieldValue( description, "description" );
-        assertFieldValue( second, "second" );
-        assertFieldValue( minute, "minute" );
-        assertFieldValue( hour, "hour" );
-        assertFieldValue( dayMonth, "dayOfMonth" );
-        assertFieldValue( month, "month" );
-        assertFieldValue( dayWeek, "dayOfWeek" );
-        assertFieldValue( year, "year" );
-        assertFieldValue( maxTime, "maxJobExecutionTime" );
-        assertFieldValue( period, "delay" );
-    }
-
-    public void removeSchedule( String name )
-    {
-        goToSchedulePage();
-        clickLinkWithXPath( "(//a[contains(@href,'removeSchedule.action') and contains(@href, '" + name + "')])//img" );
-        // TODO: Change Title "Continuum -"
-        assertPage( "Schedule Removal" );
-        assertTextPresent( "Schedule Removal" );
-        assertTextPresent( "Are you sure you want to delete the schedule \"" + name + "\"?" );
-        assertButtonWithValuePresent( "Delete" );
-        assertButtonWithValuePresent( "Cancel" );
-        clickButtonWithValue( "Delete" );
-        assertSchedulePage();
+        assertTextPresent( "Current User" );
+        assertTextPresent( "Edit Details" );
+        assertTextPresent( "Logout" );
+        assertTextNotPresent( "Login" );
+        assertTextPresent( username );
     }
 
     // ////////////////////////////////////
     // Configuration
     // ////////////////////////////////////
 
-    public void goToConfigurationPage()
-    {
-        clickLinkWithText( "Configuration" );
-        assertEditConfigurationPage();
-    }
-
     public void assertEditConfigurationPage()
     {
         assertPage( "Continuum - Configuration" );
@@ -518,94 +159,15 @@
         assertButtonWithValuePresent( "Cancel" );
     }
 
-    public void assertEditedConfigurationPage( String working, String buildOutput, String releaseOutput,
-                                               String deploymentRepository, String baseUrl, String numberBuildParallel )
-    {
-        assertPage( "Continuum - Configuration" );
-        assertTextPresent( "General Configuration " );
-        assertTextPresent( "Working Directory" );
-        assertElementNotPresent( "workingDirectory" );
-        assertTextPresent( working );
-        assertTextPresent( "Build Output Directory" );
-        assertElementNotPresent( "buildOutputDirectory" );
-        assertTextPresent( buildOutput );
-        assertTextPresent( "Release Output Directory" );
-        assertElementNotPresent( "releaseOutputDirectory" );
-        assertTextPresent( releaseOutput );
-        assertTextPresent( "Deployment Repository Directory" );
-        assertElementNotPresent( "deploymentRepositoryDirectory" );
-        assertTextPresent( deploymentRepository );
-        assertTextPresent( "Base URL" );
-        assertElementNotPresent( "baseUrl" );
-        assertTextPresent( baseUrl );
-        assertTextPresent( "Number of Allowed Builds in Parallel" );
-        assertElementNotPresent( "numberOfAllowedBuildsinParallel" );
-        assertTextPresent( numberBuildParallel );
-        assertTextPresent( "Enable Distributed Builds" );
-        assertElementNotPresent( "distributedBuildEnabled" );
-        assertButtonWithValuePresent( "Edit" );
-
-    }
-
-    public void submitConfiguration( String working, String buildOutput, String releaseOutput,
-                                     String deploymentRepository, String baseUrl, String numberBuildParallel,
-                                     boolean distributed, boolean success )
-    {
-        setFieldValue( "workingDirectory", working );
-        setFieldValue( "buildOutputDirectory", buildOutput );
-        setFieldValue( "releaseOutputDirectory", releaseOutput );
-        setFieldValue( "deploymentRepositoryDirectory", deploymentRepository );
-        setFieldValue( "baseUrl", baseUrl );
-        setFieldValue( "numberOfAllowedBuildsinParallel", numberBuildParallel );
-        if ( distributed )
-        {
-            checkField( "distributedBuildEnabled" );
-        }
-        else
-        {
-            uncheckField( "distributedBuildEnabled" );
-        }
-        submit();
-        if ( success )
-        {
-            assertEditedConfigurationPage( working, buildOutput, releaseOutput, deploymentRepository, baseUrl,
-                                           numberBuildParallel );
-        }else {
-            assertEditConfigurationPage();
-        }
-    }
-
     // ////////////////////////////////////
-    // ANT/SHELL Projects
+    // Build Queue
     // ////////////////////////////////////
-    public void assertAddProjectPage( String type )
-    {
-        String title = type.substring( 0, 1 ).toUpperCase() + type.substring( 1 ).toLowerCase();
-        assertPage( "Continuum - Add " + title + " Project" );
-        assertTextPresent( "Add " + title + " Project" );
-        assertTextPresent( "Project Name" );
-        assertElementPresent( "projectName" );
-        assertTextPresent( "Version" );
-        assertElementPresent( "projectVersion" );
-        assertTextPresent( "Scm Url" );
-        assertElementPresent( "projectScmUrl" );
-        assertTextPresent( "Scm Username" );
-        assertElementPresent( "projectScmUsername" );
-        assertTextPresent( "Scm Password" );
-        assertElementPresent( "projectScmPassword" );
-        assertTextPresent( "Scm Branch/Tag" );
-        assertElementPresent( "projectScmTag" );
-        assertLinkPresent( "Maven SCM URL" );
-    }
-
-    public void assertAddAntProjectPage()
-    {
-        assertAddProjectPage( "ant" );
-    }
 
-    public void assertAddShellProjectPage()
+    public void setMaxBuildQueue( int maxBuildQueue )
     {
-        assertAddProjectPage( "shell" );
+        clickLinkWithText( "Configuration" );
+        setFieldValue( "numberOfAllowedBuildsinParallel", String.valueOf( maxBuildQueue ) );
+        submit();
     }
 
     // ////////////////////////////////////
@@ -665,7 +227,7 @@
         assertTextPresent( "Group Actions" );
         assertElementPresent( "build" );
         assertElementPresent( "edit" );
-        assertElementPresent( "remove" );
+        //assertElementPresent( "remove" );
 
         assertTextPresent( "Project Group Scm Root" );
 
@@ -709,7 +271,6 @@
     public void assertAddProjectGroupPage()
     {
         assertPage( "Continuum - Add Project Group" );
-
         assertTextPresent( "Add Project Group" );
         assertTextPresent( "Project Group Name" );
         assertElementPresent( "name" );
@@ -723,14 +284,11 @@
         throws Exception
     {
         showProjectGroup( name, groupId, description );
-
         // Remove
         clickLinkWithLocator( "remove" );
-
         // Assert Confirmation
         assertElementPresent( "removeProjectGroup_" );
         assertElementPresent( "Cancel" );
-
         // Confirm Project Group deletion
         clickButtonWithValue( "Save" );
         assertProjectGroupsSummaryPage();
@@ -742,8 +300,8 @@
         showProjectGroup( name, groupId, description );
         clickButtonWithValue( "Edit" );
         assertEditGroupPage( groupId );
-        setFieldValue( "saveProjectGroup_name", newName );
-        setFieldValue( "saveProjectGroup_description", newDescription );
+        setFieldValue( "name", newName );
+        setFieldValue( "description", newDescription );
         clickButtonWithValue( "Save" );
     }
 
@@ -762,14 +320,13 @@
         assertElementPresent( "Cancel" );
     }
 
-    public void buildProjectGroup( String projectGroupName, String groupId, String description )
+    public void buildProjectGroup( String projectGroupName, String groupId, String description, String projectName)
         throws Exception
     {
         int currentIt = 1;
-        int maxIt = 20;
+        int maxIt = 10;
         showProjectGroup( projectGroupName, groupId, description );
         clickButtonWithValue( "Build all projects" );
-
         while ( isElementPresent( "//img[@alt='Building']" ) || isElementPresent( "//img[@alt='Updating']" ) )
         {
             Thread.sleep( 10000 );
@@ -781,7 +338,8 @@
             }
             currentIt++;
         }
-        clickLinkWithText( p.getProperty( "M2_PROJ_GRP_NAME" ) );
+        Thread.sleep( 10000 );
+        clickLinkWithText( projectName );
         clickLinkWithText( "Builds" );
         clickLinkWithText( "Result" );
         assertTextPresent( "BUILD SUCCESSFUL" );
@@ -790,8 +348,13 @@
 
     public void assertReleaseSuccess()
     {
-        assertTextPresent( "Choose Release Goal for Apache Maven" );
-    }
+        assertTextPresent( "Choose Release Goal for " );
+        assertTextPresent( "Prepare project for release " );
+        assertTextPresent( "Perform project release" );
+        assertElementPresent( "goal" );
+        assertElementPresent( "preparedReleaseId" );
+        assertButtonWithValuePresent( "Submit" );
+        }
 
     public void addValidM2ProjectFromProjectGroup( String projectGroupName, String groupId, String description,
                                                    String m2PomUrl )
@@ -801,10 +364,8 @@
         selectValue( "projectTypes", "Add M2 Project" );
         clickButtonWithValue( "Add" );
         assertAddMavenTwoProjectPage();
-
         setFieldValue( "m2PomUrl", m2PomUrl );
         clickButtonWithValue( "Add" );
-
         // if success redirect to summary page
         assertProjectGroupsSummaryPage();
     }
@@ -814,15 +375,11 @@
     {
         showProjectGroup( projectGroupName, groupId, description );
         clickLinkWithText( "Build Definitions" );
-        assertTextPresent( "Project Group Build Definitions of " + projectGroupName + " group" );
-
         assertGroupBuildDefinitionPage( projectGroupName );
-
     }
 
     public void assertGroupBuildDefinitionPage( String projectGroupName )
     {
-
         assertTextPresent( "Project Group Build Definitions of " + projectGroupName + " group" );
     }
 
@@ -908,477 +465,20 @@
         }
     }
 
-    public void assertGroupNotifierPage( String projectGroupName )
+    // ////////////////////////////////////
+    // General Project Pages
+    // ////////////////////////////////////
+    public void goToEditProjectPage( String projectGroupName, String projectName )
     {
-        assertTextPresent( "Project Group Notifiers of group " + projectGroupName );
-    }
+        clickLinkWithText( "Show Project Groups" );
+        clickLinkWithText( projectGroupName );
+        clickLinkWithText( projectName );
+        clickButtonWithValue( "Edit" );
 
-    public void assertProjectNotifierPage()
-    {
-        assertTextPresent( "Add Notifier" );
+        assertEditProjectPage();
     }
 
-    public void assertAddNotifierPage()
-    {
-        assertPage( "Continuum - Add Notifier" );
-        assertTextPresent( "Add Notifier" );
-        assertTextPresent( "Type" );
-        assertElementPresent( "notifierType" );
-        assertElementPresent( "Cancel" );
-    }
-
-    public void assertAddEditMailNotifierPage()
-    {
-        assertPage( "Continuum - Add/Edit Mail Notifier" );
-        assertTextPresent( "Add/Edit Mail Notifier" );
-        assertTextPresent( "Mail Recipient Address" );
-        assertTextPresent( "Send a mail to latest committers" );
-        assertTextPresent( "Send on Success" );
-        assertTextPresent( "Send on Failure" );
-        assertTextPresent( "Send on Error" );
-        assertTextPresent( "Send on Warning" );
-        // TODO: Replace On for on
-        assertTextPresent( "Send on SCM Failure" );
-        assertElementPresent( "address" );
-        assertElementPresent( "Cancel" );
-    }
-
-    public void assertAddEditIrcNotifierPage()
-    {
-        assertPage( "Continuum - Add/Edit IRC Notifier" );
-
-        assertTextPresent( "IRC Host" );
-        assertElementPresent( "host" );
-
-        assertTextPresent( "IRC port" );
-        assertElementPresent( "port" );
-
-        assertTextPresent( "IRC channel" );
-        assertElementPresent( "channel" );
-
-        assertTextPresent( "Nick Name" );
-        assertElementPresent( "nick" );
-
-        assertTextPresent( "Alternate Nick Name" );
-        assertElementPresent( "alternateNick" );
-
-        assertTextPresent( "User Name" );
-        assertElementPresent( "username" );
-
-        assertTextPresent( "Full Name" );
-        assertElementPresent( "fullName" );
-
-        assertTextPresent( "Password" );
-        assertElementPresent( "password" );
-
-        assertTextPresent( "SSL" );
-        assertTextPresent( "Send on Success" );
-        assertTextPresent( "Send on Failure" );
-        assertTextPresent( "Send on Error" );
-        assertTextPresent( "Send on Warning" );
-        assertTextPresent( "Send on SCM Failure" );
-    }
-
-    public void assertAddEditJabberPage()
-    {
-        assertPage( "Continuum - Add/Edit Jabber Notifier" );
-
-        assertTextPresent( "Jabber Host" );
-        assertElementPresent( "host" );
-        assertTextPresent( "Jabber port" );
-        assertElementPresent( "port" );
-        assertTextPresent( "Jabber login" );
-        assertElementPresent( "login" );
-        assertTextPresent( "Jabber Password" );
-        assertElementPresent( "password" );
-        assertTextPresent( "Jabber Domain Name" );
-        assertElementPresent( "domainName" );
-        assertTextPresent( "Jabber Recipient Address" );
-        assertElementPresent( "address" );
-
-        assertTextPresent( "Is it a SSL connection?" );
-        assertTextPresent( "Is it a Jabber group?" );
-        assertTextPresent( "Send on Success" );
-        assertTextPresent( "Send on Failure" );
-        assertTextPresent( "Send on Error" );
-        assertTextPresent( "Send on Warning" );
-        // TODO: Change On for on
-        assertTextPresent( "Send on SCM Failure" );
-    }
-
-    public void assertAddEditMsnPage()
-    {
-        assertPage( "Continuum - Add/Edit MSN Notifier" );
-
-        assertTextPresent( "MSN login" );
-        assertElementPresent( "login" );
-        assertTextPresent( "MSN Password" );
-        assertElementPresent( "password" );
-        assertTextPresent( "MSN Recipient Address" );
-        assertElementPresent( "address" );
-
-        assertTextPresent( "Send on Success" );
-        assertTextPresent( "Send on Failure" );
-        assertTextPresent( "Send on Error" );
-        assertTextPresent( "Send on Warning" );
-        assertTextPresent( "Send on SCM Failure" );
-    }
-
-    public void assertAddEditWagonPage()
-    {
-        assertPage( "Continuum - Add/Edit Wagon Notifier" );
-
-        assertTextPresent( "Project Site URL" );
-        assertTextPresent( "Server Id (defined in your settings.xml for authentication)" );
-        assertElementPresent( "url" );
-        assertElementPresent( "id" );
-        assertTextPresent( "Send on Success" );
-        assertTextPresent( "Send on Failure" );
-        assertTextPresent( "Send on Error" );
-        assertTextPresent( "Send on Warning" );
-    }
-
-    public void goToGroupNotifier( String projectGroupName, String projectGroupId, String projectGroupDescription )
-        throws Exception
-    {
-        showProjectGroup( projectGroupName, projectGroupId, projectGroupDescription );
-        clickLinkWithText( "Notifiers" );
-        assertGroupNotifierPage( projectGroupName );
-        clickButtonWithValue( "Add" );
-        assertAddNotifierPage();
-    }
-
-    public void goToProjectNotifier( String projectGroupName, String projectName )
-        throws Exception
-    {
-        goToProjectInformationPage( projectGroupName, projectName );
-        clickLinkWithXPath( "//input[contains(@id,'addProjectNotifier') and @type='submit']" );
-        assertAddNotifierPage();
-    }
-
-    public void addMailNotifier( String projectGroupName, String projectName, String email, boolean isValid )
-        throws Exception
-    {
-        selectValue( "//select", "Mail" );
-        clickButtonWithValue( "Submit" );
-        assertAddEditMailNotifierPage();
-        setFieldValue( "address", email );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Address is invalid" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void editMailNotifier( String projectGroupName, String projectName, String oldMail, String newMail,
-                                  boolean isValid )
-        throws Exception
-    {
-        if ( projectName == null )
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'mail')])//img" );
-        }
-        else
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'mail')])//img" );
-        }
-        assertAddEditMailNotifierPage();
-        assertFieldValue( oldMail, "address" );
-        setFieldValue( "address", newMail );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Address is invalid" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void addIrcNotifier( String projectGroupName, String projectName, String host, String channel,
-                                boolean isValid )
-        throws Exception
-    {
-        selectValue( "//select", "IRC" );
-        clickButtonWithValue( "Submit" );
-        assertAddEditIrcNotifierPage();
-        setFieldValue( "host", host );
-        setFieldValue( "channel", channel );
-
-        clickButtonWithValue( "Save" );
-        if ( !isValid )
-        {
-            assertTextPresent( "Host is required" );
-            assertTextPresent( "Channel is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void editIrcNotifier( String projectGroupName, String projectName, String oldHost, String oldChannel,
-                                 String newHost, String newChannel, boolean isValid )
-        throws Exception
-    {
-        if ( projectName == null )
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'irc')])//img" );
-        }
-        else
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'irc')])//img" );
-        }
-        assertAddEditIrcNotifierPage();
-        assertFieldValue( oldHost, "host" );
-        assertFieldValue( oldChannel, "channel" );
-        setFieldValue( "host", newHost );
-        setFieldValue( "channel", newChannel );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Host is required" );
-            assertTextPresent( "Channel is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void addJabberNotifier( String projectGroupName, String projectName, String host, String login,
-                                   String password, String address, boolean isValid )
-        throws Exception
-    {
-        selectValue( "//select", "Jabber" );
-        clickButtonWithValue( "Submit" );
-        assertAddEditJabberPage();
-        setFieldValue( "host", host );
-        setFieldValue( "login", login );
-        setFieldValue( "password", password );
-        setFieldValue( "address", address );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Host is required" );
-            assertTextPresent( "Login is required" );
-            assertTextPresent( "Password is required" );
-            assertTextPresent( "Address is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void editJabberNotifier( String projectGroupName, String projectName, String oldHost, String oldLogin,
-                                    String oldAddress, String newHost, String newLogin, String newPassword,
-                                    String newAddress, boolean isValid )
-        throws Exception
-    {
-        if ( projectName == null )
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'jabber')])//img" );
-        }
-        else
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'jabber')])//img" );
-        }
-        assertAddEditJabberPage();
-        assertFieldValue( oldHost, "host" );
-        assertFieldValue( oldLogin, "login" );
-        assertFieldValue( oldAddress, "address" );
-        setFieldValue( "host", newHost );
-        setFieldValue( "login", newLogin );
-        setFieldValue( "password", newPassword );
-        setFieldValue( "address", newAddress );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Host is required" );
-            assertTextPresent( "Login is required" );
-            assertTextPresent( "Password is required" );
-            assertTextPresent( "Address is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void addMsnNotifier( String projectGroupName, String projectName, String login, String password,
-                                String recipientAddress, boolean isValid )
-        throws Exception
-    {
-        selectValue( "//select", "MSN" );
-        clickButtonWithValue( "Submit" );
-        assertAddEditMsnPage();
-        setFieldValue( "login", login );
-        setFieldValue( "password", password );
-        setFieldValue( "address", recipientAddress );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Login is required" );
-            assertTextPresent( "Password is required" );
-            assertTextPresent( "Address is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void editMsnNotifier( String projectGroupName, String projectName, String oldLogin, String oldAddress,
-                                 String newLogin, String newPassword, String newAddress, boolean isValid )
-        throws Exception
-    {
-        if ( projectName == null )
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'msn')])//img" );
-        }
-        else
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'msn')])//img" );
-        }
-        assertAddEditMsnPage();
-        assertFieldValue( oldLogin, "login" );
-        assertFieldValue( oldAddress, "address" );
-        setFieldValue( "login", newLogin );
-        setFieldValue( "password", newPassword );
-        setFieldValue( "address", newAddress );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Login is required" );
-            assertTextPresent( "Password is required" );
-            assertTextPresent( "Address is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void addWagonNotifierPage( String projectGroupName, String projectName, String siteUrl, String serverId,
-                                      boolean isValid )
-        throws Exception
-    {
-        selectValue( "//select", "Wagon" );
-        clickButtonWithValue( "Submit" );
-        assertAddEditWagonPage();
-        setFieldValue( "url", siteUrl );
-        setFieldValue( "id", serverId );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Destination URL is required" );
-            assertTextPresent( "Server Id is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void editWagonNotifier( String projectGroupName, String projectName, String oldUrl, String oldId,
-                                   String newUrl, String newId, boolean isValid )
-        throws Exception
-    {
-        if ( projectName == null )
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'wagon')])//img" );
-        }
-        else
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'wagon')])//img" );
-        }
-        assertAddEditWagonPage();
-        assertFieldValue( oldUrl, "url" );
-        // TODO: BUG: ServerId is not loader
-        // assertFieldValue( oldId, "id" );
-        setFieldValue( "url", newUrl );
-        setFieldValue( "id", newId );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Destination URL is required" );
-            assertTextPresent( "Server Id is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    // ////////////////////////////////////
-    // General Project Pages
-    // ////////////////////////////////////
-    public void goToEditProjectPage( String projectGroupName, String projectName )
-    {
-        clickLinkWithText( "Show Project Groups" );
-        clickLinkWithText( projectGroupName );
-        clickLinkWithText( projectName );
-        clickButtonWithValue( "Edit" );
-
-        assertEditProjectPage();
-    }
-
-    public void assertEditProjectPage()
+    public void assertEditProjectPage()
     {
         assertTextPresent( "Update Continuum Project" );
         assertTextPresent( "Project Name*:" );
@@ -1397,54 +497,6 @@
         assertElementPresent( "scmTag" );
     }
 
-    public void goToAddNotifierPage( String projectGroupName, String projectName )
-    {
-        clickLinkWithText( "Show Project Groups" );
-        clickLinkWithText( projectGroupName );
-        clickLinkWithText( projectName );
-        getSelenium().click( "addProjectNotifier" );
-        clickLinkWithXPath( "//input[@id='addProjectNotifier_0']" );
-
-        assertNotifierPage();
-    }
-
-    public void assertNotifierPage()
-    {
-        assertPage( "Continuum - Add Notifier" );
-        assertTextPresent( "Add Notifier" );
-        assertTextPresent( "Type:" );
-        assertElementPresent( "notifierType" );
-    }
-
-    public void addMailNotifier( String projectGroupName, String projectName, String email, boolean success,
-                                 boolean failure, boolean error, boolean warning )
-    {
-        goToAddNotifierPage( projectGroupName, projectName );
-        clickButtonWithValue( "Submit" );
-
-        // Enter values into Add Notifier fields, and submit
-        setFieldValue( "address", email );
-        if ( success )
-        {
-            checkField( "sendOnSuccess" );
-        }
-        if ( failure )
-        {
-            checkField( "sendOnFailure" );
-        }
-        if ( error )
-        {
-            checkField( "sendOnError" );
-        }
-        if ( warning )
-        {
-            checkField( "sendOnWarning" );
-        }
-
-        submit();
-        assertProjectInformationPage();
-    }
-
     public void goToProjectInformationPage( String projectGroupName, String projectName )
     {
         clickLinkWithText( "Show Project Groups" );
@@ -1466,15 +518,17 @@
         assertTextPresent( "Developers" );
     }
 
-    public void moveProjectToProjectGroup( String name, String groupId, String description, String newProjectGroup )
+    public void moveProjectToProjectGroup( String groupName, String groupId, String groupDescription, String projectName, String newProjectGroup )
         throws Exception
     {
-        showProjectGroup( name, groupId, description );
+        showProjectGroup( groupName, groupId, groupDescription );
         clickButtonWithValue( "Edit" );
 
         assertTextPresent( "Move to Group" );
-        selectValue( "//select[contains(@name,'project')]", newProjectGroup );
+        String xPath = "//preceding::th/label[contains(text(),'"+ projectName+"')]//following::select";
+        selectValue( xPath, newProjectGroup );
         clickButtonWithValue( "Save" );
+        assertProjectGroupSummaryPage( groupName, groupId, groupDescription );
     }
 
     // ////////////////////////////////////
@@ -1526,15 +580,13 @@
         {
             ident = "addMavenTwoProject";
         }
-        // TODO: Improve the condition
         String condition = "selenium.browserbot.getCurrentWindow().document.getElementById('" + ident + "')";
-        // 'Continuum - Project Group'
         getSelenium().waitForCondition( condition, maxWaitTimeInMs );
     }
 
     /**
      * submit the page
-     *
+     * 
      * @param m2PomUrl
      * @param validPom
      */
@@ -1546,7 +598,6 @@
         if ( validPom )
         {
             assertTextPresent( "Default Project Group" );
-            // TODO: Add more tests
         }
     }
 
@@ -1556,41 +607,145 @@
     public void goToAddMavenOneProjectPage()
     {
         clickLinkWithText( "Maven 1.x Project" );
-
         assertAddMavenOneProjectPage();
     }
 
     public void assertAddMavenOneProjectPage()
     {
-        assertTextPresent( "POM Url" );
+        assertPage( "Continuum - Add Maven 1 Project" );
+        assertTextPresent( "Add Maven 1.x Project" );
+        assertTextPresent( "M1 POM Url" );
         assertElementPresent( "m1PomUrl" );
         assertTextPresent( "Username" );
         assertElementPresent( "scmUsername" );
         assertTextPresent( "Password" );
         assertElementPresent( "scmPassword" );
+        assertTextPresent( "OR" );
         assertTextPresent( "Upload POM" );
         assertElementPresent( "m1PomFile" );
         assertTextPresent( "Project Group" );
         assertElementPresent( "selectedProjectGroup" );
+        assertOptionPresent( "selectedProjectGroup", new String[] { "Defined by POM", "Default Project Group" } );
+        assertTextPresent( "Build Definition Template" );
+        assertElementPresent( "buildDefinitionTemplateId" );
+        assertOptionPresent( "buildDefinitionTemplateId", new String[] { "Default", "Default Ant Template",
+            "Default Maven 1 Template", "Default Maven 2 Template", "Default Shell Template" } );
+        assertButtonWithValuePresent( "Add" );
+        assertButtonWithValuePresent( "Cancel" );
     }
 
     public void addMavenOneProject( String pomUrl, String username, String password, String projectGroup,
-                                    boolean validProject )
+                                    String buildTemplate, boolean success )
     {
-        goToAddMavenOneProjectPage();
-
-        // Enter values into Add Maven One Project fields, and submit
         setFieldValue( "m1PomUrl", pomUrl );
         setFieldValue( "scmUsername", username );
         setFieldValue( "scmPassword", password );
 
+        if ( buildTemplate != null )
+        {
+            selectValue( "buildDefinitionTemplateId", buildTemplate );
+        }
         if ( projectGroup != null )
         {
-            selectValue( "addMavenOneProject_selectedProjectGroup", projectGroup );
+            selectValue( "selectedProjectGroup", projectGroup );
         }
-
         submit();
+        String ident;
+        if ( success )
+        {
+            ident = "projectGroupSummary";
+        }
+        else
+        {
+            ident = "addMavenOneProject";
+        }
+        String condition = "selenium.browserbot.getCurrentWindow().document.getElementById('" + ident + "')";
+        getSelenium().waitForCondition( condition, maxWaitTimeInMs );
+    }
+
+    // ////////////////////////////////////
+    // ANT/SHELL Projects
+    // ////////////////////////////////////
+
+    public void goToAddAntProjectPage()
+    {
+        clickLinkWithText( "Ant Project" );
+        assertAddProjectPage( "ant" );
+    }
+
+    public void goToAddShellProjectPage()
+    {
+        clickLinkWithText( "Shell Project" );
+        assertAddProjectPage( "shell" );
+    }
+
+    public void assertAddProjectPage( String type )
+    {
+        String title = type.substring( 0, 1 ).toUpperCase() + type.substring( 1 ).toLowerCase();
+        assertPage( "Continuum - Add " + title + " Project" );
+        assertTextPresent( "Add " + title + " Project" );
+        assertTextPresent( "Project Name" );
+        assertElementPresent( "projectName" );
+        assertTextPresent( "Description" );
+        assertElementPresent( "projectDescription" );
+        assertTextPresent( "Version" );
+        assertElementPresent( "projectVersion" );
+        assertTextPresent( "Scm Url" );
+        assertElementPresent( "projectScmUrl" );
+        assertLinkPresent( "Maven SCM URL" );
+        assertTextPresent( "Scm Username" );
+        assertElementPresent( "projectScmUsername" );
+        assertTextPresent( "Scm Password" );
+        assertElementPresent( "projectScmPassword" );
+        assertTextPresent( "Scm Branch/Tag" );
+        assertElementPresent( "projectScmTag" );
+        assertTextPresent( "Use SCM Credentials Cache, if available" );
+        assertElementPresent( "projectScmUseCache" );
+        assertTextPresent( "Project Group" );
+        assertElementPresent( "selectedProjectGroup" );
+        assertOptionPresent( "selectedProjectGroup", new String[] { "Default Project Group" } );
+        assertTextPresent( "Build Definition Template" );
+        assertElementPresent( "buildDefinitionTemplateId" );
+        assertOptionPresent( "buildDefinitionTemplateId", new String[] { "Default", "Default Ant Template",
+            "Default Maven 1 Template", "Default Maven 2 Template", "Default Shell Template" } );
+        assertButtonWithValuePresent( "Add" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
 
-        getSelenium().waitForCondition( "'' == document.title", maxWaitTimeInMs );
+    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 )
+    {
+        setFieldValue( "projectName", name );
+        setFieldValue( "projectDescription", description );
+        setFieldValue( "projectVersion", version );
+        setFieldValue( "projectScmUrl", scmUrl );
+        setFieldValue( "projectScmUsername", scmUser );
+        setFieldValue( "projectScmPassword", scmPassword );
+        setFieldValue( "projectScmTag", scmTag );
+        if ( useCache )
+        {
+            checkField( "projectScmUseCache" );
+        }
+        if ( buildTemplate != null )
+        {
+            selectValue( "buildDefinitionTemplateId", buildTemplate );
+        }
+        if ( projectGroup != null )
+        {
+            selectValue( "selectedProjectGroup", projectGroup );
+        }
+        submit();
+        String ident;
+        if ( success )
+        {
+            ident = "projectGroupSummary";
+        }
+        else
+        {
+            ident = "addProject";
+        }
+        String condition = "selenium.browserbot.getCurrentWindow().document.getElementById('" + ident + "')";
+        getSelenium().waitForCondition( condition, maxWaitTimeInMs );
     }
 }

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractInstallationTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractInstallationTest.java?rev=766453&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractInstallationTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractInstallationTest.java Sun Apr 19 11:46:36 2009
@@ -0,0 +1,187 @@
+package org.apache.continuum.web.aux.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.
+ */
+
+
+/**
+ * @author José Morales Martínez
+ * @version $Id$
+ */
+public abstract class AbstractInstallationTest
+    extends AbstractSeleniumTest
+{
+    public void goToInstallationPage()
+    {
+        clickLinkWithText( "Installations" );
+        assertInstallationPage();
+    }
+
+    public void assertInstallationPage()
+    {
+        assertPage( "Continuum - Installations" );
+        assertTextPresent( "Installations" );
+        assertButtonWithValuePresent( "Add" );
+    }
+
+    public void goToAddInstallationTool()
+    {
+        goToInstallationPage();
+        clickButtonWithValue( "Add" );
+        assertAddChoiceTypeInstallation();
+        selectValue( "installationType", "Tool" );
+        clickButtonWithValue( "Add" );
+        assertAddInstallationToolPage();
+    }
+
+    public void goToAddInstallationVariable()
+    {
+        goToInstallationPage();
+        clickButtonWithValue( "Add" );
+        assertAddChoiceTypeInstallation();
+        selectValue( "installationType", "Environment Variable" );
+        clickButtonWithValue( "Add" );
+        assertAddInstallationVariablePage();
+    }
+
+    public void assertAddChoiceTypeInstallation()
+    {
+        assertPage( "Continuum - Installation Type Choice" );
+        assertTextPresent( "Installation Type Choice" );
+        assertTextPresent( "Installation Type" );
+        assertOptionPresent( "installationType", new String[] { "Tool", "Environment Variable" } );
+        assertButtonWithValuePresent( "Add" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void assertAddInstallationToolPage()
+    {
+        assertEditInstallationToolPage();
+        assertElementPresent( "automaticProfile" );
+        assertTextPresent( "Create a Build Environment with the Installation name" );
+    }
+
+    public void assertEditInstallationToolPage()
+    {
+        assertPage( "Continuum - Installation" );
+        assertTextPresent( "Continuum - Installation" );
+        assertTextPresent( "Name" );
+        assertElementPresent( "installation.name" );
+        assertTextPresent( "Type" );
+        assertOptionPresent( "installation.type", new String[] { "JDK", "Maven 2", "Maven 1", "ANT" } );
+        assertTextPresent( "Value/Path" );
+        assertElementPresent( "installation.varValue" );
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void assertAddInstallationVariablePage()
+    {
+        assertEditInstallationVariablePage();
+        assertElementPresent( "automaticProfile" );
+        assertTextPresent( "Create a Build Environment with the Installation name" );
+    }
+
+    public void assertEditInstallationVariablePage()
+    {
+        assertPage( "Continuum - Installation" );
+        assertTextPresent( "Continuum - Installation" );
+        assertTextPresent( "Name" );
+        assertElementPresent( "installation.name" );
+        assertTextPresent( "Environment Variable Name" );
+        assertElementPresent( "installation.varName" );
+        assertTextPresent( "Value/Path" );
+        assertElementPresent( "installation.varValue" );
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void addInstallation( String name, String var, String path, boolean createBuildEnv, boolean tool,
+                                 boolean success )
+    {
+        if ( createBuildEnv )
+        {
+            checkField( "automaticProfile" );
+        }
+        else
+        {
+            uncheckField( "automaticProfile" );
+        }
+        editInstallation( name, var, path, tool, success );
+    }
+
+    public void editInstallation( String name, String var, String path, boolean tool, boolean success )
+    {
+        setFieldValue( "installation.name", name );
+        setFieldValue( "installation.varValue", path );
+        if ( tool )
+        {
+            selectValue( "installation.type", var );
+        }
+        else
+        {
+            setFieldValue( "installation.varName", var );
+        }
+        submit();
+        if ( success )
+        {
+            assertInstallationPage();
+        }
+        else if ( tool )
+        {
+            assertAddInstallationToolPage();
+        }
+        else
+        {
+            assertAddInstallationVariablePage();
+        }
+    }
+
+    public void goToEditInstallation( String name, String var, String path, boolean tool )
+    {
+        goToInstallationPage();
+        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Edit']";
+        clickLinkWithXPath( xPath );
+        if ( tool )
+        {
+            assertEditInstallationToolPage();
+        }
+        else
+        {
+            assertEditInstallationVariablePage();
+            assertFieldValue( var, "installation.varName" );
+        }
+        assertFieldValue( name, "installation.name" );
+        assertFieldValue( path, "installation.varValue" );
+    }
+
+    public void removeInstallation( String name )
+    {
+        goToInstallationPage();
+        clickLinkWithXPath( "(//a[contains(@href,'deleteInstallation') and contains(@href, '" + name + "')])//img" );
+        assertPage( "Continuum - Delete Installation" );
+        assertTextPresent( "Delete Installation" );
+        assertTextPresent( "Are you sure you want to delete \"" + name + "\" installation ?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertInstallationPage();
+    }
+
+}

Propchange: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractInstallationTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractInstallationTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractInstallationTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractLocalRepositoryTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractLocalRepositoryTest.java?rev=766453&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractLocalRepositoryTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractLocalRepositoryTest.java Sun Apr 19 11:46:36 2009
@@ -0,0 +1,108 @@
+package org.apache.continuum.web.aux.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.
+ */
+
+
+/**
+ * @author José Morales Martínez
+ * @version $Id$
+ */
+public abstract class AbstractLocalRepositoryTest
+    extends AbstractSeleniumTest
+{
+    public void goToLocalRepositoryPage()
+    {
+        clickLinkWithText( "Local Repositories" );
+
+        assertLocalRepositoryPage();
+    }
+
+    public void assertLocalRepositoryPage()
+    {
+        assertPage( "Continuum - Local Repositories" );
+        assertTextPresent( "Local Repositories" );
+        assertTextPresent( "Name" );
+        assertTextPresent( "Location" );
+        assertTextPresent( "Layout" );
+        assertImgWithAlt( "Edit" );
+        assertImgWithAlt( "Purge" );
+        assertImgWithAlt( "Delete" );
+        assertButtonWithValuePresent( "Add" );
+    }
+
+    public void assertAddLocalRepositoryPage()
+    {
+        assertPage( "Continuum - Add/Edit Local Repository" );
+        assertTextPresent( "Add/Edit Local Repository" );
+        assertTextPresent( "Name" );
+        assertElementPresent( "repository.name" );
+        assertTextPresent( "Location" );
+        assertElementPresent( "repository.location" );
+        assertTextPresent( "Layout" );
+        assertElementPresent( "repository.layout" );
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void removeLocalRepository( String name )
+    {
+        goToLocalRepositoryPage();
+        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Delete']";
+        clickLinkWithXPath( xPath );
+        assertTextPresent( "Delete Local Repository" );
+        assertTextPresent( "Are you sure you want to delete Local Repository \"" + name + "\" ?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertLocalRepositoryPage();
+    }
+
+    public void goToAddLocalRepository()
+    {
+        goToLocalRepositoryPage();
+        clickButtonWithValue( "Add" );
+        assertAddLocalRepositoryPage();
+    }
+
+    public void goToEditLocalRepository( String name, String location )
+    {
+        goToLocalRepositoryPage();
+        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Edit']";
+        clickLinkWithXPath( xPath );
+        assertAddLocalRepositoryPage();
+        assertFieldValue( name, "repository.name" );
+        assertFieldValue( location, "repository.location" );
+    }
+
+    public void addEditLocalRepository( String name, String location, boolean success )
+    {
+        setFieldValue( "repository.name", name );
+        setFieldValue( "repository.location", location );
+        submit();
+        if ( success )
+        {
+            assertLocalRepositoryPage();
+        }
+        else
+        {
+            assertAddLocalRepositoryPage();
+        }
+    }
+}

Propchange: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractLocalRepositoryTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractLocalRepositoryTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractLocalRepositoryTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractNotifierTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractNotifierTest.java?rev=766453&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractNotifierTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractNotifierTest.java Sun Apr 19 11:46:36 2009
@@ -0,0 +1,483 @@
+package org.apache.continuum.web.aux.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.
+ */
+
+
+/**
+ * @author José Morales Martínez
+ * @version $Id$
+ */
+public abstract class AbstractNotifierTest
+    extends AbstractContinuumTest
+{
+    public void assertGroupNotifierPage( String projectGroupName )
+    {
+        assertTextPresent( "Project Group Notifiers of group " + projectGroupName );
+    }
+
+    public void assertProjectNotifierPage()
+    {
+        assertTextPresent( "Add Notifier" );
+    }
+
+    public void assertAddNotifierPage()
+    {
+        assertPage( "Continuum - Add Notifier" );
+        assertTextPresent( "Add Notifier" );
+        assertTextPresent( "Type" );
+        assertElementPresent( "notifierType" );
+        assertElementPresent( "Cancel" );
+    }
+
+    public void assertAddEditMailNotifierPage()
+    {
+        assertPage( "Continuum - Add/Edit Mail Notifier" );
+        assertTextPresent( "Add/Edit Mail Notifier" );
+        assertTextPresent( "Mail Recipient Address" );
+        assertTextPresent( "Send a mail to latest committers" );
+        assertTextPresent( "Send on Success" );
+        assertTextPresent( "Send on Failure" );
+        assertTextPresent( "Send on Error" );
+        assertTextPresent( "Send on Warning" );
+        assertTextPresent( "Send on SCM Failure" );
+        assertElementPresent( "address" );
+        assertElementPresent( "Cancel" );
+    }
+
+    public void assertAddEditIrcNotifierPage()
+    {
+        assertPage( "Continuum - Add/Edit IRC Notifier" );
+
+        assertTextPresent( "IRC Host" );
+        assertElementPresent( "host" );
+
+        assertTextPresent( "IRC port" );
+        assertElementPresent( "port" );
+
+        assertTextPresent( "IRC channel" );
+        assertElementPresent( "channel" );
+
+        assertTextPresent( "Nick Name" );
+        assertElementPresent( "nick" );
+
+        assertTextPresent( "Alternate Nick Name" );
+        assertElementPresent( "alternateNick" );
+
+        assertTextPresent( "User Name" );
+        assertElementPresent( "username" );
+
+        assertTextPresent( "Full Name" );
+        assertElementPresent( "fullName" );
+
+        assertTextPresent( "Password" );
+        assertElementPresent( "password" );
+
+        assertTextPresent( "SSL" );
+        assertTextPresent( "Send on Success" );
+        assertTextPresent( "Send on Failure" );
+        assertTextPresent( "Send on Error" );
+        assertTextPresent( "Send on Warning" );
+        assertTextPresent( "Send on SCM Failure" );
+    }
+
+    public void assertAddEditJabberPage()
+    {
+        assertPage( "Continuum - Add/Edit Jabber Notifier" );
+
+        assertTextPresent( "Jabber Host" );
+        assertElementPresent( "host" );
+        assertTextPresent( "Jabber port" );
+        assertElementPresent( "port" );
+        assertTextPresent( "Jabber login" );
+        assertElementPresent( "login" );
+        assertTextPresent( "Jabber Password" );
+        assertElementPresent( "password" );
+        assertTextPresent( "Jabber Domain Name" );
+        assertElementPresent( "domainName" );
+        assertTextPresent( "Jabber Recipient Address" );
+        assertElementPresent( "address" );
+
+        assertTextPresent( "Is it a SSL connection?" );
+        assertTextPresent( "Is it a Jabber group?" );
+        assertTextPresent( "Send on Success" );
+        assertTextPresent( "Send on Failure" );
+        assertTextPresent( "Send on Error" );
+        assertTextPresent( "Send on Warning" );
+        assertTextPresent( "Send on SCM Failure" );
+    }
+
+    public void assertAddEditMsnPage()
+    {
+        assertPage( "Continuum - Add/Edit MSN Notifier" );
+
+        assertTextPresent( "MSN login" );
+        assertElementPresent( "login" );
+        assertTextPresent( "MSN Password" );
+        assertElementPresent( "password" );
+        assertTextPresent( "MSN Recipient Address" );
+        assertElementPresent( "address" );
+
+        assertTextPresent( "Send on Success" );
+        assertTextPresent( "Send on Failure" );
+        assertTextPresent( "Send on Error" );
+        assertTextPresent( "Send on Warning" );
+        assertTextPresent( "Send on SCM Failure" );
+    }
+
+    public void assertAddEditWagonPage()
+    {
+        assertPage( "Continuum - Add/Edit Wagon Notifier" );
+
+        assertTextPresent( "Project Site URL" );
+        assertTextPresent( "Server Id (defined in your settings.xml for authentication)" );
+        assertElementPresent( "url" );
+        assertElementPresent( "id" );
+        assertTextPresent( "Send on Success" );
+        assertTextPresent( "Send on Failure" );
+        assertTextPresent( "Send on Error" );
+        assertTextPresent( "Send on Warning" );
+    }
+
+    public void goToGroupNotifier( String projectGroupName, String projectGroupId, String projectGroupDescription )
+        throws Exception
+    {
+        showProjectGroup( projectGroupName, projectGroupId, projectGroupDescription );
+        clickLinkWithText( "Notifiers" );
+        assertGroupNotifierPage( projectGroupName );
+        clickButtonWithValue( "Add" );
+        assertAddNotifierPage();
+    }
+
+    public void goToProjectNotifier( String projectGroupName, String projectName )
+        throws Exception
+    {
+        goToProjectInformationPage( projectGroupName, projectName );
+        clickLinkWithXPath( "//input[contains(@id,'addProjectNotifier') and @type='submit']" );
+        assertAddNotifierPage();
+    }
+
+    public void addMailNotifier( String projectGroupName, String projectName, String email, boolean isValid )
+        throws Exception
+    {
+        selectValue( "//select", "Mail" );
+        clickButtonWithValue( "Submit" );
+        assertAddEditMailNotifierPage();
+        setFieldValue( "address", email );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Address is invalid" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void editMailNotifier( String projectGroupName, String projectName, String oldMail, String newMail,
+                                  boolean isValid )
+        throws Exception
+    {
+        if ( projectName == null )
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'mail')])//img" );
+        }
+        else
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'mail')])//img" );
+        }
+        assertAddEditMailNotifierPage();
+        assertFieldValue( oldMail, "address" );
+        setFieldValue( "address", newMail );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Address is invalid" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void addIrcNotifier( String projectGroupName, String projectName, String host, String channel,
+                                boolean isValid )
+        throws Exception
+    {
+        selectValue( "//select", "IRC" );
+        clickButtonWithValue( "Submit" );
+        assertAddEditIrcNotifierPage();
+        setFieldValue( "host", host );
+        setFieldValue( "channel", channel );
+
+        clickButtonWithValue( "Save" );
+        if ( !isValid )
+        {
+            assertTextPresent( "Host is required" );
+            assertTextPresent( "Channel is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void editIrcNotifier( String projectGroupName, String projectName, String oldHost, String oldChannel,
+                                 String newHost, String newChannel, boolean isValid )
+        throws Exception
+    {
+        if ( projectName == null )
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'irc')])//img" );
+        }
+        else
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'irc')])//img" );
+        }
+        assertAddEditIrcNotifierPage();
+        assertFieldValue( oldHost, "host" );
+        assertFieldValue( oldChannel, "channel" );
+        setFieldValue( "host", newHost );
+        setFieldValue( "channel", newChannel );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Host is required" );
+            assertTextPresent( "Channel is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void addJabberNotifier( String projectGroupName, String projectName, String host, String login,
+                                   String password, String address, boolean isValid )
+        throws Exception
+    {
+        selectValue( "//select", "Jabber" );
+        clickButtonWithValue( "Submit" );
+        assertAddEditJabberPage();
+        setFieldValue( "host", host );
+        setFieldValue( "login", login );
+        setFieldValue( "password", password );
+        setFieldValue( "address", address );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Host is required" );
+            assertTextPresent( "Login is required" );
+            assertTextPresent( "Password is required" );
+            assertTextPresent( "Address is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void editJabberNotifier( String projectGroupName, String projectName, String oldHost, String oldLogin,
+                                    String oldAddress, String newHost, String newLogin, String newPassword,
+                                    String newAddress, boolean isValid )
+        throws Exception
+    {
+        if ( projectName == null )
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'jabber')])//img" );
+        }
+        else
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'jabber')])//img" );
+        }
+        assertAddEditJabberPage();
+        assertFieldValue( oldHost, "host" );
+        assertFieldValue( oldLogin, "login" );
+        assertFieldValue( oldAddress, "address" );
+        setFieldValue( "host", newHost );
+        setFieldValue( "login", newLogin );
+        setFieldValue( "password", newPassword );
+        setFieldValue( "address", newAddress );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Host is required" );
+            assertTextPresent( "Login is required" );
+            assertTextPresent( "Password is required" );
+            assertTextPresent( "Address is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void addMsnNotifier( String projectGroupName, String projectName, String login, String password,
+                                String recipientAddress, boolean isValid )
+        throws Exception
+    {
+        selectValue( "//select", "MSN" );
+        clickButtonWithValue( "Submit" );
+        assertAddEditMsnPage();
+        setFieldValue( "login", login );
+        setFieldValue( "password", password );
+        setFieldValue( "address", recipientAddress );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Login is required" );
+            assertTextPresent( "Password is required" );
+            assertTextPresent( "Address is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void editMsnNotifier( String projectGroupName, String projectName, String oldLogin, String oldAddress,
+                                 String newLogin, String newPassword, String newAddress, boolean isValid )
+        throws Exception
+    {
+        if ( projectName == null )
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'msn')])//img" );
+        }
+        else
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'msn')])//img" );
+        }
+        assertAddEditMsnPage();
+        assertFieldValue( oldLogin, "login" );
+        assertFieldValue( oldAddress, "address" );
+        setFieldValue( "login", newLogin );
+        setFieldValue( "password", newPassword );
+        setFieldValue( "address", newAddress );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Login is required" );
+            assertTextPresent( "Password is required" );
+            assertTextPresent( "Address is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void addWagonNotifierPage( String projectGroupName, String projectName, String siteUrl, String serverId,
+                                      boolean isValid )
+        throws Exception
+    {
+        selectValue( "//select", "Wagon" );
+        clickButtonWithValue( "Submit" );
+        assertAddEditWagonPage();
+        setFieldValue( "url", siteUrl );
+        setFieldValue( "id", serverId );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Destination URL is required" );
+            assertTextPresent( "Server Id is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void editWagonNotifier( String projectGroupName, String projectName, String oldUrl, String oldId,
+                                   String newUrl, String newId, boolean isValid )
+        throws Exception
+    {
+        if ( projectName == null )
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'wagon')])//img" );
+        }
+        else
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'wagon')])//img" );
+        }
+        assertAddEditWagonPage();
+        assertFieldValue( oldUrl, "url" );
+        assertFieldValue( oldId, "id" );
+        setFieldValue( "url", newUrl );
+        setFieldValue( "id", newId );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Destination URL is required" );
+            assertTextPresent( "Server Id is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+}

Propchange: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractNotifierTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractNotifierTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractNotifierTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain