continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1372239 - in /continuum/trunk/continuum-webapp-test/src/test: resources/ testng/org/apache/continuum/web/test/ testng/org/apache/continuum/web/test/listener/ testng/org/apache/continuum/web/test/parent/
Date Mon, 13 Aug 2012 01:42:39 GMT
Author: brett
Date: Mon Aug 13 01:42:39 2012
New Revision: 1372239

URL: http://svn.apache.org/viewvc?rev=1372239&view=rev
Log:
revise distributed release test group to avoid reusing existing test group

Removed:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractReleaseTest.java
Modified:
    continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedBuildTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.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/ReleaseTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.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=1372239&r1=1372238&r2=1372239&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Mon Aug 13
01:42:39 2012
@@ -14,10 +14,10 @@ ADMIN_MAIL=admin@mail.com
 
 # Maven 2 projects to load
 
-M2_POM_URL=http://localhost:9595/example-projects/continuum-build-queue-test-data/pom.xml
-M2_POM_USERNAME=
-M2_POM_PASSWORD=
-M2_PROJECT_NAME=ContinuumBuildQueueTestData
+MAVEN2_POM_URL=http://localhost:9595/example-projects/simple-example/pom.xml
+MAVEN2_POM_USERNAME=
+MAVEN2_POM_PASSWORD=
+MAVEN2_PROJECT_NAME=Continuum Simple Example Project
 
 # Ant projects to load
 
@@ -31,9 +31,9 @@ ANT_SCM_PASSWORD=
 
 # Maven 1 projects to load
 
-M1_POM_URL=http://localhost:9595/example-projects/maven-one-projects/valid-project.xml
-M1_POM_USERNAME=
-M1_POM_PASSWORD=
+MAVEN1_POM_URL=http://localhost:9595/example-projects/maven-one-projects/valid-project.xml
+MAVEN1_POM_USERNAME=
+MAVEN1_POM_PASSWORD=
 
 
 ### The following properties should not be shared across groups ###
@@ -58,13 +58,13 @@ WAGON_SERVER_ID=wagoId
 
 # Maven 1 test properties
 
-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_MISS_REPO_POM_URL=http://localhost:9595/example-projects/maven-one-projects/missing-repository-element-project.xml
-M1_EXTENDED_POM_URL=http://localhost:9595/example-projects/maven-one-projects/extend-element-project.xml
-M1_UNPARSEABLE_POM_URL=http://localhost:9595/example-projects/maven-one-projects/unparseable-content-project.xml
+MAVEN1_PROJECT_GROUP_NAME=Maven One Project
+MAVEN1_PROJECT_GROUP_ID=maven-one-project
+MAVEN1_PROJECT_GROUP_DESCRIPTION=This is a sample Maven One Project
+
+MAVEN1_MISSING_REPO_POM_URL=http://localhost:9595/example-projects/maven-one-projects/missing-repository-element-project.xml
+MAVEN1_EXTENDED_POM_URL=http://localhost:9595/example-projects/maven-one-projects/extend-element-project.xml
+MAVEN1_UNPARSEABLE_POM_URL=http://localhost:9595/example-projects/maven-one-projects/unparseable-content-project.xml
 
 # Ant test properties
 
@@ -72,6 +72,16 @@ ANT_PROJECT_GROUP_NAME=Ant Project Group
 ANT_PROJECT_GROUP_ID=com.example.ant
 ANT_PROJECT_GROUP_DESCRIPTION=Group for Ant test projects
 
+# Release test properties
+
+RELEASE_PROJECT_GROUP_NAME=Distributed Release Test Project Group
+RELEASE_PROJECT_GROUP_ID=com.example.release
+RELEASE_PROJECT_TAGBASE=scm:svn:${svn.base.url}/tags
+RELEASE_PROJECT_TAG=simple-example-1.0
+RELEASE_PROJECT_VERSION=1.0
+RELEASE_PROJECT_DEVELOPMENT_VERSION=1.1-SNAPSHOT
+RELEASE_PROJECT_SCM_URL=scm:svn:${svn.base.url}/trunk/simple-example
+
 #####
 
 DEFAULT_PROJ_GRP_NAME=Default Project Group
@@ -83,6 +93,9 @@ DEFAULT_PROJ_GRP_DESCRIPTION=Contains al
 ########################
 
 # Properties for testAddMavenTwoProject
+M2_POM_URL=http://localhost:9595/example-projects/continuum-build-queue-test-data/pom.xml
+M2_POM_USERNAME=
+M2_POM_PASSWORD=
 M2_PROJ_GRP_NAME=ContinuumBuildQueueTestData
 M2_PROJ_GRP_ID=org.apache.continuum
 M2_PROJ_GRP_DESCRIPTION=Project for testing continuum build queue
@@ -92,12 +105,6 @@ M2_PROJ_GRP_SCM_ROOT_URL=scm:svn:${svn.b
 M2_DELETE_POM_URL=http://localhost:9595/example-projects/simple-example/pom.xml
 M2_DELETE_PROJ_GRP_NAME=Continuum Simple Example Project
 M2_DELETE_PROJ_GRP_ID=org.apache.continuum.examples.simple
-M2_DELETE_PROJ_GRP_SCM_ROOT_URL=scm:svn:${svn.base.url}/trunk/simple-example
-M2_DELETE_PROJ_TAGBASE=scm:svn:${svn.base.url}/tags
-M2_DELETE_PROJ_TAG=simple-example-1.0
-M2_DELETE_PROJ_RELEASE_VERSION=1.0
-M2_DELETE_PROJ_DEVELOPMENT_VERSION=1.1-SNAPSHOT
-M2_DELETE_PROJ_TAGBASE_PERFORM=http://localhost:9595/example-projects/tags
 
 # SCM element is missing from pom
 NOT_SCM_POM_URL=http://localhost:9595/example-projects/maven-two-projects/missing-scm-element-pom.xml

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedBuildTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedBuildTest.java?rev=1372239&r1=1372238&r2=1372239&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedBuildTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedBuildTest.java
Mon Aug 13 01:42:39 2012
@@ -34,7 +34,6 @@ import org.testng.annotations.Test;
 public class DistributedBuildTest
     extends AbstractBuildAgentsTest
 {
-
     private String projectGroupName;
 
     @BeforeMethod
@@ -93,22 +92,12 @@ public class DistributedBuildTest
 
         addMavenTwoProject( getProperty( "M2_DELETE_POM_URL" ), getProperty( "M2_POM_USERNAME"
),
                             getProperty( "M2_POM_PASSWORD" ), null, true );
-        goToProjectGroupsSummaryPage();
-        assertLinkPresent( M2_PROJ_GRP_NAME );
-        clickLinkWithText( M2_PROJ_GRP_NAME );
-
-        assertPage( "Continuum - Project Group" );
-
-        showProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, "" );
-        clickButtonWithValue( "Build all projects" );
 
         buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, "", M2_PROJ_GRP_NAME, true );
-
-        removeProjectGroup( M2_PROJ_GRP_NAME );
-        assertLinkNotPresent( M2_PROJ_GRP_NAME );
     }
 
-    @Test( dependsOnMethods = { "testAddBuildAgentGroupWithEmptyBuildAgent", "testAddBuildEnvironmentWithBuildAgentGroup"
} )
+    @Test( dependsOnMethods = { "testAddBuildAgentGroupWithEmptyBuildAgent",
+        "testAddBuildEnvironmentWithBuildAgentGroup" } )
     public void testProjectGroupNoBuildAgentConfiguredInBuildAgentGroup()
         throws Exception
     {
@@ -136,9 +125,6 @@ public class DistributedBuildTest
         clickButtonWithValue( "Build all projects" );
 
         assertTextPresent( "Unable to build projects because no build agent is configured
in the build agent group" );
-
-        removeProjectGroup( M2_PROJ_GRP_NAME );
-        assertLinkNotPresent( M2_PROJ_GRP_NAME );
     }
 
     public void testBuildMaven2ProjectWithTagDistributedBuild()
@@ -147,7 +133,7 @@ public class DistributedBuildTest
         String M2_POM_URL = getProperty( "M2_PROJ_WITH_TAG_POM_URL" );
         String M2_POM_USERNAME = getProperty( "M2_POM_USERNAME" );
         String M2_POM_PASSWORD = getProperty( "M2_POM_PASSWORD" );
-    
+
         String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_WITH_TAG_PROJ_GRP_NAME" );
         String M2_PROJ_GRP_ID = getProperty( "M2_PROJ_WITH_TAG_PROJ_GRP_ID" );
         String M2_PROJ_GRP_DESCRIPTION = "";
@@ -184,8 +170,8 @@ public class DistributedBuildTest
         addBuildAgent( getBuildAgentUrl() );
 
         goToAddShellProjectPage();
-        addProject( SHELL_NAME, SHELL_DESCRIPTION, SHELL_VERSION, SHELL_SCM_URL, SHELL_SCM_USERNAME,
-                    SHELL_SCM_PASSWORD, SHELL_TAG, SHELL_GROUP_NAME, true, "shell" );
+        addProject( SHELL_NAME, SHELL_DESCRIPTION, SHELL_VERSION, SHELL_SCM_URL, SHELL_SCM_USERNAME,
SHELL_SCM_PASSWORD,
+                    SHELL_TAG, SHELL_GROUP_NAME, true, "shell" );
         assertProjectGroupSummaryPage( SHELL_GROUP_NAME, SHELL_GROUP_ID, SHELL_GROUP_DESC
);
 
         goToProjectGroupsSummaryPage();
@@ -195,9 +181,7 @@ public class DistributedBuildTest
 
         editBuildDefinitionShellType();
 
-        goToProjectGroupsSummaryPage();
-
-        buildProjectGroup( SHELL_GROUP_NAME ,SHELL_GROUP_ID , SHELL_GROUP_DESC ,SHELL_NAME,
true );
+        buildProjectGroup( SHELL_GROUP_NAME, SHELL_GROUP_ID, SHELL_GROUP_DESC, SHELL_NAME,
true );
 
     }
 

Modified: 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=1372239&r1=1372238&r2=1372239&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java
Mon Aug 13 01:42:39 2012
@@ -60,16 +60,16 @@ public class MavenOneProjectTest
     protected void setUp()
         throws Exception
     {
-        pomUrl = getProperty( "M1_POM_URL" );
-        pomUsername = getProperty( "M1_POM_USERNAME" );
-        pomPassword = getProperty( "M1_POM_PASSWORD" );
-        projectGroupName = getProperty( "M1_PROJ_GRP_NAME" );
-        projectGroupId = getProperty( "M1_PROJ_GRP_ID" );
-        projectGroupDescription = getProperty( "M1_PROJ_GRP_DESCRIPTION" );
-
-        pomUrlMissingElement = getProperty( "M1_MISS_REPO_POM_URL" );
-        pomUrlWithExtend = getProperty( "M1_EXTENDED_POM_URL" );
-        pomUrlUnparseableContent = getProperty( "M1_UNPARSEABLE_POM_URL" );
+        pomUrl = getProperty( "MAVEN1_POM_URL" );
+        pomUsername = getProperty( "MAVEN1_POM_USERNAME" );
+        pomPassword = getProperty( "MAVEN1_POM_PASSWORD" );
+        projectGroupName = getProperty( "MAVEN1_PROJECT_GROUP_NAME" );
+        projectGroupId = getProperty( "MAVEN1_PROJECT_GROUP_ID" );
+        projectGroupDescription = getProperty( "MAVEN1_PROJECT_GROUP_DESCRIPTION" );
+
+        pomUrlMissingElement = getProperty( "MAVEN1_MISSING_REPO_POM_URL" );
+        pomUrlWithExtend = getProperty( "MAVEN1_EXTENDED_POM_URL" );
+        pomUrlUnparseableContent = getProperty( "MAVEN1_UNPARSEABLE_POM_URL" );
 
         malformedPomUrl = "aaa";
         inaccessiblePomUrl = "http://localhost:9595/";

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=1372239&r1=1372238&r2=1372239&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
Mon Aug 13 01:42:39 2012
@@ -71,10 +71,10 @@ public class NotifierTest
         projectGroupId = getProperty( "NOTIFIER_PROJECT_GROUP_ID" );
         projectGroupDescription = getProperty( "NOTIFIER_PROJECT_GROUP_DESCRIPTION" );
 
-        projectName = getProperty( "M2_PROJECT_NAME" );
-        String projectPomUrl = getProperty( "M2_POM_URL" );
-        String pomUsername = getProperty( "M2_POM_USERNAME" );
-        String pomPassword = getProperty( "M2_POM_PASSWORD" );
+        projectName = getProperty( "MAVEN2_PROJECT_NAME" );
+        String projectPomUrl = getProperty( "MAVEN2_POM_URL" );
+        String pomUsername = getProperty( "MAVEN2_POM_USERNAME" );
+        String pomPassword = getProperty( "MAVEN2_POM_PASSWORD" );
 
         loginAsAdmin();
         addProjectGroup( projectGroupName, projectGroupId, projectGroupDescription, true,
false );

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java?rev=1372239&r1=1372238&r2=1372239&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java
Mon Aug 13 01:42:39 2012
@@ -19,313 +19,394 @@ package org.apache.continuum.web.test;
  * under the License.
  */
 
-import org.apache.continuum.web.test.parent.AbstractReleaseTest;
+import org.apache.continuum.web.test.parent.AbstractAdminTest;
+import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
+import java.io.BufferedReader;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.Arrays;
 
 @Test( groups = { "release" } )
 public class ReleaseTest
-    extends AbstractReleaseTest
+    extends AbstractAdminTest
 {
-    @Test( dependsOnMethods = { "testProjectGroupAllBuildSuccessWithDistributedBuilds" }
)
-    public void testReleasePrepareProjectWithInvalidUsernamePasswordInDistributedBuilds()
-        throws Exception
+    private String projectGroupName;
+
+    private String projectGroupId;
+
+    private String releaseBuildEnvironment;
+
+    private String releaseBuildAgentGroup;
+
+    private String tagBase;
+
+    private String tag;
+
+    private String releaseVersion;
+
+    private String developmentVersion;
+
+    private String errorMessageNoAgent;
+
+    private String releaseProjectScmUrl;
+
+    @BeforeClass
+    public void createAndBuildProject()
     {
-        String M2_PROJ_GRP_NAME = getProperty( "M2_DELETE_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_ID = getProperty( "M2_DELETE_PROJ_GRP_ID" );
+        projectGroupName = getProperty( "RELEASE_PROJECT_GROUP_NAME" );
+        projectGroupId = getProperty( "RELEASE_PROJECT_GROUP_ID" );
+        String description = "Distributed Release test projects";
+
+        loginAsAdmin();
 
-        String M2_PROJ_USERNAME = "invalid";
-        String M2_PROJ_PASSWORD = "invalid";
-        String M2_PROJ_TAGBASE = getProperty( "M2_DELETE_PROJ_TAGBASE" );
-        String M2_PROJ_TAG = getProperty( "M2_DELETE_PROJ_TAG" );
-        String M2_PROJ_RELEASE_VERSION = getProperty( "M2_DELETE_PROJ_RELEASE_VERSION" );
-        String M2_PROJ_DEVELOPMENT_VERSION = getProperty( "M2_DELETE_PROJ_DEVELOPMENT_VERSION"
);
+        enableDistributedBuilds();
 
-        init();
+        addBuildAgent( getBuildAgentUrl() );
 
-        try
+        String pomUrl = getProperty( "MAVEN2_POM_URL" );
+        String pomUsername = getProperty( "MAVEN2_POM_USERNAME" );
+        String pomPassword = getProperty( "MAVEN2_POM_PASSWORD" );
+        String projectName = getProperty( "MAVEN2_PROJECT_NAME" );
+
+        addProjectGroup( projectGroupName, projectGroupId, description, true, false );
+        clickLinkWithText( projectGroupName );
+
+        if ( !isLinkPresent( projectName ) )
         {
-            enableDistributedBuilds();
-        
-            String M2_PROJECT_BUILD_ENV = getProperty( "M2_RELEASE_BUILD_ENV" );
-            createBuildEnvAndBuildagentGroup();
-            
-            showProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, "" );
-            clickButtonWithValue( "Release" );
-            assertReleaseSuccess();
-            releasePrepareProject( M2_PROJ_USERNAME, M2_PROJ_PASSWORD, M2_PROJ_TAGBASE, M2_PROJ_TAG,
-                                   M2_PROJ_RELEASE_VERSION, M2_PROJ_DEVELOPMENT_VERSION,
M2_PROJECT_BUILD_ENV );
-            assertPreparedReleasesFileCreated();
+            addMavenTwoProject( pomUrl, pomUsername, pomPassword, projectGroupName, true
);
+
+            buildProjectGroup( projectGroupName, projectGroupId, "", projectName, true );
         }
-        finally
+    }
+
+    @BeforeMethod
+    public void setUp()
+        throws IOException
+    {
+        releaseBuildEnvironment = getProperty( "M2_RELEASE_BUILD_ENV" );
+        releaseBuildAgentGroup = getProperty( "M2_RELEASE_AGENT_GROUP" );
+        tagBase = getProperty( "RELEASE_PROJECT_TAGBASE" );
+        tag = getProperty( "RELEASE_PROJECT_TAG" );
+        releaseVersion = getProperty( "RELEASE_PROJECT_VERSION" );
+        developmentVersion = getProperty( "RELEASE_PROJECT_DEVELOPMENT_VERSION" );
+        releaseProjectScmUrl = getProperty( "RELEASE_PROJECT_SCM_URL" );
+        errorMessageNoAgent = getProperty( "M2_RELEASE_NO_AGENT_MESSAGE" );
+
+        File file = new File( "target/conf/prepared-releases.xml" );
+
+        if ( file.exists() && !file.delete() )
         {
-            disableDistributedBuilds();
+            throw new IOException( "Unable to delete existing prepared-releases.xml file"
);
         }
+
+        enableDistributedBuilds();
+
+        addBuildAgent( getBuildAgentUrl() );
+
+        createBuildEnvAndBuildagentGroup( releaseBuildEnvironment, releaseBuildAgentGroup
);
+    }
+
+    @AfterMethod
+    public void tearDown()
+        throws Exception
+    {
+        removeBuildagentGroupFromBuildEnv( releaseBuildAgentGroup );
+
+        disableDistributedBuilds();
     }
-    
+
+    public void testReleasePrepareProjectWithInvalidUsernamePasswordInDistributedBuilds()
+        throws Exception
+    {
+        String releaseUsername = "invalid";
+        String releasePassword = "invalid";
+
+        showProjectGroup( projectGroupName, projectGroupId, "" );
+        clickButtonWithValue( "Release" );
+        assertReleaseSuccess();
+        releasePrepareProject( releaseUsername, releasePassword, tagBase, tag, releaseVersion,
developmentVersion,
+                               releaseBuildEnvironment, true );
+        assertPreparedReleasesFileCreated();
+    }
+
     /*
      * Test release prepare with no build agent configured in the selected build environment.
      */
-    @Test( dependsOnMethods = { "testReleasePrepareProjectWithInvalidUsernamePasswordInDistributedBuilds"
} )
     public void testReleasePrepareProjectWithNoBuildagentInBuildEnvironment()
         throws Exception
     {
-        String M2_PROJECT_POM_URL = getProperty( "M2_RELEASE_POM_URL" );
-        String M2_PROJECT_NAME = getProperty( "M2_RELEASE_PROJECT_NAME" );
-        String M2_PROJECT_GROUP_NAME = getProperty( "M2_RELEASE_GRP_NAME" );
-        String M2_PROJECT_GROUP_ID = getProperty( "M2_RELEASE_GRP_ID" );
-        String M2_PROJECT_DESCRIPTION = getProperty( "M2_RELEASE_GRP_DESCRIPTION" );
-        String M2_PROJECT_TAGBASE = getProperty( "M2_RELEASE_TAGBASE_URL" );
-        String M2_PROJECT_TAG = getProperty( "M2_RELEASE_TAG" );
-        String M2_PROJECT_RELEASE_VERSION = getProperty( "M2_RELEASE_RELEASE_VERSION" );
-        String M2_PROJECT_DEVELOPMENT_VERSION = getProperty( "M2_RELEASE_DEVELOPMENT_VERSION"
);
-        String ERROR_TEXT = getProperty( "M2_RELEASE_NO_AGENT_MESSAGE" );
-        
-        addProjectGroup( M2_PROJECT_GROUP_NAME, M2_PROJECT_GROUP_ID, M2_PROJECT_DESCRIPTION,
true );
-        addMavenTwoProject( M2_PROJECT_POM_URL, "", "", M2_PROJECT_GROUP_NAME, true );
+        detachBuildagentFromGroup( releaseBuildAgentGroup );
 
-        init();
+        showProjectGroup( projectGroupName, projectGroupId, projectGroupId );
 
-        try
-        {
-            enableDistributedBuilds();
-        
-            String M2_PROJECT_BUILD_ENV = getProperty( "M2_RELEASE_BUILD_ENV" );
-            createBuildEnvAndBuildagentGroup();
-            detachBuildagentFromGroup();
-            
-            buildProjectGroup( M2_PROJECT_GROUP_NAME, M2_PROJECT_GROUP_ID, M2_PROJECT_DESCRIPTION,
M2_PROJECT_NAME, true );
-            
-            clickButtonWithValue( "Release" );
-            assertReleaseSuccess();
-            releasePrepareProject( "", "", M2_PROJECT_TAGBASE, M2_PROJECT_TAG, M2_PROJECT_RELEASE_VERSION,
-                                   M2_PROJECT_DEVELOPMENT_VERSION, M2_PROJECT_BUILD_ENV );
-            
-            assertTextPresent( "Release Error" );
-            assertTextPresent( ERROR_TEXT );
-        }
-        finally
-        {
-            attachBuildagentInGroup();
-            disableDistributedBuilds();
-        }
+        clickButtonWithValue( "Release" );
+        assertReleaseSuccess();
+        releasePrepareProject( "", "", tagBase, tag, releaseVersion, developmentVersion,
releaseBuildEnvironment,
+                               false );
+
+        assertTextPresent( errorMessageNoAgent );
     }
-    
+
     /*
-     * Test release prepare with no build agent group in the selected build environment.
-     */
-    @Test( dependsOnMethods = { "testReleasePrepareProjectWithNoBuildagentInBuildEnvironment"
} )
+    * Test release prepare with no build agent group in the selected build environment.
+    */
     public void testReleasePrepareProjectWithNoBuildagentGroupInBuildEnvironment()
         throws Exception
     {
-        String M2_PROJECT_GROUP_NAME = getProperty( "M2_RELEASE_GRP_NAME" );
-        String M2_PROJECT_GROUP_ID = getProperty( "M2_RELEASE_GRP_ID" );
-        String M2_PROJECT_TAGBASE = getProperty( "M2_RELEASE_TAGBASE_URL" );
-        String M2_PROJECT_TAG = getProperty( "M2_RELEASE_TAG" );
-        String M2_PROJECT_RELEASE_VERSION = getProperty( "M2_RELEASE_RELEASE_VERSION" );
-        String M2_PROJECT_DEVELOPMENT_VERSION = getProperty( "M2_RELEASE_DEVELOPMENT_VERSION"
);
-        String ERROR_TEXT = getProperty( "M2_RELEASE_NO_AGENT_MESSAGE" );
+        removeBuildagentGroupFromBuildEnv( releaseBuildEnvironment );
 
-        init();
+        showProjectGroup( projectGroupName, projectGroupId, projectGroupId );
 
-        try
-        {
-            enableDistributedBuilds();
-            
-            String M2_PROJECT_BUILD_ENV = getProperty( "M2_RELEASE_BUILD_ENV" );
-            createBuildEnvAndBuildagentGroup();
-            removeBuildagentGroupFromBuildEnv();
-            
-            showProjectGroup( M2_PROJECT_GROUP_NAME, M2_PROJECT_GROUP_ID, M2_PROJECT_GROUP_ID
);
-            
-            clickButtonWithValue( "Release" );
-            assertReleaseSuccess();
-            releasePrepareProject( "", "", M2_PROJECT_TAGBASE, M2_PROJECT_TAG, M2_PROJECT_RELEASE_VERSION,
-                                   M2_PROJECT_DEVELOPMENT_VERSION, M2_PROJECT_BUILD_ENV );
-            
-            assertTextPresent( "Release Error" );
-            assertTextPresent( ERROR_TEXT );
-        }
-        finally
-        {
-            attachBuildagentGroupToBuildEnv();
-            disableDistributedBuilds();
-        }
+        clickButtonWithValue( "Release" );
+        assertReleaseSuccess();
+        releasePrepareProject( "", "", tagBase, tag, releaseVersion, developmentVersion,
releaseBuildEnvironment,
+                               false );
+
+        assertTextPresent( errorMessageNoAgent );
     }
-    
+
     /*
-     * Test release prepare with no build environment selected.
-     */
-    @Test( dependsOnMethods = { "testReleasePrepareProjectWithNoBuildagentGroupInBuildEnvironment"
} )
+    * Test release prepare with no build environment selected.
+    */
     public void testReleasePrepareProjectWithNoBuildEnvironment()
         throws Exception
     {
-        String M2_PROJECT_GROUP_NAME = getProperty( "M2_RELEASE_GRP_NAME" );
-        String M2_PROJECT_GROUP_ID = getProperty( "M2_RELEASE_GRP_ID" );
-        String M2_PROJECT_TAGBASE = getProperty( "M2_RELEASE_TAGBASE_URL" );
-        String M2_PROJECT_TAG = getProperty( "M2_RELEASE_TAG" );
-        String M2_PROJECT_RELEASE_VERSION = getProperty( "M2_RELEASE_RELEASE_VERSION" );
-        String M2_PROJECT_DEVELOPMENT_VERSION = getProperty( "M2_RELEASE_DEVELOPMENT_VERSION"
);
-        String ERROR_TEXT = getProperty( "M2_RELEASE_NO_AGENT_MESSAGE" );
+        showProjectGroup( projectGroupName, projectGroupId, projectGroupId );
 
-        init();
+        clickButtonWithValue( "Release" );
+        assertReleaseSuccess();
+        releasePrepareProject( "", "", tagBase, tag, releaseVersion, developmentVersion,
"", true );
 
-        try
-        {
-            enableDistributedBuilds();
-            
-            showProjectGroup( M2_PROJECT_GROUP_NAME, M2_PROJECT_GROUP_ID, M2_PROJECT_GROUP_ID
);
-            
-            clickButtonWithValue( "Release" );
-            assertReleaseSuccess();
-            releasePrepareProject( "", "", M2_PROJECT_TAGBASE, M2_PROJECT_TAG, M2_PROJECT_RELEASE_VERSION,
-                                   M2_PROJECT_DEVELOPMENT_VERSION, "" );
-            
-            assertTextPresent( "Release Error" );
-            assertTextPresent( ERROR_TEXT );
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
+        assertPreparedReleasesFileCreated();
     }
 
     @Test( dependsOnMethods = { "testReleasePrepareProjectWithNoBuildEnvironment" } )
-    public void testReleasePerformUsingProvideParamtersWithDistributedBuilds()
+    public void testReleasePerformUsingProvidedParametersWithDistributedBuilds()
         throws Exception
     {
-        String M2_PROJ_GRP_NAME = getProperty( "M2_DELETE_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_ID = getProperty( "M2_DELETE_PROJ_GRP_ID" );
-
-        String M2_PROJ_USERNAME = "invalid";
-        String M2_PROJ_PASSWORD = "invalid";
-        String M2_PROJ_TAGBASE = getProperty( "M2_DELETE_PROJ_TAGBASE_PERFORM" );
-        String M2_PROJ_TAG = getProperty( "M2_DELETE_PROJ_TAG" );
-        String M2_PROJ_SCM_URL = getProperty( "M2_DELETE_PROJ_GRP_SCM_ROOT_URL" );
-
-        init();
-        
-        try
-        {
-            enableDistributedBuilds();
-        
-            String M2_PROJECT_BUILD_ENV = getProperty( "M2_RELEASE_BUILD_ENV" );
-            createBuildEnvAndBuildagentGroup();
-            
-            showProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, "" );
-            clickButtonWithValue( "Release" );
-            assertReleaseSuccess();
-            releasePerformProjectWithProvideParameters( M2_PROJ_USERNAME, M2_PROJ_PASSWORD,
M2_PROJ_TAGBASE, M2_PROJ_TAG, 
-                                                        M2_PROJ_SCM_URL, M2_PROJECT_BUILD_ENV
);
-            assertPreparedReleasesFileCreated();
+        String releaseUsername = "invalid";
+        String releasePassword = "invalid";
 
-            removeProjectGroup( M2_PROJ_GRP_NAME );
-            assertLinkNotPresent( M2_PROJ_GRP_NAME );
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
+        showProjectGroup( projectGroupName, projectGroupId, "" );
+        clickButtonWithValue( "Release" );
+        assertReleaseSuccess();
+        releasePerformProjectWithProvideParameters( releaseUsername, releasePassword, tagBase,
tag,
+                                                    releaseProjectScmUrl, releaseBuildEnvironment
);
+        assertPreparedReleasesFileCreated();
     }
 
-    private void init()
-        throws IOException
-    {
-        File file = new File( "target/conf/prepared-releases.xml" );
-
-        if ( file.exists() )
-        {
-            if ( !file.delete() )
-            {
-                throw new IOException( "Unable to delete existing prepared-releases.xml file"
);
-            }
-        }
-    }
-    
-    private void createBuildEnvAndBuildagentGroup()
+    private void createBuildEnvAndBuildagentGroup( String projectBuildEnv, String projectAgentGroup
)
     {
-        String M2_PROJECT_BUILD_ENV = getProperty( "M2_RELEASE_BUILD_ENV" );
-        String M2_PROJECT_AGENT_GROUP = getProperty( "M2_RELEASE_AGENT_GROUP" );
-        
         // add build agent group no agents
         goToBuildAgentPage();
-        if ( !isTextPresent( M2_PROJECT_AGENT_GROUP ) )
+        if ( !isTextPresent( projectAgentGroup ) )
         {
             clickAndWait( "//input[@id='editBuildAgentGroup_0']" );
-            setFieldValue( "saveBuildAgentGroup_buildAgentGroup_name", M2_PROJECT_AGENT_GROUP
);
+            setFieldValue( "saveBuildAgentGroup_buildAgentGroup_name", projectAgentGroup
);
             clickButtonWithValue( "Save" );
         }
-            
+
         // add build environment with build agent group
         clickLinkWithText( "Build Environments" );
-        if ( !isTextPresent( M2_PROJECT_BUILD_ENV ) )
+        if ( !isTextPresent( projectBuildEnv ) )
         {
             clickAndWait( "//input[@id='addBuildEnv_0']" );
-            setFieldValue( "saveBuildEnv_profile_name", M2_PROJECT_BUILD_ENV );
+            setFieldValue( "saveBuildEnv_profile_name", projectBuildEnv );
             clickButtonWithValue( "Save" );
-            attachBuildagentGroupToBuildEnv();
         }
-        
+
+        attachBuildagentGroupToBuildEnv( releaseBuildEnvironment, releaseBuildAgentGroup
);
+
         // attach build agent in build agent group created
-        attachBuildagentInGroup();
+        attachBuildagentInGroup( releaseBuildAgentGroup );
     }
-    
-    private void attachBuildagentGroupToBuildEnv()
+
+    private void attachBuildagentGroupToBuildEnv( String projectBuildEnv, String projectAgentGroup
)
     {
-        String M2_PROJECT_BUILD_ENV = getProperty( "M2_RELEASE_BUILD_ENV" );
-        String M2_PROJECT_AGENT_GROUP = getProperty( "M2_RELEASE_AGENT_GROUP" );
-        
         clickLinkWithText( "Build Environments" );
-        String xPath = "//preceding::td[text()='" + M2_PROJECT_BUILD_ENV + "']//following::img[@alt='Edit']";
+        String xPath = "//preceding::td[text()='" + projectBuildEnv + "']//following::img[@alt='Edit']";
         clickLinkWithXPath( xPath );
-        selectValue( "profile.buildAgentGroup", M2_PROJECT_AGENT_GROUP );
+        selectValue( "profile.buildAgentGroup", projectAgentGroup );
         clickButtonWithValue( "Save" );
     }
-    
-    private void removeBuildagentGroupFromBuildEnv()
+
+    private void removeBuildagentGroupFromBuildEnv( String projectBuildEnv )
     {
-        String M2_PROJECT_BUILD_ENV = getProperty( "M2_RELEASE_BUILD_ENV" );
-        
         clickLinkWithText( "Build Environments" );
-        String xPath = "//preceding::td[text()='" + M2_PROJECT_BUILD_ENV + "']//following::img[@alt='Edit']";
-        clickLinkWithXPath( xPath );
-        selectValue( "profile.buildAgentGroup", "" );
-        clickButtonWithValue( "Save" );
+        String xPath = "//preceding::td[text()='" + projectBuildEnv + "']//following::img[@alt='Edit']";
+        if ( isElementPresent( "xpath=" + xPath ) )
+        {
+            clickLinkWithXPath( xPath );
+            selectValue( "profile.buildAgentGroup", "" );
+            clickButtonWithValue( "Save" );
+        }
     }
-    
-    private void attachBuildagentInGroup()
+
+    private void attachBuildagentInGroup( String projectAgentGroup )
     {
-        String M2_PROJECT_AGENT_GROUP = getProperty( "M2_RELEASE_AGENT_GROUP" );
         String buildAgent = getBuildAgentUrl();
-        
+
         clickLinkWithText( "Build Agents" );
-        String xPath = "//preceding::td[text()='" + M2_PROJECT_AGENT_GROUP + "']//following::img[@alt='Edit']";
+        String xPath = "//preceding::td[text()='" + projectAgentGroup + "']//following::img[@alt='Edit']";
         clickLinkWithXPath( xPath );
-        
-        if ( isElementPresent( "xpath=//select[@id='saveBuildAgentGroup_buildAgentIds']/option[@value='"
+ buildAgent + "']" ) )
+
+        if ( isElementPresent(
+            "xpath=//select[@id='saveBuildAgentGroup_buildAgentIds']/option[@value='" + buildAgent
+ "']" ) )
         {
             selectValue( "buildAgentIds", buildAgent );
             clickLinkWithXPath( "//input[@value='->']", false );
             submit();
         }
     }
-    
-    private void detachBuildagentFromGroup()
+
+    private void detachBuildagentFromGroup( String projectAgentGroup )
     {
-        String M2_PROJECT_AGENT_GROUP = getProperty( "M2_RELEASE_AGENT_GROUP" );
         String buildAgent = getBuildAgentUrl();
-        
+
         clickLinkWithText( "Build Agents" );
-        String xPath = "//preceding::td[text()='" + M2_PROJECT_AGENT_GROUP + "']//following::img[@alt='Edit']";
+        String xPath = "//preceding::td[text()='" + projectAgentGroup + "']//following::img[@alt='Edit']";
         clickLinkWithXPath( xPath );
-        
-        if ( isElementPresent( "xpath=//select[@id='saveBuildAgentGroup_selectedBuildAgentIds']/option[@value='"
+ buildAgent + "']" ) )
+
+        if ( isElementPresent(
+            "xpath=//select[@id='saveBuildAgentGroup_selectedBuildAgentIds']/option[@value='"
+ buildAgent + "']" ) )
         {
             selectValue( "selectedBuildAgentIds", buildAgent );
             clickLinkWithXPath( "//input[@value='<-']", false );
             submit();
         }
     }
+
+    private void releasePrepareProject( String username, String password, String tagBase,
String tag,
+                                        String releaseVersion, String developmentVersion,
String buildEnv,
+                                        boolean success )
+    {
+        goToReleasePreparePage();
+        setFieldValue( "scmUsername", username );
+        setFieldValue( "scmPassword", password );
+        setFieldValue( "scmTag", tag );
+        setFieldValue( "scmTagBase", tagBase );
+        setFieldValue( "prepareGoals", "clean" );
+        selectValue( "profileId", buildEnv );
+        setFieldValue( "relVersions", releaseVersion );
+        setFieldValue( "devVersions", developmentVersion );
+        submit();
+
+        assertRelease( success );
+    }
+
+    private void releasePerformProjectWithProvideParameters( String username, String password,
String tagBase,
+                                                             String tag, String scmUrl, String
buildEnv )
+    {
+        goToReleasePerformProvideParametersPage();
+        setFieldValue( "scmUrl", scmUrl );
+        setFieldValue( "scmUsername", username );
+        setFieldValue( "scmPassword", password );
+        setFieldValue( "scmTag", tag );
+        setFieldValue( "scmTagBase", tagBase );
+        setFieldValue( "goals", "clean deploy" );
+        selectValue( "profileId", buildEnv );
+        submit();
+
+        assertRelease();
+    }
+
+    private void goToReleasePreparePage()
+    {
+        clickLinkWithLocator( "goal", false );
+        submit();
+        assertReleasePreparePage();
+    }
+
+    private void goToReleasePerformProvideParametersPage()
+    {
+        clickLinkWithLocator( "//input[@name='goal' and @value='perform']", false );
+        submit();
+        assertReleasePerformProvideParametersPage();
+    }
+
+    private void assertReleasePreparePage()
+    {
+        assertPage( "Continuum - Release Project" );
+        assertTextPresent( "Prepare Project for Release" );
+        assertTextPresent( "Release Prepare Parameters" );
+        assertTextPresent( "SCM Username" );
+        assertTextPresent( "SCM Password" );
+        assertTextPresent( "SCM Tag" );
+        assertTextPresent( "SCM Tag Base" );
+        assertTextPresent( "SCM Comment Prefix" );
+        assertTextPresent( "Preparation Goals" );
+        assertTextPresent( "Arguments" );
+        assertTextPresent( "Build Environment" );
+        assertTextPresent( "Release Version" );
+        assertTextPresent( "Next Development Version" );
+        assertButtonWithValuePresent( "Submit" );
+    }
+
+    private void assertReleasePerformProvideParametersPage()
+    {
+        assertPage( "Continuum - Perform Project Release" );
+        assertTextPresent( "Perform Project Release" );
+        assertTextPresent( "Release Perform Parameters" );
+        assertTextPresent( "SCM Connection URL" );
+        assertTextPresent( "SCM Username" );
+        assertTextPresent( "SCM Password" );
+        assertTextPresent( "SCM Tag" );
+        assertTextPresent( "SCM Tag Base" );
+        assertTextPresent( "Perform Goals" );
+        assertTextPresent( "Arguments" );
+        assertTextPresent( "Build Environment" );
+        assertButtonWithValuePresent( "Submit" );
+    }
+
+    private void assertRelease()
+    {
+        assertRelease( true );
+    }
+
+    private void assertRelease( boolean success )
+    {
+        String doneButtonLocator = "//input[@id='releaseCleanup_0']";
+        String errorTextLocator = "//h3[text()='Release Error']";
+
+        // condition for release is complete; "Done" button or "Release Error" in page is
present
+        waitForOneOfElementsPresent( Arrays.asList( doneButtonLocator, errorTextLocator ),
true );
+
+        if ( success )
+        {
+            assertButtonWithValuePresent( "Rollback changes" );
+            assertImgWithAlt( "Error" );
+        }
+        else
+        {
+            assertTextPresent( "Release Error" );
+        }
+    }
+
+    private void assertPreparedReleasesFileCreated()
+        throws Exception
+    {
+        File file = new File( "target/conf/prepared-releases.xml" );
+        Assert.assertTrue( file.exists(), "prepared-releases.xml was not created" );
+
+        FileInputStream fis = new FileInputStream( file );
+        BufferedReader reader = new BufferedReader( new InputStreamReader( fis ) );
+
+        String BUILD_AGENT_URL = getBuildAgentUrl();
+        String strLine;
+        StringBuilder str = new StringBuilder();
+        while ( ( strLine = reader.readLine() ) != null )
+        {
+            str.append( strLine );
+        }
+
+        Assert.assertTrue( str.toString().contains( "<buildAgentUrl>" + BUILD_AGENT_URL
+ "</buildAgentUrl>" ),
+                           "prepared-releases.xml was not populated" );
+    }
 }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java?rev=1372239&r1=1372238&r2=1372239&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
Mon Aug 13 01:42:39 2012
@@ -80,10 +80,9 @@ public class CaptureScreenShotsListener
         SimpleDateFormat sdf = new SimpleDateFormat( "yyyy.MM.dd-HH_mm_ss" );
         String time = sdf.format( new Date() );
         File targetPath = new File( "target", "screenshots" );
-        StackTraceElement stackTrace[] = throwable.getStackTrace();
-        int index = getStackTraceIndexOfCallingClass( cName, stackTrace );
-        String methodName = stackTrace[index].getMethodName();
-        int lNumber = stackTrace[index].getLineNumber();
+        StackTraceElement trace = getStackTraceOfCallingClass( cName, throwable.getStackTrace()
);
+        String methodName = trace.getMethodName();
+        int lNumber = trace.getLineNumber();
         String lineNumber = Integer.toString( lNumber );
         String className = cName.substring( cName.lastIndexOf( '.' ) + 1 );
         if ( !targetPath.exists() && !targetPath.mkdirs() )
@@ -125,18 +124,17 @@ public class CaptureScreenShotsListener
         return fileName;
     }
 
-    private static int getStackTraceIndexOfCallingClass( String nameOfClass, StackTraceElement
stackTrace[] )
+    private static StackTraceElement getStackTraceOfCallingClass( String nameOfClass, StackTraceElement
stackTrace[] )
     {
-        boolean match;
-        int i = 0;
-        do
-        {
-            String className = stackTrace[i].getClassName();
-            match = Pattern.matches( nameOfClass, className );
-            i++;
-        }
-        while ( !match );
-        i--;
-        return i;
+        StackTraceElement lastMatch = null;
+        for ( StackTraceElement el : stackTrace )
+        {
+            String className = el.getClassName();
+            if ( Pattern.matches( nameOfClass, className ) )
+            {
+                lastMatch = el;
+            }
+        }
+        return lastMatch;
     }
 }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java?rev=1372239&r1=1372238&r2=1372239&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
Mon Aug 13 01:42:39 2012
@@ -67,7 +67,8 @@ public abstract class AbstractSeleniumTe
         p.load( input );
 
         String svnBaseUrl = "file://localhost/" + new File( "target/example-svn" ).getAbsolutePath();
-        for ( String key : p.stringPropertyNames() ) {
+        for ( String key : p.stringPropertyNames() )
+        {
             String value = p.getProperty( key ).replace( "${svn.base.url}", svnBaseUrl );
             p.setProperty( key, value );
         }
@@ -127,7 +128,7 @@ public abstract class AbstractSeleniumTe
     /**
      * Close selenium session. Called from AfterSuite method of sub-class
      */
-    @AfterSuite(alwaysRun = true)
+    @AfterSuite( alwaysRun = true )
     public void close()
         throws Exception
     {
@@ -185,7 +186,7 @@ public abstract class AbstractSeleniumTe
 
     protected void assertLinkNotPresent( String text )
     {
-            Assert.assertFalse( isElementPresent( "link=" + text ), "The link '" + text +
"' is present." );
+        Assert.assertFalse( isElementPresent( "link=" + text ), "The link '" + text + "'
is present." );
     }
 
     protected void assertImgWithAlt( String alt )
@@ -260,8 +261,8 @@ public abstract class AbstractSeleniumTe
 
     boolean isButtonWithValuePresent( String text )
     {
-        return isElementPresent( "//button[@value='" + text + "']" )
-            || isElementPresent( "//input[@value='" + text + "']" );
+        return isElementPresent( "//button[@value='" + text + "']" ) || isElementPresent(
+            "//input[@value='" + text + "']" );
     }
 
     boolean isButtonWithIdPresent( String text )
@@ -377,7 +378,7 @@ public abstract class AbstractSeleniumTe
         waitForOneOfElementsPresent( Collections.singletonList( locator ), shouldBePresent
);
     }
 
-    void waitForOneOfElementsPresent( List<String> locators, boolean shouldBePresent
)
+    protected void waitForOneOfElementsPresent( List<String> locators, boolean shouldBePresent
)
     {
         if ( browser.equals( "*iexplore" ) )
         {
@@ -403,7 +404,8 @@ public abstract class AbstractSeleniumTe
         {
             StringBuilder condition = new StringBuilder();
             String operator = "";
-            for ( String locator : locators ) {
+            for ( String locator : locators )
+            {
                 condition.append( operator );
                 condition.append( "(selenium.isElementPresent(\"" ).append( locator ).append(
"\")" );
                 condition.append( " == " );



Mime
View raw message