continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmora...@apache.org
Subject svn commit: r766453 [3/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/
Date Sun, 19 Apr 2009 11:46:37 GMT
Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractPurgeTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractPurgeTest.java?rev=766453&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractPurgeTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractPurgeTest.java Sun Apr 19 11:46:36 2009
@@ -0,0 +1,182 @@
+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 AbstractPurgeTest
+    extends AbstractSeleniumTest
+{
+    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()
+    {
+        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" );
+    }
+
+    public void assertAddEditDirectoryPurgePage()
+    {
+        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" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    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()
+    {
+        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
+        {
+            assertAddEditDirectoryPurgePage();
+        }
+    }
+}

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

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

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

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractScheduleTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractScheduleTest.java?rev=766453&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractScheduleTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractScheduleTest.java Sun Apr 19 11:46:36 2009
@@ -0,0 +1,155 @@
+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 AbstractScheduleTest
+    extends AbstractSeleniumTest
+{
+    public void goToSchedulePage()
+    {
+        clickLinkWithText( "Schedules" );
+
+        assertSchedulePage();
+    }
+
+    public void goToAddSchedule()
+    {
+        goToSchedulePage();
+        clickButtonWithValue( "Add" );
+        assertAddSchedulePage();
+    }
+
+    public void assertSchedulePage()
+    {
+        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( "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" );
+        assertPage( "Continuum - Delete Schedule" );
+        assertTextPresent( "Delete Schedule" );
+        assertTextPresent( "Are you sure you want to delete the schedule \"" + name + "\"?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertSchedulePage();
+    }
+}

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

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

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

Copied: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractSeleniumTest.java (from r766328, continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractSeleniumTest.java)
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractSeleniumTest.java?p2=continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractSeleniumTest.java&p1=continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractSeleniumTest.java&r1=766328&r2=766453&rev=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractSeleniumTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractSeleniumTest.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
@@ -19,7 +19,9 @@
  * under the License.
  */
 
+import java.util.Arrays;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Map.Entry;
@@ -31,7 +33,7 @@
 
 /**
  * Based on AbstractSeleniumTestCase of Emmanuel Venisse test.
- *
+ * 
  * @author José Morales Martínez
  * @version $Id$
  */
@@ -194,6 +196,22 @@
         getSelenium().select( locator, "label=" + value );
     }
 
+    public void assertOptionPresent( String selectField, String[] options )
+    {
+        assertElementPresent( selectField );
+        String[] optionsPresent = getSelenium().getSelectOptions( selectField );
+        List<String> expected = Arrays.asList( options );
+        List<String> present = Arrays.asList( optionsPresent );
+        Assert.assertTrue( present.containsAll( expected ), "Options expected are not included in present options" );
+    }
+
+    public void assertSelectedValue( String value, String fieldName )
+    {
+        assertElementPresent( fieldName );
+        String optionsPresent = getSelenium().getSelectedLabel( value );
+        Assert.assertEquals( optionsPresent, value );
+    }
+
     public void submit()
     {
         clickLinkWithXPath( "//input[@type='submit']" );
@@ -204,6 +222,11 @@
         Assert.assertTrue( isButtonWithValuePresent( text ), "'" + text + "' button isn't present" );
     }
 
+    public void assertButtonWithIdPresent( String id )
+    {
+        Assert.assertTrue( isButtonWithIdPresent( id ), "'Button with id =" + id + "' isn't present" );
+    }
+
     public void assertButtonWithValueNotPresent( String text )
     {
         Assert.assertFalse( isButtonWithValuePresent( text ), "'" + text + "' button is present" );
@@ -215,6 +238,11 @@
             || isElementPresent( "//input[@value='" + text + "']" );
     }
 
+    public boolean isButtonWithIdPresent( String text )
+    {
+        return isElementPresent( "//button[@id='" + text + "']" ) || isElementPresent( "//input[@id='" + text + "']" );
+    }
+
     public void clickButtonWithValue( String text )
     {
         clickButtonWithValue( text, true );
@@ -315,4 +343,14 @@
     {
         return getSelenium().isChecked( locator );
     }
+
+    public void assertIsChecked( String locator )
+    {
+        Assert.assertTrue( getSelenium().isChecked( locator ) );
+    }
+
+    public void assertIsNotChecked( String locator )
+    {
+        Assert.assertFalse( getSelenium().isChecked( locator ) );
+    }
 }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java?rev=766453&r1=766452&r2=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java Sun Apr 19 11:46:36 2009
@@ -19,23 +19,49 @@
  * under the License.
  */
 
+import org.apache.continuum.web.aux.test.AbstractContinuumTest;
 import org.testng.Assert;
 import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeSuite;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
 /**
  * Based on AboutTest of Wendy Smoak test.
- *
+ * 
  * @author José Morales Martínez
  * @version $Id$
  */
 @Test( groups = { "about" }, alwaysRun = true )
 public class AboutTest
-    extends AbstractSeleniumTest
+    extends AbstractContinuumTest
 {
+    @BeforeSuite
+    public void initializeContinuum()
+        throws Exception
+    {
+        super.open();
+        getSelenium().open( baseUrl );
+        String title = getSelenium().getTitle();
+        if ( title.equals( "Create Admin User" ) )
+        {
+            assertCreateAdmin();
+            String fullname = p.getProperty( "ADMIN_FULLNAME" );
+            String username = p.getProperty( "ADMIN_USERNAME" );
+            String mail = p.getProperty( "ADMIN_MAIL" );
+            String password = p.getProperty( "ADMIN_PASSWORD" );
+            submitAdminData( fullname, mail, password );            
+            assertLoginPage();
+            submitUserData( username, password, false, true );
+            assertAutenticatedPage( username );
+            assertEditConfigurationPage();
+            submit();
+            clickLinkWithText( "Logout" );
+        }
+        super.close();
+    }
 
-    @BeforeTest(groups = { "about" })
+    @BeforeTest( groups = { "about" } )
     public void open()
         throws Exception
     {
@@ -50,7 +76,7 @@
     }
 
     @Override
-    @AfterTest(groups = { "about" })
+    @AfterTest( groups = { "about" } )
     public void close()
         throws Exception
     {

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java?rev=766453&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java Sun Apr 19 11:46:36 2009
@@ -0,0 +1,81 @@
+package org.apache.continuum.web.test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.continuum.web.aux.test.AbstractContinuumTest;
+import org.testng.annotations.Test;
+
+/**
+ * Based on AddAntProjectTestCase of Emmanuel Venisse.
+ * 
+ * @author José Morales Martínez
+ * @version $Id$
+ */
+@Test( groups = { "antProject" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class AntProjectTest
+    extends AbstractContinuumTest
+{
+    @Test(dependsOnMethods = {"testAddProjectGroup"})
+    public void testAddAntProject()
+        throws Exception
+    {
+        String ANT_NAME = p.getProperty( "ANT_NAME" );
+        String ANT_DESCRIPTION = p.getProperty( "ANT_DESCRIPTION" );
+        String ANT_VERSION = p.getProperty( "ANT_VERSION" );
+        String ANT_TAG = p.getProperty( "ANT_TAG" );
+        String ANT_SCM_URL = p.getProperty( "ANT_SCM_URL" );
+        String ANT_SCM_USERNAME = p.getProperty( "ANT_SCM_USERNAME" );
+        String ANT_SCM_PASSWORD = p.getProperty( "ANT_SCM_PASSWORD" );
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        goToAddAntProjectPage();
+        addProject( ANT_NAME, ANT_DESCRIPTION, ANT_VERSION, ANT_SCM_URL, ANT_SCM_USERNAME, ANT_SCM_PASSWORD, ANT_TAG,
+                    false, TEST_PROJ_GRP_NAME, null, true );
+        assertProjectGroupSummaryPage( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
+    }
+
+    public void testSubmitEmptyForm()
+    {
+        goToAddAntProjectPage();
+        submit();
+        assertAddProjectPage( "ant" );
+        assertTextPresent( "Name is required and cannot contain null or spaces only" );
+        assertTextPresent( "Version is required and cannot contain null or spaces only" );
+        assertTextPresent( "SCM Url is required and cannot contain null or spaces only" );
+    }
+
+    @Test(dependsOnMethods = {"testAddAntProject"})
+    public void testAddDupliedAntProject()
+        throws Exception
+    {
+        String ANT_NAME = p.getProperty( "ANT_NAME" );
+        String ANT_DESCRIPTION = p.getProperty( "ANT_DESCRIPTION" );
+        String ANT_VERSION = p.getProperty( "ANT_VERSION" );
+        String ANT_TAG = p.getProperty( "ANT_TAG" );
+        String ANT_SCM_URL = p.getProperty( "ANT_SCM_URL" );
+        String ANT_SCM_USERNAME = p.getProperty( "ANT_SCM_USERNAME" );
+        String ANT_SCM_PASSWORD = p.getProperty( "ANT_SCM_PASSWORD" );
+        goToAddAntProjectPage();
+        addProject( ANT_NAME, ANT_DESCRIPTION, ANT_VERSION, ANT_SCM_URL, ANT_SCM_USERNAME, ANT_SCM_PASSWORD, ANT_TAG,
+                    false, null, null, false );
+        assertTextPresent( "Project name already exist" );
+    }
+}

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

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

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

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java?rev=766453&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java Sun Apr 19 11:46:36 2009
@@ -0,0 +1,113 @@
+package org.apache.continuum.web.test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.continuum.web.aux.test.AbstractBuildDefinitionTemplateTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author José Morales Martínez
+ * @version $Id$
+ */
+@Test( groups = { "buildDefinitionTemplate" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class BuildDefinitionTemplateTest
+    extends AbstractBuildDefinitionTemplateTest
+{
+    public void testAddTemplate()
+        throws Exception
+    {
+        String TEMPLATE_NAME = p.getProperty( "TEMPLATE_NAME" );
+        goToAddTemplate();
+        addEditTemplate( TEMPLATE_NAME, new String[] { "Default Maven 2 Build Definition",
+            "Default Maven 1 Build Definition" }, new String[] {}, true );
+    }
+
+    public void testAddInvalidTemplate()
+        throws Exception
+    {
+        goToAddTemplate();
+        addEditTemplate( "", new String[] {}, new String[] {}, false );
+        assertTextPresent( "Name is required" );
+    }
+
+    @Test( dependsOnMethods = { "testAddTemplate" } )
+    public void testEditTemplate()
+        throws Exception
+    {
+        String TEMPLATE_NAME = p.getProperty( "TEMPLATE_NAME" );
+        String newName = "new_name";
+        goToEditTemplate( TEMPLATE_NAME, new String[] { "Default Maven 2 Build Definition",
+            "Default Maven 1 Build Definition" } );
+        addEditTemplate( newName, new String[] { "Default Shell Build Definition" },
+                         new String[] { "Default Maven 2 Build Definition" }, true );
+        goToEditTemplate( newName, new String[] { "Default Maven 1 Build Definition",
+            "Default Shell Build Definition" } );
+        addEditTemplate( TEMPLATE_NAME, new String[] { "Default Maven 2 Build Definition" },
+                         new String[] { "Default Shell Build Definition" }, true );
+    }
+
+    @Test( dependsOnMethods = { "testEditTemplate" } )
+    public void testDeleteTemplate()
+    {
+        String TEMPLATE_NAME = p.getProperty( "TEMPLATE_NAME" );
+        removeTemplate( TEMPLATE_NAME );
+    }
+
+    public void testAddBuildDefinitionTemplate()
+        throws Exception
+    {
+        String TEMPLATE_BUILD_POM_NAME = p.getProperty( "TEMPLATE_BUILD_POM_NAME" );
+        String TEMPLATE_BUILD_GOALS = p.getProperty( "TEMPLATE_BUILD_GOALS" );
+        String TEMPLATE_BUILD_ARGUMENTS = p.getProperty( "TEMPLATE_BUILD_ARGUMENTS" );
+        String TEMPLATE_BUILD_DESCRIPTION = p.getProperty( "TEMPLATE_BUILD_DESCRIPTION" );
+        goToAddBuildDefinitionTemplate();
+        addEditBuildDefinitionTemplate( TEMPLATE_BUILD_POM_NAME, TEMPLATE_BUILD_GOALS, TEMPLATE_BUILD_ARGUMENTS,
+                                        TEMPLATE_BUILD_DESCRIPTION, true, true, true, true );
+    }
+
+    public void testAddInvalidBuildDefinitionTemplate()
+        throws Exception
+    {
+        goToAddBuildDefinitionTemplate();
+        addEditBuildDefinitionTemplate( "", "", "", "", true, true, true, false );
+        assertTextPresent( "BuildFile is required" );
+        assertTextPresent( "Description is required" );
+    }
+
+    @Test( dependsOnMethods = { "testAddBuildDefinitionTemplate" } )
+    public void testEditBuildDefinitionTemplate()
+        throws Exception
+    {
+        String TEMPLATE_BUILD_POM_NAME = p.getProperty( "TEMPLATE_BUILD_POM_NAME" );
+        String TEMPLATE_BUILD_GOALS = p.getProperty( "TEMPLATE_BUILD_GOALS" );
+        String TEMPLATE_BUILD_ARGUMENTS = p.getProperty( "TEMPLATE_BUILD_ARGUMENTS" );
+        String TEMPLATE_BUILD_DESCRIPTION = p.getProperty( "TEMPLATE_BUILD_DESCRIPTION" );
+        goToEditBuildDefinitionTemplate(TEMPLATE_BUILD_DESCRIPTION);
+        addEditBuildDefinitionTemplate( TEMPLATE_BUILD_POM_NAME, TEMPLATE_BUILD_GOALS, TEMPLATE_BUILD_ARGUMENTS,
+                                        TEMPLATE_BUILD_DESCRIPTION, false, false, false, true );
+    }
+
+    @Test( dependsOnMethods = { "testEditBuildDefinitionTemplate" } )
+    public void testDeleteBuildDefinitionTemplate()
+    {
+        String TEMPLATE_BUILD_DESCRIPTION = p.getProperty( "TEMPLATE_BUILD_DESCRIPTION" );
+        removeBuildDefinitionTemplate( TEMPLATE_BUILD_DESCRIPTION );
+    }
+}

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

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

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

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java?rev=766453&r1=766452&r2=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java Sun Apr 19 11:46:36 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.web.aux.test.AbstractContinuumTest;
 import org.testng.annotations.Test;
 
 /**
@@ -166,7 +167,7 @@
         assertGroupBuildDefinitionPage( TEST2_PROJ_GRP_NAME );
     }
 
-    @Test( dependsOnMethods = { "testAddMavenTwoProjectFromRemoteSourceToNonDefaultProjectGroup" } )
+    @Test( dependsOnMethods = { "testMoveProject" } )
     public void testAddNotDefautltProjectBuildDefinition()
         throws Exception
     {

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java?rev=766453&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java Sun Apr 19 11:46:36 2009
@@ -0,0 +1,84 @@
+package org.apache.continuum.web.test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.continuum.web.aux.test.AbstractBuildEnvironmentTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author José Morales Martínez
+ * @version $Id$
+ */
+@Test( groups = { "buildEnvironment" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class BuildEnvironmentTest
+    extends AbstractBuildEnvironmentTest
+{
+    public void testAddBuildEnvironment()
+    {
+        String BUIL_ENV_NAME = p.getProperty( "BUIL_ENV_NAME" );
+        goToAddBuildEnvironment();
+        addBuildEnvironment( BUIL_ENV_NAME, new String[] {}, true );
+    }
+
+    public void testAddInvalidBuildEnvironment()
+    {
+        goToAddBuildEnvironment();
+        addBuildEnvironment( "", new String[] {}, false );
+        assertTextPresent( "You must define a name" );
+    }
+
+    @Test( dependsOnMethods = { "testAddBuildEnvironment" } )
+    public void testEditInvalidBuildEnvironment()
+    {
+        String BUIL_ENV_NAME = p.getProperty( "BUIL_ENV_NAME" );
+        goToEditBuildEnvironment( BUIL_ENV_NAME );
+        editBuildEnvironment( "", new String[] {}, false );
+        assertTextPresent( "You must define a name" );
+    }
+
+    @Test( dependsOnMethods = { "testAddBuildEnvironment" } )
+    public void testAddDuplicatedBuildEnvironment()
+    {
+        String BUIL_ENV_NAME = p.getProperty( "BUIL_ENV_NAME" );
+        goToAddBuildEnvironment();
+        addBuildEnvironment( BUIL_ENV_NAME, new String[] {}, false );
+        assertTextPresent( "A Build Environment with the same name already exists" );
+    }
+
+    @Test( dependsOnMethods = { "testAddBuildEnvironment" } )
+    public void testEditBuildEnvironment()
+    {
+        String BUIL_ENV_NAME = p.getProperty( "BUIL_ENV_NAME" );
+        String newName = "new_name";
+        goToEditBuildEnvironment( BUIL_ENV_NAME );
+        editBuildEnvironment( newName, new String[] {}, true );
+        //TODO: ADD INSTALLATIONS TO ENVIROTMENT
+        goToEditBuildEnvironment( newName );
+        editBuildEnvironment( BUIL_ENV_NAME, new String[] {}, true );
+    }
+
+    @Test( dependsOnMethods = { "testEditInvalidBuildEnvironment", "testEditBuildEnvironment",
+        "testAddDuplicatedBuildEnvironment", "testEditInvalidBuildEnvironment" } )
+    public void testDeleteBuildEnvironment()
+    {
+        String BUIL_ENV_NAME = p.getProperty( "BUIL_ENV_NAME" );
+        removeBuildEnvironment( BUIL_ENV_NAME );
+    }
+}

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

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

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

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java?rev=766453&r1=766452&r2=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java Sun Apr 19 11:46:36 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.web.aux.test.AbstractConfigurationTest;
 import org.testng.annotations.Test;
 
 /**
@@ -27,7 +28,7 @@
  */
 @Test( groups = { "configuration" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
 public class ConfigurationTest
-    extends AbstractContinuumTest
+    extends AbstractConfigurationTest
 {
     private String WORKING_DIRECTORY;
 

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java?rev=766453&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java Sun Apr 19 11:46:36 2009
@@ -0,0 +1,160 @@
+package org.apache.continuum.web.test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.continuum.web.aux.test.AbstractInstallationTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author José Morales Martínez
+ * @version $Id$
+ */
+@Test( groups = { "installation" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class InstallationTest
+    extends AbstractInstallationTest
+{
+    public void testAddJdkToolWithoutBuildEnvirotment()
+    {
+        String INSTALL_TOOL_JDK_NAME = p.getProperty( "INSTALL_TOOL_JDK_NAME" );
+        String INSTALL_TOOL_JDK_PATH = p.getProperty( "INSTALL_TOOL_JDK_PATH" );
+        goToAddInstallationTool();
+        addInstallation( INSTALL_TOOL_JDK_NAME, "JDK", INSTALL_TOOL_JDK_PATH, false, true, true );
+    }
+
+    public void testAddMavenToolWithBuildEnvirotment()
+    {
+        String INTALLA_TOOL_MAVEN_NAME = p.getProperty( "INTALLA_TOOL_MAVEN_NAME" );
+        String INTALLA_TOOL_MAVEN_PATH = p.getProperty( "INTALLA_TOOL_MAVEN_PATH" );
+        goToAddInstallationTool();
+        addInstallation( INTALLA_TOOL_MAVEN_NAME, "Maven 2", INTALLA_TOOL_MAVEN_PATH, true, true, true );
+        //TODO: Validate build envirotment
+    }
+
+    public void testAddInstallationVariableWithBuildEnvirotment()
+    {
+        String INSTALL_VAR_NAME = p.getProperty( "INSTALL_VAR_NAME" );
+        String INSTALL_VAR_VARIABLE_NAME = p.getProperty( "INSTALL_VAR_VARIABLE_NAME" );
+        String INSTALL_VAR_PATH = p.getProperty( "INSTALL_VAR_PATH" );
+        goToAddInstallationVariable();
+        addInstallation( INSTALL_VAR_NAME, INSTALL_VAR_VARIABLE_NAME, INSTALL_VAR_PATH, true, false, true );
+        //TODO: Validate build envirotment
+    }
+
+    public void testAddInstallationVariableWithoutBuildEnvirotment()
+    {
+        String INSTALL_VAR_NAME = "var_without_build_envirotment";
+        String INSTALL_VAR_VARIABLE_NAME = "var_name";
+        String INSTALL_VAR_PATH = "path";
+        goToAddInstallationVariable();
+        addInstallation( INSTALL_VAR_NAME, INSTALL_VAR_VARIABLE_NAME, INSTALL_VAR_PATH, false, false, true );
+    }
+
+    public void testAddInvalidInstallationTool()
+    {
+        goToAddInstallationTool();
+        addInstallation( "", "JDK", "", false, true, false );
+        assertTextPresent( "You must define a name" );
+        assertTextPresent( "You must define a value" );
+    }
+
+    public void testAddInvalidPathInstallationTool()
+    {
+        goToAddInstallationTool();
+        addInstallation( "name", "JDK", "invalid_path", false, true, false );
+        assertTextPresent( "Failed to validate installation, check server log" );
+    }
+
+    public void testAddInvalidInstallationVariable()
+    {
+        goToAddInstallationVariable();
+        addInstallation( "", "", "", false, false, false );
+        assertTextPresent( "You must define a name" );
+        assertTextPresent( "You must define a value" );
+    }
+
+    public void testAddInvalidVarNameInstallationVariable()
+    {
+        goToAddInstallationVariable();
+        addInstallation( "name", "", "path", false, false, false );
+        assertTextPresent( "You must define an environment variable" );
+    }
+
+    @Test( dependsOnMethods = { "testAddJdkToolWithoutBuildEnvirotment" } )
+    public void testAddDuplicatedInstallationTool()
+    {
+        String INSTALL_TOOL_JDK_NAME = p.getProperty( "INSTALL_TOOL_JDK_NAME" );
+        String INSTALL_TOOL_JDK_PATH = p.getProperty( "INSTALL_TOOL_JDK_PATH" );
+        goToAddInstallationTool();
+        addInstallation( INSTALL_TOOL_JDK_NAME, "JDK", INSTALL_TOOL_JDK_PATH, false, true, false );
+        assertTextPresent( "Installation name already exists" );
+    }
+
+    @Test( dependsOnMethods = { "testAddInstallationVariableWithBuildEnvirotment" } )
+    public void testAddDuplicatedInstallationVariable()
+    {
+        String INSTALL_VAR_NAME = p.getProperty( "INSTALL_VAR_NAME" );
+        String INSTALL_VAR_VARIABLE_NAME = p.getProperty( "INSTALL_VAR_VARIABLE_NAME" );
+        String INSTALL_VAR_PATH = p.getProperty( "INSTALL_VAR_PATH" );
+        goToAddInstallationVariable();
+        addInstallation( INSTALL_VAR_NAME, INSTALL_VAR_VARIABLE_NAME, INSTALL_VAR_PATH, false, false, false );
+        assertTextPresent( "Installation name already exists" );
+    }
+
+    @Test( dependsOnMethods = { "testAddJdkToolWithoutBuildEnvirotment" } )
+    public void testEditInstallationTool()
+    {
+        String INSTALL_TOOL_JDK_NAME = p.getProperty( "INSTALL_TOOL_JDK_NAME" );
+        String INSTALL_TOOL_JDK_PATH = p.getProperty( "INSTALL_TOOL_JDK_PATH" );
+        String newName = "new_name";
+        goToEditInstallation( INSTALL_TOOL_JDK_NAME, "JDK", INSTALL_TOOL_JDK_PATH, true );
+        editInstallation( newName, "JDK", INSTALL_TOOL_JDK_PATH, true, true );
+        goToEditInstallation( newName, "JDK", INSTALL_TOOL_JDK_PATH, true );
+        editInstallation( INSTALL_TOOL_JDK_NAME, "JDK", INSTALL_TOOL_JDK_PATH, true, true );
+    }
+
+    @Test( dependsOnMethods = { "testAddInstallationVariableWithBuildEnvirotment" } )
+    public void testEditInstallationVariable()
+    {
+        String INSTALL_VAR_NAME = p.getProperty( "INSTALL_VAR_NAME" );
+        String INSTALL_VAR_VARIABLE_NAME = p.getProperty( "INSTALL_VAR_VARIABLE_NAME" );
+        String INSTALL_VAR_PATH = p.getProperty( "INSTALL_VAR_PATH" );
+        String newName = "new_name";
+        String newVarName = "new_var_name";
+        String newPath = "new_path";
+        goToEditInstallation( INSTALL_VAR_NAME, INSTALL_VAR_VARIABLE_NAME, INSTALL_VAR_PATH, false );
+        editInstallation( newName, newVarName, newPath, false, true );
+        goToEditInstallation( newName, newVarName, newPath, false );
+        editInstallation( INSTALL_VAR_NAME, INSTALL_VAR_VARIABLE_NAME, INSTALL_VAR_PATH, false, true );
+    }
+
+    @Test( dependsOnMethods = { "testEditInstallationTool", "testAddDuplicatedInstallationTool" } )
+    public void testDeleteInstallationTool()
+    {
+        String INSTALL_TOOL_JDK_NAME = p.getProperty( "INSTALL_TOOL_JDK_NAME" );
+        removeInstallation( INSTALL_TOOL_JDK_NAME );
+    }
+
+    @Test( dependsOnMethods = { "testEditInstallationVariable", "testAddDuplicatedInstallationVariable" } )
+    public void testDeleteInstallationVariable()
+    {
+        String INSTALL_VAR_NAME = p.getProperty( "INSTALL_VAR_NAME" );
+        removeInstallation( INSTALL_VAR_NAME );
+    }
+}

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

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

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

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java?rev=766453&r1=766452&r2=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java Sun Apr 19 11:46:36 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.web.aux.test.AbstractLocalRepositoryTest;
 import org.testng.annotations.Test;
 
 /**
@@ -27,7 +28,7 @@
  */
 @Test( groups = { "repository" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
 public class LocalRepositoriesTest
-    extends AbstractContinuumTest
+    extends AbstractLocalRepositoryTest
 {
     public void testAddLocalRepository()
     {
@@ -45,7 +46,7 @@
         assertTextPresent( "You must define a local repository directory." );
     }
 
-    @Test(dependsOnMethods = {"testAddLocalRepository"})
+    @Test( dependsOnMethods = { "testAddLocalRepository" } )
     public void testAddDuplicatedLocalRepository()
     {
         String LOCAL_REPOSITORY_NAME = p.getProperty( "LOCAL_REPOSITORY_NAME" );
@@ -56,7 +57,7 @@
         assertTextPresent( "Local repository location must be unique" );
     }
 
-    @Test(dependsOnMethods = {"testAddDuplicatedLocalRepository"})
+    @Test( dependsOnMethods = { "testAddDuplicatedLocalRepository" } )
     public void testEditLocalRepository()
     {
         String LOCAL_REPOSITORY_NAME = p.getProperty( "LOCAL_REPOSITORY_NAME" );
@@ -69,7 +70,7 @@
         addEditLocalRepository( LOCAL_REPOSITORY_NAME, LOCAL_REPOSITORY_LOCATION, true );
     }
 
-    @Test(dependsOnMethods = {"testEditLocalRepository"})
+    @Test( dependsOnMethods = { "testEditLocalRepository" } )
     public void testDeleteLocalRepository()
     {
         String LOCAL_REPOSITORY_NAME = p.getProperty( "LOCAL_REPOSITORY_NAME" );

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java?rev=766453&r1=766452&r2=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java Sun Apr 19 11:46:36 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.web.aux.test.AbstractContinuumTest;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
@@ -36,11 +37,11 @@
  */
 @Test( groups = { "login" } )
 public class LoginTest
-    extends AbstractSeleniumTest
+    extends AbstractContinuumTest
 {
     public void testWithBadUsername()
     {
-        diplayLoginPage();
+        goToLoginPage();
         getSelenium().type( "loginForm_username", "badUsername" );
         getSelenium().type( "loginForm_username", p.getProperty( "ADMIN_PASSWORD" ) );
         getSelenium().click( "loginForm__login" );
@@ -51,7 +52,7 @@
     @Test( dependsOnMethods = { "testWithBadUsername" }, alwaysRun = true )
     public void testWithBadPassword()
     {
-        diplayLoginPage();
+        goToLoginPage();
         getSelenium().type( "loginForm_username", p.getProperty( "ADMIN_USERNAME" ) );
         getSelenium().type( "loginForm_password", "badPassword" );
         getSelenium().click( "loginForm__login" );
@@ -62,7 +63,7 @@
     @Test( dependsOnMethods = { "testWithBadPassword" }, alwaysRun = true )
     public void testWithEmptyUsername()
     {
-        diplayLoginPage();
+        goToLoginPage();
         getSelenium().type( "loginForm_password", "password" );
         getSelenium().click( "loginForm__login" );
         getSelenium().waitForPageToLoad( maxWaitTimeInMs );
@@ -72,7 +73,7 @@
     @Test( dependsOnMethods = { "testWithEmptyUsername" }, alwaysRun = true )
     public void testWithEmptyPassword()
     {
-        diplayLoginPage();
+        goToLoginPage();
         getSelenium().type( "loginForm_username", p.getProperty( "ADMIN_USERNAME" ) );
         getSelenium().click( "loginForm__login" );
         getSelenium().waitForPageToLoad( maxWaitTimeInMs );
@@ -82,7 +83,7 @@
     @Test( groups = { "loginSuccess" }, dependsOnMethods = { "testWithEmptyPassword" }, alwaysRun = true )
     public void testWithCorrectUsernamePassword()
     {
-        diplayLoginPage();
+        goToLoginPage();
         getSelenium().type( "loginForm_username", p.getProperty( "ADMIN_USERNAME" ) );
         getSelenium().type( "loginForm_password", p.getProperty( "ADMIN_PASSWORD" ) );
         getSelenium().click( "loginForm__login" );
@@ -107,10 +108,4 @@
     {
         super.close();
     }
-
-    private void diplayLoginPage()
-    {
-        getSelenium().open( baseUrl + "/security/login.action" );
-        waitPage();
-    }
 }

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java?rev=766453&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java Sun Apr 19 11:46:36 2009
@@ -0,0 +1,155 @@
+package org.apache.continuum.web.test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.continuum.web.aux.test.AbstractContinuumTest;
+import org.testng.annotations.Test;
+
+/**
+ * Based on AddMavenOneProjectTestCase of Emmanuel Venisse.
+ * 
+ * @author José Morales Martínez
+ * @version $Id$
+ */
+@Test( groups = { "mavenOneProject" }, dependsOnMethods = { "testWithCorrectUsernamePassword" })
+public class MavenOneProjectTest
+    extends AbstractContinuumTest
+{
+    /**
+     * test with valid pom url
+     */
+    public void testValidPomUrl()
+        throws Exception
+    {
+        String M1_POM_URL = p.getProperty( "M1_POM_URL" );
+        String M1_POM_USERNAME = p.getProperty( "M1_POM_USERNAME" );
+        String M1_POM_PASSWORD = p.getProperty( "M1_POM_PASSWORD" );
+        String M1_PROJ_GRP_NAME = p.getProperty( "M1_PROJ_GRP_NAME" );
+        String M1_PROJ_GRP_ID = p.getProperty( "M1_PROJ_GRP_ID" );
+        String M1_PROJ_GRP_DESCRIPTION = p.getProperty( "M1_PROJ_GRP_DESCRIPTION" );
+        // Enter values into Add Maven Two Project fields, and submit
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( M1_POM_URL, M1_POM_USERNAME, M1_POM_PASSWORD, null, null, true );
+        assertProjectGroupSummaryPage( M1_PROJ_GRP_NAME, M1_PROJ_GRP_ID, M1_PROJ_GRP_DESCRIPTION );
+    }
+
+    @Test( dependsOnMethods = { "testAddProjectGroup" } )
+    public void testAddMavenOneProjectFromRemoteSourceToNonDefaultProjectGroup()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String M1_POM_URL = p.getProperty( "M1_POM_URL" );
+        String M1_POM_USERNAME = p.getProperty( "M1_POM_USERNAME" );
+        String M1_POM_PASSWORD = p.getProperty( "M1_POM_PASSWORD" );
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( M1_POM_URL, M1_POM_USERNAME, M1_POM_PASSWORD, TEST_PROJ_GRP_NAME, null, true );
+        assertProjectGroupSummaryPage( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
+    }
+
+    /**
+     * test with no pom file or pom url specified
+     */
+    public void testNoPomSpecified()
+        throws Exception
+    {
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( "", "", "", null, null, false );
+        assertTextPresent( "Either POM URL or Upload POM is required." );
+    }
+
+    /**
+     * test with missing <repository> element in the pom file
+     */
+    public void testMissingElementInPom()
+        throws Exception
+    {
+        String M1_MISS_REPO_POM_URL = p.getProperty( "M1_MISS_REPO_POM_URL" );
+        String M1_POM_USERNAME = p.getProperty( "M1_POM_USERNAME" );
+        String M1_POM_PASSWORD = p.getProperty( "M1_POM_PASSWORD" );
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( M1_MISS_REPO_POM_URL, M1_POM_USERNAME, M1_POM_PASSWORD, null, null, false );
+        assertTextPresent( "Missing 'repository' element in the POM." );
+    }
+
+    /**
+     * test with <extend> element present in pom file
+     */
+    public void testWithExtendElementPom()
+        throws Exception
+    {
+        String M1_EXTENDED_POM_URL = p.getProperty( "M1_EXTENDED_POM_URL" );
+        String M1_POM_USERNAME = p.getProperty( "M1_POM_USERNAME" );
+        String M1_POM_PASSWORD = p.getProperty( "M1_POM_PASSWORD" );
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( M1_EXTENDED_POM_URL, M1_POM_USERNAME, M1_POM_PASSWORD, null, null, false );
+        assertTextPresent( "Cannot use a POM with an 'extend' element" );
+    }
+
+    /**
+     * test with unparseable xml content for pom file
+     */
+    public void testUnparseableXmlContent()
+        throws Exception
+    {
+        String M1_UNPARSEABLE_POM_URL = p.getProperty( "M1_UNPARSEABLE_POM_URL" );
+        String M1_POM_USERNAME = p.getProperty( "M1_POM_USERNAME" );
+        String M1_POM_PASSWORD = p.getProperty( "M1_POM_PASSWORD" );
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( M1_UNPARSEABLE_POM_URL, M1_POM_USERNAME, M1_POM_PASSWORD, null, null, false );
+        assertTextPresent( "The XML content of the POM can not be parsed." );
+    }
+
+    /**
+     * test with a malformed pom url
+     */
+    public void testMalformedPomUrl()
+        throws Exception
+    {
+        String pomUrl = "aaa";
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( pomUrl, "", "", null, null, false );
+        assertTextPresent( "The specified resource cannot be accessed. Please try again later or contact your administrator." );
+    }
+
+    /**
+     * test with an inaccessible pom url
+     */
+    public void testInaccessiblePomUrl()
+        throws Exception
+    {
+        String pomUrl = "http://www.google.com";
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( pomUrl, "", "", null, null, false );
+        assertTextPresent( "POM file does not exist. Either the POM you specified or one of its modules does not exist." );
+    }
+
+    /**
+     * test cancel button
+     */
+    public void testCancelButton()
+    {
+        goToAboutPage();
+        goToAddMavenOneProjectPage();
+        clickButtonWithValue( "Cancel" );
+        assertAboutPage();
+    }
+}

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

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

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

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java?rev=766453&r1=766452&r2=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java Sun Apr 19 11:46:36 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.web.aux.test.AbstractContinuumTest;
 import org.testng.annotations.Test;
 
 /**
@@ -38,6 +39,7 @@
         String M2_POM_URL = p.getProperty( "M2_POM_URL" );
         String M2_POM_USERNAME = p.getProperty( "M2_POM_USERNAME" );
         String M2_POM_PASSWORD = p.getProperty( "M2_POM_PASSWORD" );
+        
         String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
         String M2_PROJ_GRP_ID = p.getProperty( "M2_PROJ_GRP_ID" );
         String M2_PROJ_GRP_DESCRIPTION = p.getProperty( "M2_PROJ_GRP_DESCRIPTION" );

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java?rev=766453&r1=766452&r2=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java Sun Apr 19 11:46:36 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.web.aux.test.AbstractSeleniumTest;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
@@ -40,27 +41,21 @@
     public void testMyAccountEdit()
         throws Exception
     {
-        displayEditDetail();
+        clickLinkWithText( "Edit Details");
         String email = getFieldValue( "user.email" );
         setFieldValue( "user.fullName", newFullName );
         setFieldValue( "user.email", newEmail );
         submit();
         getSelenium().waitForPageToLoad( maxWaitTimeInMs );
         Assert.assertEquals( "Continuum - Group Summary", getTitle() );
-        displayEditDetail();
+        clickLinkWithText( "Edit Details");
         assertFieldValue( newFullName, "user.fullName" );
         assertFieldValue( newEmail, "user.email" );
         setFieldValue( "user.fullName", p.getProperty( "ADMIN_USERNAME" ) );
         setFieldValue( "user.email", email );
         submit();
-        displayEditDetail();
+        clickLinkWithText( "Edit Details");
         assertFieldValue( p.getProperty( "ADMIN_USERNAME" ), "user.fullName" );
         assertFieldValue( email, "user.email" );
     }
-
-    private void displayEditDetail()
-    {
-        clickLinkWithText( "Edit Details", true );
-    }
-    // TODO: Validate required values
 }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java?rev=766453&r1=766452&r2=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java Sun Apr 19 11:46:36 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.web.aux.test.AbstractNotifierTest;
 import org.testng.annotations.Test;
 
 /**
@@ -27,7 +28,7 @@
  */
 @Test( groups = { "notifier" }, dependsOnMethods = { "testAddMavenTwoProject" } )
 public class NotifierTest
-    extends AbstractContinuumTest
+    extends AbstractNotifierTest
 {
     public void testAddValidMailProjectNotifier()
         throws Exception
@@ -595,6 +596,9 @@
         goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         // Delete
         clickLinkWithXPath( "(//a[contains(@href,'deleteProjectNotifier') and contains(@href,'mail')])//img" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
         assertProjectInformationPage();
     }
 }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java?rev=766453&r1=766452&r2=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java Sun Apr 19 11:46:36 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.web.aux.test.AbstractContinuumTest;
 import org.testng.annotations.Test;
 
 /**
@@ -64,21 +65,19 @@
         String DEFAULT_PROJ_GRP_NAME = p.getProperty( "DEFAULT_PROJ_GRP_NAME" );
         String DEFAULT_PROJ_GRP_ID = p.getProperty( "DEFAULT_PROJ_GRP_NAME" );
         String DEFAULT_PROJ_GRP_DESCRIPTION = p.getProperty( "DEFAULT_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        
 
         // 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 );
-        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
-        assertTextNotPresent( "Member Projects" );
+                                   M2_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_NAME );
         showProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION );
         assertTextPresent( "Member Projects" );
-        // Restore project to test test project group
+        // Restore project to test project group
         moveProjectToProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION,
-                                   TEST_PROJ_GRP_NAME );
+                                   M2_PROJ_GRP_NAME, TEST_PROJ_GRP_NAME );
         showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         assertTextPresent( "Member Projects" );
-        showProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION );
-        assertTextNotPresent( "Member Projects" );
     }
 
     public void testAddProjectGroupWithEmptyString()
@@ -124,22 +123,19 @@
         String TEST2_PROJ_GRP_NAME = p.getProperty( "TEST2_PROJ_GRP_NAME" );
         String TEST2_PROJ_GRP_ID = p.getProperty( "TEST2_PROJ_GRP_ID" );
         String TEST2_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
-
-        // TODO: BUG: Operations Result is a blank page
-        //editProjectGroup( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION, "",
-        //                  TEST2_PROJ_GRP_DESCRIPTION + "_2" );
-        //assertTextPresent( "Project Group Name required." );
+        editProjectGroup( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION, " ",
+                          TEST2_PROJ_GRP_DESCRIPTION);
+        assertTextPresent( "Project Group Name cannot contain spaces only" );
     }
 
-    @Test( dependsOnMethods = { "testAddMavenTwoProjectFromRemoteSourceToNonDefaultProjectGroup" } )
+    @Test( dependsOnMethods = { "testAddMavenTwoProject" } )
     public void testProjectGroupAllBuildSuccess()
         throws Exception
-    {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-
-        buildProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
+    {        
+        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_ID = p.getProperty( "M2_PROJ_GRP_ID" );
+        String M2_PROJ_GRP_DESCRIPTION = p.getProperty( "M2_PROJ_GRP_DESCRIPTION" );
+        buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION, M2_PROJ_GRP_NAME );
         clickButtonWithValue( "Release" );
         assertReleaseSuccess();
     }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java?rev=766453&r1=766452&r2=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java Sun Apr 19 11:46:36 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.web.aux.test.AbstractPurgeTest;
 import org.testng.annotations.Test;
 
 /**
@@ -27,7 +28,7 @@
  */
 @Test( groups = { "purge" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
 public class PurgeTest
-    extends AbstractContinuumTest
+    extends AbstractPurgeTest
 {
     public void testAddRepositoryPurge()
     {
@@ -106,7 +107,4 @@
         String PURGE_DIRECTORY_DESCRIPTION = p.getProperty( "PURGE_DIRECTORY_DESCRIPTION" );
         removeDirectoryPurge( PURGE_DIRECTORY_DESCRIPTION );
     }
-    /*
-     * public void testPurge(){ goToGeneralPurgePage(); clickImgWithAlt( "Purge" ); assertGeneralPurgePage(); }
-     */
 }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java?rev=766453&r1=766452&r2=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java Sun Apr 19 11:46:36 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.web.aux.test.AbstractBuildQueueTest;
 import org.testng.annotations.Test;
 
 /**
@@ -27,7 +28,7 @@
  */
 @Test( groups = { "queue" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
 public class QueueTest
-    extends AbstractContinuumTest
+    extends AbstractBuildQueueTest
 {
 
     public void testAddBuildQueue()

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java?rev=766453&r1=766452&r2=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java Sun Apr 19 11:46:36 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.web.aux.test.AbstractScheduleTest;
 import org.testng.annotations.Test;
 
 /**
@@ -27,7 +28,7 @@
  */
 @Test( groups = { "schedule" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
 public class ScheduleTest
-    extends AbstractContinuumTest
+    extends AbstractScheduleTest
 {
     public void testAddSchedule()
     {
@@ -60,7 +61,6 @@
     @Test( dependsOnMethods = { "testAddSchedule" } )
     public void testAddDuplicatedSchedule()
     {
-        // TODO: Wait for schedule.buildqueues.add.error
         String SCHEDULE_NAME = p.getProperty( "SCHEDULE_NAME" );
         String SCHEDULE_DESCRIPTION = p.getProperty( "SCHEDULE_DESCRIPTION" );
         String SCHEDULE_EXPR_SECOND = p.getProperty( "SCHEDULE_EXPR_SECOND" );
@@ -76,7 +76,7 @@
         addEditSchedule( SCHEDULE_NAME, SCHEDULE_DESCRIPTION, SCHEDULE_EXPR_SECOND, SCHEDULE_EXPR_MINUTE,
                          SCHEDULE_EXPR_HOUR, SCHEDULE_EXPR_DAY_MONTH, SCHEDULE_EXPR_MONTH, SCHEDULE_EXPR_DAY_WEEK,
                          SCHEDULE_EXPR_YEAR, SCHEDULE_MAX_TIME, SCHEDULE_PERIOD, false );
-        assertTextPresent( "schedule.buildqueues.add.error" );
+        assertTextPresent( "A Schedule with the same name already exists" );
     }
 
     @Test( dependsOnMethods = { "testAddDuplicatedSchedule" } )

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java?rev=766453&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java Sun Apr 19 11:46:36 2009
@@ -0,0 +1,80 @@
+package org.apache.continuum.web.test;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.continuum.web.aux.test.AbstractContinuumTest;
+import org.testng.annotations.Test;
+
+/**
+ * Based on AddShellProjectTestCase of Emmanuel Venisse.
+ * 
+ * @author José Morales Martínez
+ * @version $Id$
+ */
+@Test( groups = { "shellProject" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class ShellProjectTest
+    extends AbstractContinuumTest
+{
+    public void testAddShellProject()
+        throws Exception
+    {
+        String SHELL_NAME = p.getProperty( "SHELL_NAME" );
+        String SHELL_DESCRIPTION = p.getProperty( "SHELL_DESCRIPTION" );
+        String SHELL_VERSION = p.getProperty( "SHELL_VERSION" );
+        String SHELL_TAG = p.getProperty( "SHELL_TAG" );
+        String SHELL_SCM_URL = p.getProperty( "SHELL_SCM_URL" );
+        String SHELL_SCM_USERNAME = p.getProperty( "SHELL_SCM_USERNAME" );
+        String SHELL_SCM_PASSWORD = p.getProperty( "SHELL_SCM_PASSWORD" );
+        String DEFAULT_PROJ_GRP_NAME = p.getProperty( "DEFAULT_PROJ_GRP_NAME" );
+        String DEFAULT_PROJ_GRP_ID = p.getProperty( "DEFAULT_PROJ_GRP_ID" );
+        String DEFAULT_PROJ_GRP_DESCRIPTION = p.getProperty( "DEFAULT_PROJ_GRP_DESCRIPTION" );
+        goToAddShellProjectPage();
+        addProject( SHELL_NAME, SHELL_DESCRIPTION, SHELL_VERSION, SHELL_SCM_URL, SHELL_SCM_USERNAME,
+                    SHELL_SCM_PASSWORD, SHELL_TAG, false, DEFAULT_PROJ_GRP_NAME, null, true );
+        assertProjectGroupSummaryPage( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION );
+    }
+
+    public void testSubmitEmptyForm()
+    {
+        goToAddShellProjectPage();
+        submit();
+        assertAddProjectPage( "shell" );
+        assertTextPresent( "Name is required and cannot contain null or spaces only" );
+        assertTextPresent( "Version is required and cannot contain null or spaces only" );
+        assertTextPresent( "SCM Url is required and cannot contain null or spaces only" );
+    }
+
+    @Test(dependsOnMethods = {"testAddShellProject"})
+    public void testAddDupliedShellProject()
+        throws Exception
+    {
+        String SHELL_NAME = p.getProperty( "SHELL_NAME" );
+        String SHELL_DESCRIPTION = p.getProperty( "SHELL_DESCRIPTION" );
+        String SHELL_VERSION = p.getProperty( "SHELL_VERSION" );
+        String SHELL_TAG = p.getProperty( "SHELL_TAG" );
+        String SHELL_SCM_URL = p.getProperty( "SHELL_SCM_URL" );
+        String SHELL_SCM_USERNAME = p.getProperty( "SHELL_SCM_USERNAME" );
+        String SHELL_SCM_PASSWORD = p.getProperty( "SHELL_SCM_PASSWORD" );
+        goToAddShellProjectPage();
+        addProject( SHELL_NAME, SHELL_DESCRIPTION, SHELL_VERSION, SHELL_SCM_URL, SHELL_SCM_USERNAME,
+                    SHELL_SCM_PASSWORD, SHELL_TAG, false, null, null, false );
+        assertTextPresent( "Project name already exist" );
+    }
+}

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

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

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



Mime
View raw message