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 [1/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/

Author: jmorales
Date: Sun Apr 19 11:46:36 2009
New Revision: 766453

URL: http://svn.apache.org/viewvc?rev=766453&view=rev
Log:
Commit related to issue 2073 (Selenium Test with TestNG)

- Restructure source files and generate parent abstract classes.
- Create admin user when initialize DB
- Fixed bugs and modified old tags related i18n.
- Add new test about intallations,buildEnvirotment,buildTemplate,mavenOne,shell,...
- MavenOne and MavenShell project not actived pending CONTINUUM-2083

Added:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildDefinitionTemplateTest.java   (with props)
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildEnvironmentTest.java   (with props)
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildQueueTest.java   (with props)
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractConfigurationTest.java   (with props)
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractContinuumTest.java
      - copied, changed from r766328, continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractContinuumTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractInstallationTest.java   (with props)
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractLocalRepositoryTest.java   (with props)
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractNotifierTest.java   (with props)
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractPurgeTest.java   (with props)
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractScheduleTest.java   (with props)
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractSeleniumTest.java
      - copied, changed from r766328, continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractSeleniumTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java   (with props)
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java   (with props)
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java   (with props)
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java   (with props)
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java   (with props)
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java   (with props)
Removed:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractContinuumTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractSeleniumTest.java
Modified:
    continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
    continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java

Modified: continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties?rev=766453&r1=766452&r2=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Sun Apr 19 11:46:36 2009
@@ -4,11 +4,13 @@
 # General properties
 #######################
 
-BASE_URL=http://localhost:9595/continuum
+BASE_URL=http://localhost:9595/continuum/
 MAX_WAIT_TIME_IN_MS=60000
 
 ADMIN_USERNAME=admin
+ADMIN_FULLNAME=admin
 ADMIN_PASSWORD=admin123
+ADMIN_MAIL=admin@mail.com
 
 SELENIUM_HOST=localhost
 SELENIUM_PORT=4444
@@ -36,6 +38,46 @@
 MISS_SUBPRO_POM_URL =http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-modules-pom.xml
 
 ########################
+# mavenOneProject group 
+########################
+
+# Properties for testAddMavenOneProject
+M1_POM_URL =http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/valid-project.xml
+M1_PROJ_GRP_NAME=Maven One Project
+M1_PROJ_GRP_ID=maven-one-project
+M1_PROJ_GRP_DESCRIPTION=This is a sample Maven One Project
+M1_POM_USERNAME =
+M1_POM_PASSWORD =
+
+M1_MISS_REPO_POM_URL =http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/missing-repository-element-project.xml
+M1_EXTENDED_POM_URL =http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/extend-element-project.xml
+M1_UNPARSEABLE_POM_URL =http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/unparseable-content-project.xml
+
+########################
+# antProject group 
+########################
+
+ANT_NAME =Ant Project
+ANT_DESCRIPTION =This is a sample Ant Project used for testing
+ANT_VERSION =1.0.0-SNAPSHOT
+ANT_TAG =
+ANT_SCM_URL =http://svn.apache.org/repos/asf/ant/sandbox/parallelexecutor/
+ANT_SCM_USERNAME =
+ANT_SCM_PASSWORD =
+
+########################
+# shellProject group 
+########################
+
+SHELL_NAME =Shell Project
+SHELL_DESCRIPTION =This is a sample Shell Project used for testing
+SHELL_VERSION =1.0.0-SNAPSHOT
+SHELL_TAG =
+SHELL_SCM_URL =http://svn.apache.org/repos/asf/continuum/sandbox/examples/shell/
+SHELL_SCM_USERNAME =
+SHELL_SCM_PASSWORD =
+
+########################
 # projectGroup group 
 ########################
 TEST_PROJ_GRP_NAME =Test Project Group Name
@@ -109,8 +151,27 @@
 ########################
 # installations group 
 ########################
-INSTALLATION_TOOL_NAME =JDK6
-INSTALLATION_TOOL_PATH =/usr/lib/jvm/java-6-sun-1.6.0.10
-INSTALLATION_ENV_NAME =jdk5
-INSTALLATION_ENV_PATH =/usr/lib/jvm/java-5-sun-1.5.0.12
-INSTALLATION_ENV_VAR_NAME =JAVA5_HOME
\ No newline at end of file
+# Correct location for JDK
+INSTALL_TOOL_JDK_NAME =JDK6
+INSTALL_TOOL_JDK_PATH =/usr/lib/jvm/java-6-sun-1.6.0.10
+# Correct location for maven 2
+INTALLA_TOOL_MAVEN_NAME =M9_HOME
+INTALLA_TOOL_MAVEN_PATH =/home/jomm/software/apache-maven-2.0.9
+# Not neccesary correct location
+INSTALL_VAR_NAME =JDK5
+INSTALL_VAR_VARIABLE_NAME =/usr/lib/jvm/java-5-sun-1.5.0.12
+INSTALL_VAR_PATH =JAVA5_HOME
+
+########################
+# buildEnvironment group 
+########################
+BUIL_ENV_NAME =APPLICATION_JDK4
+
+########################
+# buildTemplate group 
+########################
+TEMPLATE_NAME =PROJECT_MAVEN_TEMPLATE
+TEMPLATE_BUILD_POM_NAME =pom.xml
+TEMPLATE_BUILD_GOALS =test
+TEMPLATE_BUILD_ARGUMENTS =--batch-mode --non-recursive
+TEMPLATE_BUILD_DESCRIPTION =Template Maven Test
\ No newline at end of file

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml?rev=766453&r1=766452&r2=766453&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml Sun Apr 19 11:46:36 2009
@@ -20,7 +20,7 @@
 -->
 
 <suite name="ContinuumTest" verbose="1">
-	<test name="BasicTest">
+	<test name="BasicTest" enabled="true">
 		<!--
 			Groups are divided into the unit tests. The order will be described
 			in the annotations of each type of test.
@@ -30,29 +30,34 @@
 				<include name="about" />
 			</run>
 		</groups>
-
 		<packages>
 			<package name="org.apache.continuum.web.test" />
 		</packages>
 	</test>
-	<test name="AdminTest">
-
+	<test name="AdminTest" enabled="true">
 		<groups>
 			<run>
 				<include name="login" />
+				<include name="mavenTwoProject"/>								
+				<include name="projectGroup" />				
+                <include name="mavenOneProject" />
+                <!--
+                <include name="antProject" />
+                <include name="shellProject" />
+                -->
+                <include name="buildDefinition" />
+                <include name="notifier" />
+				<include name="schedule" />
 				<include name="myAccount" />
-				<include name="mavenTwoProject"/>
-				<include name="projectGroup" />
-				<include name="notifier" />
-				<include name="buildDefinition" />
 				<include name="queue" />
 				<include name="purge" />
 				<include name="repository" />
-				<include name="schedule" />
 				<include name="configuration" />
+				<include name="installation" />
+				<include name="buildEnvironment" />
+				<include name="buildDefinitionTemplate" />
 			</run>
 		</groups>
-
 		<packages>
 			<package name="org.apache.continuum.web.test" />
 		</packages>

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildDefinitionTemplateTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildDefinitionTemplateTest.java?rev=766453&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildDefinitionTemplateTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildDefinitionTemplateTest.java Sun Apr 19 11:46:36 2009
@@ -0,0 +1,229 @@
+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 AbstractBuildDefinitionTemplateTest
+    extends AbstractContinuumTest
+{
+    public void goToBuildDefinitionTemplatePage()
+    {
+        clickLinkWithText( "Build Definition Templates" );
+        assertBuildDefinitionTemplatePage();
+    }
+
+    public void assertBuildDefinitionTemplatePage()
+    {
+        assertPage( "Continuum - Build Definition Templates" );
+        assertTextPresent( "Available Templates" );
+        assertTextPresent( "Available Build Definitions" );
+        assertButtonWithIdPresent( "buildDefinitionTemplate_0" );
+        assertButtonWithIdPresent( "buildDefinitionAsTemplate_0" );
+    }
+
+    public void goToAddTemplate()
+    {
+        goToBuildDefinitionTemplatePage();
+        clickSubmitWithLocator( "buildDefinitionTemplate_0" );
+        String[] options =
+            new String[] { "--- Available Build Definitions ---", "Default Ant Build Definition",
+                "Default Maven 1 Build Definition", "Default Maven 2 Build Definition",
+                "Default Shell Build Definition"};
+        assertAddEditTemplatePage( options, null );
+    }
+
+    public void assertAddEditTemplatePage( String[] pendingSelectBuild, String[] selectedBuild )
+    {
+        assertPage( "Continuum - Build Definition Template" );
+        assertTextPresent( "Build Definition Template" );
+        assertTextPresent( "Name" );
+        assertElementPresent( "buildDefinitionTemplate.name" );
+        assertTextPresent( "Configure the used Build Definitions" );
+        if ( pendingSelectBuild != null && pendingSelectBuild.length > 0 )
+        {
+            assertOptionPresent( "buildDefinitionIds", pendingSelectBuild );
+        }
+        if ( selectedBuild != null && selectedBuild.length > 0 )
+        {
+            assertOptionPresent( "selectedBuildDefinitionIds", selectedBuild );
+        }
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void addEditTemplate( String name, String[] addBuildDefinitions, String[] removeBuildDefinitions,
+                                 boolean success )
+        throws Exception
+    {
+        setFieldValue( "buildDefinitionTemplate.name", name );
+        if ( addBuildDefinitions != null && addBuildDefinitions.length > 0 )
+        {
+            for ( String bd : addBuildDefinitions )
+            {
+                selectValue( "buildDefinitionIds", bd );
+                clickButtonWithValue( "->", false );
+            }
+        }
+        if ( removeBuildDefinitions != null && removeBuildDefinitions.length > 0 )
+        {
+            for ( String bd : removeBuildDefinitions )
+            {
+                selectValue( "selectedBuildDefinitionIds", bd );
+                clickButtonWithValue( "<-", false );
+            }
+        }
+        submit();
+        if ( success )
+        {
+            assertBuildDefinitionTemplatePage();
+        }
+        else
+        {
+            assertAddEditTemplatePage( null, null );
+        }
+    }
+
+    public void goToEditTemplate( String name, String[] buildDefinitions )
+    {
+        goToBuildDefinitionTemplatePage();
+        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Edit']";
+        clickLinkWithXPath( xPath );
+        assertAddEditTemplatePage( null, buildDefinitions );
+        assertFieldValue( name, "buildDefinitionTemplate.name" );
+    }
+
+    public void removeTemplate( String name )
+    {
+        goToBuildDefinitionTemplatePage();
+        clickLinkWithXPath( "(//a[contains(@href,'deleteDefinitionTemplate') and contains(@href, '" + name
+            + "')])//img" );
+        assertPage( "Continuum - Delete Build Definition Template" );
+        assertTextPresent( "Delete Build Definition Template" );
+        assertTextPresent( "Are you sure you want to delete build definition template \"" + name + "\"?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertBuildDefinitionTemplatePage();
+    }
+
+    public void goToAddBuildDefinitionTemplate()
+    {
+        goToBuildDefinitionTemplatePage();
+        clickSubmitWithLocator( "buildDefinitionAsTemplate_0" );
+        assertAddEditBuildDefinitionTemplatePage();
+    }
+
+    public void goToEditBuildDefinitionTemplate( String description )
+    {
+        goToBuildDefinitionTemplatePage();
+        String xPath = "//preceding::td[text()='" + description + "']//following::img[@alt='Edit']";
+        clickLinkWithXPath( xPath );
+        assertAddEditBuildDefinitionTemplatePage();
+    }
+
+    public void assertAddEditBuildDefinitionTemplatePage()
+    {
+        assertPage( "Continuum - Build Definition Template" );
+        assertTextPresent( "Build Definition Template" );
+        assertTextPresent( "POM filename*:" );
+        assertElementPresent( "buildDefinition.buildFile" );
+        assertTextPresent( "Goals:" );
+        assertElementPresent( "buildDefinition.goals" );
+        assertTextPresent( "Arguments:" );
+        assertElementPresent( "buildDefinition.arguments" );
+        assertTextPresent( "Build Fresh" );
+        assertElementPresent( "buildDefinition.buildFresh" );
+        assertTextPresent( "Always Build" );
+        assertElementPresent( "buildDefinition.alwaysBuild" );
+        assertTextPresent( "Is it default?" );
+        assertTextPresent( "Schedule:" );
+        assertElementPresent( "buildDefinition.schedule.id" );
+        assertTextPresent( "Description" );
+        assertElementPresent( "buildDefinition.description" );
+        assertTextPresent( "Type" );
+        assertElementPresent( "buildDefinition.type" );
+        assertTextPresent( "Build Environment" );
+        assertElementPresent( "buildDefinition.profile.id" );
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void addEditBuildDefinitionTemplate( String buildFile, String goals, String arguments, String description,
+                                                boolean buildFresh, boolean alwaysBuild, boolean isDefault,
+                                                boolean success )
+    {
+        // Enter values into Add Build Definition fields, and submit
+        setFieldValue( "buildDefinition.buildFile", buildFile );
+        setFieldValue( "buildDefinition.goals", goals );
+        setFieldValue( "buildDefinition.arguments", arguments );
+        setFieldValue( "buildDefinition.description", description );
+        if ( buildFresh )
+        {
+            checkField( "buildDefinition.buildFresh" );
+        }
+        else
+        {
+            uncheckField( "buildDefinition.buildFresh" );
+        }
+        if ( isDefault )
+        {
+            checkField( "buildDefinition.defaultForProject" );
+        }
+        else
+        {
+            uncheckField( "buildDefinition.defaultForProject" );
+        }
+        if ( alwaysBuild )
+        {
+            checkField( "buildDefinition.alwaysBuild" );
+        }
+        else
+        {
+            uncheckField( "buildDefinition.alwaysBuild" );
+        }
+        submit();
+        if ( success )
+        {
+            assertBuildDefinitionTemplatePage();
+        }
+        else
+        {
+            assertAddEditBuildDefinitionTemplatePage();
+        }
+    }
+
+    public void removeBuildDefinitionTemplate( String description )
+    {
+        goToBuildDefinitionTemplatePage();
+        String xPath = "//preceding::td[text()='" + description + "']//following::img[@alt='Delete']";
+        clickLinkWithXPath( xPath );
+        assertPage( "Continuum - Delete Build Definition Template" );
+        assertTextPresent( "Delete Build Definition Template" );
+        assertTextPresent( "Are you sure you want to delete build definition template \"" + description + "\"?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertBuildDefinitionTemplatePage();
+    }
+}

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

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

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

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildEnvironmentTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildEnvironmentTest.java?rev=766453&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildEnvironmentTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildEnvironmentTest.java Sun Apr 19 11:46:36 2009
@@ -0,0 +1,115 @@
+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 AbstractBuildEnvironmentTest
+    extends AbstractSeleniumTest
+{
+    public void goToBuildEnvironmentPage()
+    {
+        clickLinkWithText( "Build Environments" );
+        assertBuildEnvironmentPage();
+    }
+
+    public void assertBuildEnvironmentPage()
+    {
+        assertPage( "Continuum - Build Environments" );
+        assertTextPresent( "Build Environments" );
+        assertButtonWithValuePresent( "Add" );
+    }
+
+    public void goToAddBuildEnvironment()
+    {
+        goToBuildEnvironmentPage();
+        clickButtonWithValue( "Add" );
+        assertAddBuildEnvironmentPage();
+    }
+
+    public void assertAddBuildEnvironmentPage()
+    {
+        assertPage( "Continuum - Build Environment" );
+        assertTextPresent( "Build Environment" );
+        assertTextPresent( "Build Environment Name" );
+        assertElementPresent( "profile.name" );
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void assertEditBuildEnvironmentPage( String name )
+    {
+        assertAddBuildEnvironmentPage();
+        assertTextPresent( "Installation Name" );
+        assertTextPresent( "Type" );
+        assertFieldValue( name, "profile.name" );
+    }
+
+    public void addBuildEnvironment( String name, String[] installations, boolean success )
+    {
+        setFieldValue( "profile.name", name );
+        submit();
+        editBuildEnvironment( name, installations, success );
+    }
+
+    public void editBuildEnvironment( String name, String[] installations, boolean success )
+    {
+        setFieldValue( "profile.name", name );
+        for ( String i : installations )
+        {
+            selectValue( "installationId", i );
+            clickButtonWithValue( "Add" );
+        }
+        submit();
+        if ( success )
+        {
+            assertBuildEnvironmentPage();
+        }
+        else
+        {
+            assertAddBuildEnvironmentPage();
+        }
+    }
+
+    public void goToEditBuildEnvironment( String name )
+    {
+        goToBuildEnvironmentPage();
+        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Edit']";
+        clickLinkWithXPath( xPath );
+        assertEditBuildEnvironmentPage( name );
+    }
+
+    public void removeBuildEnvironment( String name )
+    {
+        goToBuildEnvironmentPage();
+        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Delete']";
+        clickLinkWithXPath( xPath );
+        assertPage( "Continuum - Delete Build Environment" );
+        assertTextPresent( "Delete Build Environment" );
+        assertTextPresent( "Are you sure you want to delete Build Environment \"" + name + "\" ?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertBuildEnvironmentPage();
+    }
+}

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

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

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

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildQueueTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildQueueTest.java?rev=766453&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildQueueTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildQueueTest.java Sun Apr 19 11:46:36 2009
@@ -0,0 +1,86 @@
+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 AbstractBuildQueueTest
+    extends AbstractContinuumTest
+{
+    public void goToBuildQueuePage()
+    {
+        clickLinkWithText( "Build Queue" );
+
+        assertBuildQueuePage();
+    }
+
+    public void assertBuildQueuePage()
+    {
+        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();
+        }
+    }
+}

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

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

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

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractConfigurationTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractConfigurationTest.java?rev=766453&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractConfigurationTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractConfigurationTest.java Sun Apr 19 11:46:36 2009
@@ -0,0 +1,94 @@
+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 AbstractConfigurationTest
+    extends AbstractContinuumTest
+{
+    public void goToConfigurationPage()
+    {
+        clickLinkWithText( "Configuration" );
+        assertEditConfigurationPage();
+    }
+
+    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();
+        }
+    }
+}

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

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

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



Re: svn commit: r766453 [1/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/

Posted by Marica Tan <ma...@gmail.com>.
No worries :) Thanks

2009/4/22 José Morales Martínez <jm...@gmv.com>

> Package is updated to 'test.parent'.
>
> Sorry, I had never find a problem like this.
>
> --------
> Jose
> ________________________________________
> De: Marica Tan [marica.tan@gmail.com]
> Enviado el: miércoles, 22 de abril de 2009 1:48
> Para: dev@continuum.apache.org
> Asunto: Re: svn commit: r766453 [1/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/
>
> 2009/4/19 <jm...@apache.org>
>
> > Author: jmorales
> > Date: Sun Apr 19 11:46:36 2009
> > New Revision: 766453
> >
> > URL: http://svn.apache.org/viewvc?rev=766453&view=rev
> > Log:
> > Commit related to issue 2073 (Selenium Test with TestNG)
> >
> > - Restructure source files and generate parent abstract classes.
> > - Create admin user when initialize DB
> > - Fixed bugs and modified old tags related i18n.
> > - Add new test about
> > intallations,buildEnvirotment,buildTemplate,mavenOne,shell,...
> > - MavenOne and MavenShell project not actived pending CONTINUUM-2083
> >
> > Added:
> >
> >
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/
>
>
> aux is a reserved word in Windows so we'll have a problem checking this out
> from Windows. Can you change it to another name?
>
>
> Thanks,
> --
> Marica
>
>
> ______________________
> Este mensaje, y en su caso, cualquier fichero anexo al mismo,
>  puede contener informacion clasificada por su emisor como confidencial
>  en el marco de su Sistema de Gestion de Seguridad de la
> Informacion siendo para uso exclusivo del destinatario, quedando
> prohibida su divulgacion copia o distribucion a terceros sin la
> autorizacion expresa del remitente. Si Vd. ha recibido este mensaje
>  erroneamente, se ruega lo notifique al remitente y proceda a su borrado.
> Gracias por su colaboracion.
> ______________________
> This message including any attachments may contain confidential
> information, according to our Information Security Management System,
>  and intended solely for a specific individual to whom they are addressed.
>  Any unauthorised copy, disclosure or distribution of this message
>  is strictly forbidden. If you have received this transmission in error,
>  please notify the sender immediately and delete it.
> ______________________
>

RE: svn commit: r766453 [1/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/

Posted by José Morales Martínez <jm...@gmv.com>.
Package is updated to 'test.parent'. 

Sorry, I had never find a problem like this.

--------
Jose
________________________________________
De: Marica Tan [marica.tan@gmail.com]
Enviado el: miércoles, 22 de abril de 2009 1:48
Para: dev@continuum.apache.org
Asunto: Re: svn commit: r766453 [1/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/

2009/4/19 <jm...@apache.org>

> Author: jmorales
> Date: Sun Apr 19 11:46:36 2009
> New Revision: 766453
>
> URL: http://svn.apache.org/viewvc?rev=766453&view=rev
> Log:
> Commit related to issue 2073 (Selenium Test with TestNG)
>
> - Restructure source files and generate parent abstract classes.
> - Create admin user when initialize DB
> - Fixed bugs and modified old tags related i18n.
> - Add new test about
> intallations,buildEnvirotment,buildTemplate,mavenOne,shell,...
> - MavenOne and MavenShell project not actived pending CONTINUUM-2083
>
> Added:
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/


aux is a reserved word in Windows so we'll have a problem checking this out
from Windows. Can you change it to another name?


Thanks,
--
Marica


______________________
Este mensaje, y en su caso, cualquier fichero anexo al mismo,
 puede contener informacion clasificada por su emisor como confidencial
 en el marco de su Sistema de Gestion de Seguridad de la 
Informacion siendo para uso exclusivo del destinatario, quedando 
prohibida su divulgacion copia o distribucion a terceros sin la 
autorizacion expresa del remitente. Si Vd. ha recibido este mensaje 
 erroneamente, se ruega lo notifique al remitente y proceda a su borrado. 
Gracias por su colaboracion.
______________________
This message including any attachments may contain confidential 
information, according to our Information Security Management System,
 and intended solely for a specific individual to whom they are addressed.
 Any unauthorised copy, disclosure or distribution of this message
 is strictly forbidden. If you have received this transmission in error,
 please notify the sender immediately and delete it.
______________________

Re: svn commit: r766453 [1/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/

Posted by Marica Tan <ma...@gmail.com>.
2009/4/19 <jm...@apache.org>

> Author: jmorales
> Date: Sun Apr 19 11:46:36 2009
> New Revision: 766453
>
> URL: http://svn.apache.org/viewvc?rev=766453&view=rev
> Log:
> Commit related to issue 2073 (Selenium Test with TestNG)
>
> - Restructure source files and generate parent abstract classes.
> - Create admin user when initialize DB
> - Fixed bugs and modified old tags related i18n.
> - Add new test about
> intallations,buildEnvirotment,buildTemplate,mavenOne,shell,...
> - MavenOne and MavenShell project not actived pending CONTINUUM-2083
>
> Added:
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/


aux is a reserved word in Windows so we'll have a problem checking this out
from Windows. Can you change it to another name?


Thanks,
--
Marica


>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildDefinitionTemplateTest.java
>   (with props)
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildEnvironmentTest.java
>   (with props)
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildQueueTest.java
>   (with props)
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractConfigurationTest.java
>   (with props)
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractContinuumTest.java
>      - copied, changed from r766328,
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractContinuumTest.java
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractInstallationTest.java
>   (with props)
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractLocalRepositoryTest.java
>   (with props)
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractNotifierTest.java
>   (with props)
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractPurgeTest.java
>   (with props)
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractScheduleTest.java
>   (with props)
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractSeleniumTest.java
>      - copied, changed from r766328,
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractSeleniumTest.java
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java
>   (with props)
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java
>   (with props)
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java
>   (with props)
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java
>   (with props)
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java
>   (with props)
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java
>   (with props)
> Removed:
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractContinuumTest.java
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractSeleniumTest.java
> Modified:
>
>  continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
>    continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java
>
>  continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java
>
> Modified:
> continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
> URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties?rev=766453&r1=766452&r2=766453&view=diff
>
> ==============================================================================
> ---
> continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
> (original)
> +++
> continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
> Sun Apr 19 11:46:36 2009
> @@ -4,11 +4,13 @@
>  # General properties
>  #######################
>
> -BASE_URL=http://localhost:9595/continuum
> +BASE_URL=http://localhost:9595/continuum/<http://localhost:9595/continuum%0A+BASE_URL=http://localhost:9595/continuum/>
>  MAX_WAIT_TIME_IN_MS=60000
>
>  ADMIN_USERNAME=admin
> +ADMIN_FULLNAME=admin
>  ADMIN_PASSWORD=admin123
> +ADMIN_MAIL=admin@mail.com
>
>  SELENIUM_HOST=localhost
>  SELENIUM_PORT=4444
> @@ -36,6 +38,46 @@
>  MISS_SUBPRO_POM_URL =
> http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-modules-pom.xml
>
>  ########################
> +# mavenOneProject group
> +########################
> +
> +# Properties for testAddMavenOneProject
> +M1_POM_URL =
> http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/valid-project.xml
> +M1_PROJ_GRP_NAME=Maven One Project
> +M1_PROJ_GRP_ID=maven-one-project
> +M1_PROJ_GRP_DESCRIPTION=This is a sample Maven One Project
> +M1_POM_USERNAME =
> +M1_POM_PASSWORD =
> +
> +M1_MISS_REPO_POM_URL =
> http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/missing-repository-element-project.xml
> +M1_EXTENDED_POM_URL =
> http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/extend-element-project.xml
> +M1_UNPARSEABLE_POM_URL =
> http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/unparseable-content-project.xml
> +
> +########################
> +# antProject group
> +########################
> +
> +ANT_NAME =Ant Project
> +ANT_DESCRIPTION =This is a sample Ant Project used for testing
> +ANT_VERSION =1.0.0-SNAPSHOT
> +ANT_TAG =
> +ANT_SCM_URL =
> http://svn.apache.org/repos/asf/ant/sandbox/parallelexecutor/
> +ANT_SCM_USERNAME =
> +ANT_SCM_PASSWORD =
> +
> +########################
> +# shellProject group
> +########################
> +
> +SHELL_NAME =Shell Project
> +SHELL_DESCRIPTION =This is a sample Shell Project used for testing
> +SHELL_VERSION =1.0.0-SNAPSHOT
> +SHELL_TAG =
> +SHELL_SCM_URL =
> http://svn.apache.org/repos/asf/continuum/sandbox/examples/shell/
> +SHELL_SCM_USERNAME =
> +SHELL_SCM_PASSWORD =
> +
> +########################
>  # projectGroup group
>  ########################
>  TEST_PROJ_GRP_NAME =Test Project Group Name
> @@ -109,8 +151,27 @@
>  ########################
>  # installations group
>  ########################
> -INSTALLATION_TOOL_NAME =JDK6
> -INSTALLATION_TOOL_PATH =/usr/lib/jvm/java-6-sun-1.6.0.10
> -INSTALLATION_ENV_NAME =jdk5
> -INSTALLATION_ENV_PATH =/usr/lib/jvm/java-5-sun-1.5.0.12
> -INSTALLATION_ENV_VAR_NAME =JAVA5_HOME
> \ No newline at end of file
> +# Correct location for JDK
> +INSTALL_TOOL_JDK_NAME =JDK6
> +INSTALL_TOOL_JDK_PATH =/usr/lib/jvm/java-6-sun-1.6.0.10
> +# Correct location for maven 2
> +INTALLA_TOOL_MAVEN_NAME =M9_HOME
> +INTALLA_TOOL_MAVEN_PATH =/home/jomm/software/apache-maven-2.0.9
> +# Not neccesary correct location
> +INSTALL_VAR_NAME =JDK5
> +INSTALL_VAR_VARIABLE_NAME =/usr/lib/jvm/java-5-sun-1.5.0.12
> +INSTALL_VAR_PATH =JAVA5_HOME
> +
> +########################
> +# buildEnvironment group
> +########################
> +BUIL_ENV_NAME =APPLICATION_JDK4
> +
> +########################
> +# buildTemplate group
> +########################
> +TEMPLATE_NAME =PROJECT_MAVEN_TEMPLATE
> +TEMPLATE_BUILD_POM_NAME =pom.xml
> +TEMPLATE_BUILD_GOALS =test
> +TEMPLATE_BUILD_ARGUMENTS =--batch-mode --non-recursive
> +TEMPLATE_BUILD_DESCRIPTION =Template Maven Test
> \ No newline at end of file
>
> Modified:
> continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml
> URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml?rev=766453&r1=766452&r2=766453&view=diff
>
> ==============================================================================
> --- continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml
> (original)
> +++ continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml
> Sun Apr 19 11:46:36 2009
> @@ -20,7 +20,7 @@
>  -->
>
>  <suite name="ContinuumTest" verbose="1">
> -       <test name="BasicTest">
> +       <test name="BasicTest" enabled="true">
>                <!--
>                        Groups are divided into the unit tests. The order
> will be described
>                        in the annotations of each type of test.
> @@ -30,29 +30,34 @@
>                                <include name="about" />
>                        </run>
>                </groups>
> -
>                <packages>
>                        <package name="org.apache.continuum.web.test" />
>                </packages>
>        </test>
> -       <test name="AdminTest">
> -
> +       <test name="AdminTest" enabled="true">
>                <groups>
>                        <run>
>                                <include name="login" />
> +                               <include name="mavenTwoProject"/>
> +                               <include name="projectGroup" />
> +                <include name="mavenOneProject" />
> +                <!--
> +                <include name="antProject" />
> +                <include name="shellProject" />
> +                -->
> +                <include name="buildDefinition" />
> +                <include name="notifier" />
> +                               <include name="schedule" />
>                                <include name="myAccount" />
> -                               <include name="mavenTwoProject"/>
> -                               <include name="projectGroup" />
> -                               <include name="notifier" />
> -                               <include name="buildDefinition" />
>                                <include name="queue" />
>                                <include name="purge" />
>                                <include name="repository" />
> -                               <include name="schedule" />
>                                <include name="configuration" />
> +                               <include name="installation" />
> +                               <include name="buildEnvironment" />
> +                               <include name="buildDefinitionTemplate" />
>                        </run>
>                </groups>
> -
>                <packages>
>                        <package name="org.apache.continuum.web.test" />
>                </packages>
>
> Added:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildDefinitionTemplateTest.java
> URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildDefinitionTemplateTest.java?rev=766453&view=auto
>
> ==============================================================================
> ---
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildDefinitionTemplateTest.java
> (added)
> +++
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildDefinitionTemplateTest.java
> Sun Apr 19 11:46:36 2009
> @@ -0,0 +1,229 @@
> +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 AbstractBuildDefinitionTemplateTest
> +    extends AbstractContinuumTest
> +{
> +    public void goToBuildDefinitionTemplatePage()
> +    {
> +        clickLinkWithText( "Build Definition Templates" );
> +        assertBuildDefinitionTemplatePage();
> +    }
> +
> +    public void assertBuildDefinitionTemplatePage()
> +    {
> +        assertPage( "Continuum - Build Definition Templates" );
> +        assertTextPresent( "Available Templates" );
> +        assertTextPresent( "Available Build Definitions" );
> +        assertButtonWithIdPresent( "buildDefinitionTemplate_0" );
> +        assertButtonWithIdPresent( "buildDefinitionAsTemplate_0" );
> +    }
> +
> +    public void goToAddTemplate()
> +    {
> +        goToBuildDefinitionTemplatePage();
> +        clickSubmitWithLocator( "buildDefinitionTemplate_0" );
> +        String[] options =
> +            new String[] { "--- Available Build Definitions ---", "Default
> Ant Build Definition",
> +                "Default Maven 1 Build Definition", "Default Maven 2 Build
> Definition",
> +                "Default Shell Build Definition"};
> +        assertAddEditTemplatePage( options, null );
> +    }
> +
> +    public void assertAddEditTemplatePage( String[] pendingSelectBuild,
> String[] selectedBuild )
> +    {
> +        assertPage( "Continuum - Build Definition Template" );
> +        assertTextPresent( "Build Definition Template" );
> +        assertTextPresent( "Name" );
> +        assertElementPresent( "buildDefinitionTemplate.name" );
> +        assertTextPresent( "Configure the used Build Definitions" );
> +        if ( pendingSelectBuild != null && pendingSelectBuild.length > 0 )
> +        {
> +            assertOptionPresent( "buildDefinitionIds", pendingSelectBuild
> );
> +        }
> +        if ( selectedBuild != null && selectedBuild.length > 0 )
> +        {
> +            assertOptionPresent( "selectedBuildDefinitionIds",
> selectedBuild );
> +        }
> +        assertButtonWithValuePresent( "Save" );
> +        assertButtonWithValuePresent( "Cancel" );
> +    }
> +
> +    public void addEditTemplate( String name, String[]
> addBuildDefinitions, String[] removeBuildDefinitions,
> +                                 boolean success )
> +        throws Exception
> +    {
> +        setFieldValue( "buildDefinitionTemplate.name", name );
> +        if ( addBuildDefinitions != null && addBuildDefinitions.length > 0
> )
> +        {
> +            for ( String bd : addBuildDefinitions )
> +            {
> +                selectValue( "buildDefinitionIds", bd );
> +                clickButtonWithValue( "->", false );
> +            }
> +        }
> +        if ( removeBuildDefinitions != null &&
> removeBuildDefinitions.length > 0 )
> +        {
> +            for ( String bd : removeBuildDefinitions )
> +            {
> +                selectValue( "selectedBuildDefinitionIds", bd );
> +                clickButtonWithValue( "<-", false );
> +            }
> +        }
> +        submit();
> +        if ( success )
> +        {
> +            assertBuildDefinitionTemplatePage();
> +        }
> +        else
> +        {
> +            assertAddEditTemplatePage( null, null );
> +        }
> +    }
> +
> +    public void goToEditTemplate( String name, String[] buildDefinitions )
> +    {
> +        goToBuildDefinitionTemplatePage();
> +        String xPath = "//preceding::td[text()='" + name +
> "']//following::img[@alt='Edit']";
> +        clickLinkWithXPath( xPath );
> +        assertAddEditTemplatePage( null, buildDefinitions );
> +        assertFieldValue( name, "buildDefinitionTemplate.name" );
> +    }
> +
> +    public void removeTemplate( String name )
> +    {
> +        goToBuildDefinitionTemplatePage();
> +        clickLinkWithXPath(
> "(//a[contains(@href,'deleteDefinitionTemplate') and contains(@href, '" +
> name
> +            + "')])//img" );
> +        assertPage( "Continuum - Delete Build Definition Template" );
> +        assertTextPresent( "Delete Build Definition Template" );
> +        assertTextPresent( "Are you sure you want to delete build
> definition template \"" + name + "\"?" );
> +        assertButtonWithValuePresent( "Delete" );
> +        assertButtonWithValuePresent( "Cancel" );
> +        clickButtonWithValue( "Delete" );
> +        assertBuildDefinitionTemplatePage();
> +    }
> +
> +    public void goToAddBuildDefinitionTemplate()
> +    {
> +        goToBuildDefinitionTemplatePage();
> +        clickSubmitWithLocator( "buildDefinitionAsTemplate_0" );
> +        assertAddEditBuildDefinitionTemplatePage();
> +    }
> +
> +    public void goToEditBuildDefinitionTemplate( String description )
> +    {
> +        goToBuildDefinitionTemplatePage();
> +        String xPath = "//preceding::td[text()='" + description +
> "']//following::img[@alt='Edit']";
> +        clickLinkWithXPath( xPath );
> +        assertAddEditBuildDefinitionTemplatePage();
> +    }
> +
> +    public void assertAddEditBuildDefinitionTemplatePage()
> +    {
> +        assertPage( "Continuum - Build Definition Template" );
> +        assertTextPresent( "Build Definition Template" );
> +        assertTextPresent( "POM filename*:" );
> +        assertElementPresent( "buildDefinition.buildFile" );
> +        assertTextPresent( "Goals:" );
> +        assertElementPresent( "buildDefinition.goals" );
> +        assertTextPresent( "Arguments:" );
> +        assertElementPresent( "buildDefinition.arguments" );
> +        assertTextPresent( "Build Fresh" );
> +        assertElementPresent( "buildDefinition.buildFresh" );
> +        assertTextPresent( "Always Build" );
> +        assertElementPresent( "buildDefinition.alwaysBuild" );
> +        assertTextPresent( "Is it default?" );
> +        assertTextPresent( "Schedule:" );
> +        assertElementPresent( "buildDefinition.schedule.id" );
> +        assertTextPresent( "Description" );
> +        assertElementPresent( "buildDefinition.description" );
> +        assertTextPresent( "Type" );
> +        assertElementPresent( "buildDefinition.type" );
> +        assertTextPresent( "Build Environment" );
> +        assertElementPresent( "buildDefinition.profile.id" );
> +        assertButtonWithValuePresent( "Save" );
> +        assertButtonWithValuePresent( "Cancel" );
> +    }
> +
> +    public void addEditBuildDefinitionTemplate( String buildFile, String
> goals, String arguments, String description,
> +                                                boolean buildFresh,
> boolean alwaysBuild, boolean isDefault,
> +                                                boolean success )
> +    {
> +        // Enter values into Add Build Definition fields, and submit
> +        setFieldValue( "buildDefinition.buildFile", buildFile );
> +        setFieldValue( "buildDefinition.goals", goals );
> +        setFieldValue( "buildDefinition.arguments", arguments );
> +        setFieldValue( "buildDefinition.description", description );
> +        if ( buildFresh )
> +        {
> +            checkField( "buildDefinition.buildFresh" );
> +        }
> +        else
> +        {
> +            uncheckField( "buildDefinition.buildFresh" );
> +        }
> +        if ( isDefault )
> +        {
> +            checkField( "buildDefinition.defaultForProject" );
> +        }
> +        else
> +        {
> +            uncheckField( "buildDefinition.defaultForProject" );
> +        }
> +        if ( alwaysBuild )
> +        {
> +            checkField( "buildDefinition.alwaysBuild" );
> +        }
> +        else
> +        {
> +            uncheckField( "buildDefinition.alwaysBuild" );
> +        }
> +        submit();
> +        if ( success )
> +        {
> +            assertBuildDefinitionTemplatePage();
> +        }
> +        else
> +        {
> +            assertAddEditBuildDefinitionTemplatePage();
> +        }
> +    }
> +
> +    public void removeBuildDefinitionTemplate( String description )
> +    {
> +        goToBuildDefinitionTemplatePage();
> +        String xPath = "//preceding::td[text()='" + description +
> "']//following::img[@alt='Delete']";
> +        clickLinkWithXPath( xPath );
> +        assertPage( "Continuum - Delete Build Definition Template" );
> +        assertTextPresent( "Delete Build Definition Template" );
> +        assertTextPresent( "Are you sure you want to delete build
> definition template \"" + description + "\"?" );
> +        assertButtonWithValuePresent( "Delete" );
> +        assertButtonWithValuePresent( "Cancel" );
> +        clickButtonWithValue( "Delete" );
> +        assertBuildDefinitionTemplatePage();
> +    }
> +}
>
> Propchange:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildDefinitionTemplateTest.java
>
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildDefinitionTemplateTest.java
>
> ------------------------------------------------------------------------------
>    svn:keywords = Author Date Id Revision
>
> Propchange:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildDefinitionTemplateTest.java
>
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
> Added:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildEnvironmentTest.java
> URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildEnvironmentTest.java?rev=766453&view=auto
>
> ==============================================================================
> ---
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildEnvironmentTest.java
> (added)
> +++
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildEnvironmentTest.java
> Sun Apr 19 11:46:36 2009
> @@ -0,0 +1,115 @@
> +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 AbstractBuildEnvironmentTest
> +    extends AbstractSeleniumTest
> +{
> +    public void goToBuildEnvironmentPage()
> +    {
> +        clickLinkWithText( "Build Environments" );
> +        assertBuildEnvironmentPage();
> +    }
> +
> +    public void assertBuildEnvironmentPage()
> +    {
> +        assertPage( "Continuum - Build Environments" );
> +        assertTextPresent( "Build Environments" );
> +        assertButtonWithValuePresent( "Add" );
> +    }
> +
> +    public void goToAddBuildEnvironment()
> +    {
> +        goToBuildEnvironmentPage();
> +        clickButtonWithValue( "Add" );
> +        assertAddBuildEnvironmentPage();
> +    }
> +
> +    public void assertAddBuildEnvironmentPage()
> +    {
> +        assertPage( "Continuum - Build Environment" );
> +        assertTextPresent( "Build Environment" );
> +        assertTextPresent( "Build Environment Name" );
> +        assertElementPresent( "profile.name" );
> +        assertButtonWithValuePresent( "Save" );
> +        assertButtonWithValuePresent( "Cancel" );
> +    }
> +
> +    public void assertEditBuildEnvironmentPage( String name )
> +    {
> +        assertAddBuildEnvironmentPage();
> +        assertTextPresent( "Installation Name" );
> +        assertTextPresent( "Type" );
> +        assertFieldValue( name, "profile.name" );
> +    }
> +
> +    public void addBuildEnvironment( String name, String[] installations,
> boolean success )
> +    {
> +        setFieldValue( "profile.name", name );
> +        submit();
> +        editBuildEnvironment( name, installations, success );
> +    }
> +
> +    public void editBuildEnvironment( String name, String[] installations,
> boolean success )
> +    {
> +        setFieldValue( "profile.name", name );
> +        for ( String i : installations )
> +        {
> +            selectValue( "installationId", i );
> +            clickButtonWithValue( "Add" );
> +        }
> +        submit();
> +        if ( success )
> +        {
> +            assertBuildEnvironmentPage();
> +        }
> +        else
> +        {
> +            assertAddBuildEnvironmentPage();
> +        }
> +    }
> +
> +    public void goToEditBuildEnvironment( String name )
> +    {
> +        goToBuildEnvironmentPage();
> +        String xPath = "//preceding::td[text()='" + name +
> "']//following::img[@alt='Edit']";
> +        clickLinkWithXPath( xPath );
> +        assertEditBuildEnvironmentPage( name );
> +    }
> +
> +    public void removeBuildEnvironment( String name )
> +    {
> +        goToBuildEnvironmentPage();
> +        String xPath = "//preceding::td[text()='" + name +
> "']//following::img[@alt='Delete']";
> +        clickLinkWithXPath( xPath );
> +        assertPage( "Continuum - Delete Build Environment" );
> +        assertTextPresent( "Delete Build Environment" );
> +        assertTextPresent( "Are you sure you want to delete Build
> Environment \"" + name + "\" ?" );
> +        assertButtonWithValuePresent( "Delete" );
> +        assertButtonWithValuePresent( "Cancel" );
> +        clickButtonWithValue( "Delete" );
> +        assertBuildEnvironmentPage();
> +    }
> +}
>
> Propchange:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildEnvironmentTest.java
>
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildEnvironmentTest.java
>
> ------------------------------------------------------------------------------
>    svn:keywords = Author Date Id Revision
>
> Propchange:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildEnvironmentTest.java
>
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
> Added:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildQueueTest.java
> URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildQueueTest.java?rev=766453&view=auto
>
> ==============================================================================
> ---
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildQueueTest.java
> (added)
> +++
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildQueueTest.java
> Sun Apr 19 11:46:36 2009
> @@ -0,0 +1,86 @@
> +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 AbstractBuildQueueTest
> +    extends AbstractContinuumTest
> +{
> +    public void goToBuildQueuePage()
> +    {
> +        clickLinkWithText( "Build Queue" );
> +
> +        assertBuildQueuePage();
> +    }
> +
> +    public void assertBuildQueuePage()
> +    {
> +        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();
> +        }
> +    }
> +}
>
> Propchange:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildQueueTest.java
>
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildQueueTest.java
>
> ------------------------------------------------------------------------------
>    svn:keywords = Author Date Id Revision
>
> Propchange:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractBuildQueueTest.java
>
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
> Added:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractConfigurationTest.java
> URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractConfigurationTest.java?rev=766453&view=auto
>
> ==============================================================================
> ---
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractConfigurationTest.java
> (added)
> +++
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractConfigurationTest.java
> Sun Apr 19 11:46:36 2009
> @@ -0,0 +1,94 @@
> +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 AbstractConfigurationTest
> +    extends AbstractContinuumTest
> +{
> +    public void goToConfigurationPage()
> +    {
> +        clickLinkWithText( "Configuration" );
> +        assertEditConfigurationPage();
> +    }
> +
> +    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();
> +        }
> +    }
> +}
>
> Propchange:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractConfigurationTest.java
>
> ------------------------------------------------------------------------------
>    svn:eol-style = native
>
> Propchange:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractConfigurationTest.java
>
> ------------------------------------------------------------------------------
>    svn:keywords = Author Date Id Revision
>
> Propchange:
> continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/aux/test/AbstractConfigurationTest.java
>
> ------------------------------------------------------------------------------
>    svn:mime-type = text/plain
>
>
>