continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r948290 - in /continuum/trunk: continuum-webapp-test/src/test/example-projects/continuum-failing-project/ continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/ continuum-webapp-test/src/test/example-projects/continu...
Date Wed, 26 May 2010 02:10:29 GMT
Author: ctan
Date: Wed May 26 02:10:28 2010
New Revision: 948290

URL: http://svn.apache.org/viewvc?rev=948290&view=rev
Log:
[CONTINUUM-2521] update selenium tests and also display 'No Results Found' for empty results

Added:
    continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/
    continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/pom.xml
    continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/
    continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/main/
    continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/main/java/
    continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/main/java/org/
    continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/main/java/org/apache/
    continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/main/java/org/apache/continuum/
    continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/main/java/org/apache/continuum/App.java
    continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/test/
    continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/test/java/
    continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/test/java/org/
    continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/test/java/org/apache/
    continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/test/java/org/apache/continuum/
    continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/test/java/org/apache/continuum/AppTest.java
Modified:
    continuum/trunk/continuum-webapp-test/src/test/example-svn/db/current
    continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.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/ProjectGroupTest.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/ReportTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
    continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/viewProjectBuildsReport.jsp

Added: continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/pom.xml?rev=948290&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/pom.xml
(added)
+++ continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/pom.xml
Wed May 26 02:10:28 2010
@@ -0,0 +1,32 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.continuum.failing.project</groupId>
+  <artifactId>continuum-failing-project</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <name>Continuum Sample Failing Project</name>
+  <description>Sample project that has a build failure</description>
+  <url>http://maven.apache.org</url>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+
+  <scm>
+    <connection>scm:svn:${svn.base.url}/trunk/continuum-failing-project</connection>
+    <developerConnection>scm:svn:${svn.base.url}/trunk/continuum-failing-project</developerConnection>
+    <url>${svn.base.url}/trunk/continuum-failing-project</url>
+  </scm>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

Added: continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/main/java/org/apache/continuum/App.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/main/java/org/apache/continuum/App.java?rev=948290&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/main/java/org/apache/continuum/App.java
(added)
+++ continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/main/java/org/apache/continuum/App.java
Wed May 26 02:10:28 2010
@@ -0,0 +1,13 @@
+package org.apache.continuum;
+
+/**
+ * Hello world!
+ *
+ */
+public class App 
+{
+    public static void main( String[] args )
+    {
+        System.out.println( "Hello World!" )
+    }
+}

Added: continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/test/java/org/apache/continuum/AppTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/test/java/org/apache/continuum/AppTest.java?rev=948290&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/test/java/org/apache/continuum/AppTest.java
(added)
+++ continuum/trunk/continuum-webapp-test/src/test/example-projects/continuum-failing-project/src/test/java/org/apache/continuum/AppTest.java
Wed May 26 02:10:28 2010
@@ -0,0 +1,38 @@
+package org.apache.continuum;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * Unit test for simple App.
+ */
+public class AppTest 
+    extends TestCase
+{
+    /**
+     * Create the test case
+     *
+     * @param testName name of the test case
+     */
+    public AppTest( String testName )
+    {
+        super( testName );
+    }
+
+    /**
+     * @return the suite of tests being tested
+     */
+    public static Test suite()
+    {
+        return new TestSuite( AppTest.class );
+    }
+
+    /**
+     * Rigourous Test :-)
+     */
+    public void testApp()
+    {
+        assertTrue( true );
+    }
+}

Modified: continuum/trunk/continuum-webapp-test/src/test/example-svn/db/current
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/example-svn/db/current?rev=948290&r1=948289&r2=948290&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/example-svn/db/current (original)
+++ continuum/trunk/continuum-webapp-test/src/test/example-svn/db/current Wed May 26 02:10:28
2010
@@ -1 +1 @@
-2 6i 1
+3 7e 1

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=948290&r1=948289&r2=948290&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Wed May 26
02:10:28 2010
@@ -77,6 +77,11 @@ M2_RELEASE_BUILD_ENV=RELEASE_BUILD_ENV
 M2_RELEASE_AGENT_GROUP=RELEASE_BUILDAGENT_GROUP
 M2_RELEASE_NO_AGENT_MESSAGE=Unable to prepare release because build agent 
 
+M2_FAILING_PROJ_POM_URL=http://localhost:9595/example-projects/continuum-failing-project/pom.xml
+M2_FAILING_PROJ_GRP_NAME=Continuum Sample Failing Project
+M2_FAILING_PROJ_GRP_ID=org.apache.continuum.failing.project
+M2_FAILING_PROJ_DESCRIPTION=Sample project that has a build failure
+
 ########################
 # mavenOneProject group 
 ########################

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java?rev=948290&r1=948289&r2=948290&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java
Wed May 26 02:10:28 2010
@@ -158,7 +158,7 @@ public class BuildAgentsTest
             goToEditBuildAgent( BUILD_AGENT_NAME, BUILD_AGENT_DESCRIPTION );
             enableDisableBuildAgent( BUILD_AGENT_NAME, true );
 
-            buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, "", M2_PROJ_GRP_NAME );
+            buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, "", M2_PROJ_GRP_NAME, true
);
 
             removeProjectGroup( M2_PROJ_GRP_NAME );
             assertLinkNotPresent( M2_PROJ_GRP_NAME );

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java?rev=948290&r1=948289&r2=948290&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java
Wed May 26 02:10:28 2010
@@ -280,7 +280,7 @@ public class MavenTwoProjectTest
     {
         String M2_PROJ_GRP_NAME = getProperty( "M2_DELETE_PROJ_GRP_NAME" );
         String M2_PROJ_GRP_ID = getProperty( "M2_DELETE_PROJ_GRP_ID" );
-    
+
         try
         {
             enableDistributedBuilds();
@@ -322,7 +322,7 @@ public class MavenTwoProjectTest
             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 );
+            buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, "", M2_PROJ_GRP_NAME, true
);
         }
         finally
         {
@@ -381,7 +381,7 @@ public class MavenTwoProjectTest
         addMavenTwoProject( M2_POM_URL, M2_POM_USERNAME, M2_POM_PASSWORD, null, true );
         assertProjectGroupSummaryPage( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION
);
     
-        buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION, M2_PROJ_GRP_NAME
);
+        buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION, M2_PROJ_GRP_NAME,
true );
     
         removeProjectGroup( M2_PROJ_GRP_NAME );
         assertLinkNotPresent( M2_PROJ_GRP_NAME );
@@ -406,7 +406,7 @@ public class MavenTwoProjectTest
             addMavenTwoProject( M2_POM_URL, M2_POM_USERNAME, M2_POM_PASSWORD, null, true
);
             assertProjectGroupSummaryPage( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION
);
         
-            buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION,
M2_PROJ_GRP_NAME );
+            buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION,
M2_PROJ_GRP_NAME, true );
         
             removeProjectGroup( M2_PROJ_GRP_NAME );
             assertLinkNotPresent( M2_PROJ_GRP_NAME );

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java?rev=948290&r1=948289&r2=948290&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
Wed May 26 02:10:28 2010
@@ -138,7 +138,7 @@ public class ProjectGroupTest
         String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
         String M2_PROJ_GRP_ID = getProperty( "M2_PROJ_GRP_ID" );
         String M2_PROJ_GRP_DESCRIPTION = getProperty( "M2_PROJ_GRP_DESCRIPTION" );
-        buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION, M2_PROJ_GRP_NAME
);
+        buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION, M2_PROJ_GRP_NAME,
true );
         clickButtonWithValue( "Release" );
         assertReleaseSuccess();
     }

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=948290&r1=948289&r2=948290&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
Wed May 26 02:10:28 2010
@@ -94,7 +94,7 @@ public class ReleaseTest
             createBuildEnvAndBuildagentGroup();
             detachBuildagentFromGroup();
             
-            buildProjectGroup( M2_PROJECT_GROUP_NAME, M2_PROJECT_GROUP_ID, M2_PROJECT_DESCRIPTION,
M2_PROJECT_NAME );
+            buildProjectGroup( M2_PROJECT_GROUP_NAME, M2_PROJECT_GROUP_ID, M2_PROJECT_DESCRIPTION,
M2_PROJECT_NAME, true );
             
             clickButtonWithValue( "Release" );
             assertReleaseSuccess();

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReportTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReportTest.java?rev=948290&r1=948289&r2=948290&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReportTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReportTest.java
Wed May 26 02:10:28 2010
@@ -27,12 +27,115 @@ public class ReportTest
     extends AbstractContinuumTest
 {
     @Test( dependsOnMethods = { "testProjectGroupAllBuildSuccess" } )
-    public void testViewBuildsReport()
+    public void testViewBuildsReportWithSuccessfulBuild()
         throws Exception
+    {        
+        goToProjectBuildsReport();
+        selectValue( "buildStatus", "Ok" );
+        clickButtonWithValue( "View Report" );
+
+        assertProjectBuildReportWithResult();
+        assertTextPresent( getProperty( "M2_PROJ_GRP_NAME" ) );
+        assertImgWithAlt( "Success" );
+    }
+
+    /*@Test( dependsOnMethods = { "testProjectGroupAllBuildSuccess" } )
+    public void testBuildsReportPagination()
+        throws Exception
+    {
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_ID = getProperty( "M2_PROJ_GRP_ID" );
+        String M2_PROJ_GRP_DESCRIPTION = getProperty( "M2_PROJ_GRP_DESCRIPTION" );
+        
+        for ( int ctr = 0; ctr < 10; ctr++ )
+        {
+            buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION,
M2_PROJ_GRP_NAME, true );
+            clickButtonWithValue( "Release" );
+            assertReleaseSuccess();
+        }
+
+        goToProjectBuildsReport();
+        setFieldValue( "rowCount", "10" );
+        clickButtonWithValue( "View Report" );
+
+        assertProjectBuildReportWithResult();
+        assertLinkNotPresent( "Prev" );
+        assertLinkNotPresent( "1" );
+        assertLinkPresent( "2" );
+        assertLinkPresent( "Next" );
+
+        clickLinkWithText( "2" );
+        assertProjectBuildReportWithResult();
+        assertLinkNotPresent( "Next" );
+        assertLinkNotPresent( "2" );
+        assertLinkPresent( "1" );
+        assertLinkPresent( "Prev" );
+
+        clickLinkWithText( "Prev" );
+        assertProjectBuildReportWithResult();
+        assertLinkNotPresent( "Prev" );
+        assertLinkNotPresent( "1" );
+        assertLinkPresent( "2" );
+        assertLinkPresent( "Next" );
+    }*/
+
+    @Test
+    public void testBuildsReportWithInvalidRowCount()
+    {
+        goToProjectBuildsReport();
+        setFieldValue( "rowCount", "1" );
+        clickButtonWithValue( "View Report" );
+
+        assertProjectBuildReportWithNoResult();
+        assertTextPresent( "Row count must be larger than 10" );
+    }
+
+    @Test
+    public void testBuildsReportWithInvalidDates()
+    {
+        goToProjectBuildsReport();
+        setFieldValue( "startDate", "05/25/2010" );
+        setFieldValue( "endDate", "05/24/2010" );
+        clickButtonWithValue( "View Report" );
+
+        assertProjectBuildReportWithNoResult();
+        assertTextPresent( "Start Date must be earlier than the End Date" );
+    }
+
+    @Test
+    public void testViewBuildsReportWithFailedBuild()
+        throws Exception
+    {
+        String M2_POM_URL = getProperty( "M2_FAILING_PROJ_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_FAILING_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_ID = getProperty( "M2_FAILING_PROJ_GRP_ID" );
+        String M2_PROJ_GRP_DESCRIPTION = getProperty( "M2_FAILING_PROJ_DESCRIPTION" );
+
+        addMavenTwoProject( M2_POM_URL, M2_POM_USERNAME, M2_POM_PASSWORD, null, true );
+        assertProjectGroupSummaryPage( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION
);
+
+        
+        buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION, M2_PROJ_GRP_NAME,
false );
+
+        goToProjectBuildsReport();
+        selectValue( "buildStatus", "Failed" );
+        clickButtonWithValue( "View Report" );
+
+        assertProjectBuildReportWithResult();
+        assertImgWithAlt( "Failed" );
+        assertTextPresent( M2_PROJ_GRP_NAME );
+    }
+
+    @Test
+    public void testViewBuildsReportWithErrorBuild()
     {
         goToProjectBuildsReport();
+        selectValue( "buildStatus", "Error" );
         clickButtonWithValue( "View Report" );
 
-        assertProjectBuildReport();
+        assertProjectBuildReportWithNoResult();
     }
 }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java?rev=948290&r1=948289&r2=948290&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
Wed May 26 02:10:28 2010
@@ -276,7 +276,7 @@ public class UserRolesManagementTest
     @Test( dependsOnMethods = { "testContinuumGroupProjectAdmin_AddProjectToProjectGroup"
} )
     public void testContinuumGroupProjectAdmin_BuildProject() throws Exception
     {
-        buildProjectGroup( "Test Group", "Test Group", "testing project group", "ContinuumBuildQueueTestData"
);
+        buildProjectGroup( "Test Group", "Test Group", "testing project group", "ContinuumBuildQueueTestData",
true );
     }
 
     @Test( dependsOnMethods = { "testContinuumGroupProjectAdmin_BuildProject" } )

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java?rev=948290&r1=948289&r2=948290&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
Wed May 26 02:10:28 2010
@@ -370,7 +370,7 @@ public abstract class AbstractContinuumT
         assertElementPresent( "Cancel" );
     }
 
-    public void buildProjectGroup(String projectGroupName,String groupId,String description,String
projectName )
+    public void buildProjectGroup(String projectGroupName,String groupId,String description,String
projectName, boolean success )
         throws Exception
     {
         showProjectGroup( projectGroupName, groupId, description );
@@ -381,9 +381,19 @@ public abstract class AbstractContinuumT
         waitForProjectBuild();
         
         // wait for the success status of project
-        if ( !isElementPresent( "//a/img[@alt='Success']" ) )
+        if ( success )
         {
-            waitForElementPresent( "//a/img[@alt='Success']" );
+            if ( !isElementPresent( "//a/img[@alt='Success']" ) )
+            {
+                waitForElementPresent( "//a/img[@alt='Success']" );
+            }
+        }
+        else
+        {
+            if ( !isElementPresent( "//a/img[@alt='Failed']" ) )
+            {
+                waitForElementPresent( "//a/img[@alt='Failed']" );
+            }
         }
         
         // wait for the projectName link
@@ -395,7 +405,15 @@ public abstract class AbstractContinuumT
         clickLinkWithText( projectName );
         clickLinkWithText( "Builds" );
         clickLinkWithText( "Result" );
-        assertTextPresent( "BUILD SUCCESS" );
+        
+        if ( success )
+        {
+            assertTextPresent( "BUILD SUCCESS" );
+        }
+        else
+        {
+            assertTextPresent( "BUILD FAILURE" );
+        }
         clickLinkWithText( "Project Group Summary" );
     }
 
@@ -1095,7 +1113,7 @@ public abstract class AbstractContinuumT
         assertTextPresent( "Results" );
     }
     
-    public void assertProjectBuildReport()
+    public void assertProjectBuildReportWithResult()
     {
         assertTextPresent( "Project Group" );
         assertTextPresent( "Project" );
@@ -1105,4 +1123,12 @@ public abstract class AbstractContinuumT
         assertTextPresent( "Prev" );
         assertTextPresent( "Next" );
     }
+
+    public void assertProjectBuildReportWithNoResult()
+    {
+        assertTextNotPresent( "Build Date" );
+        assertTextNotPresent( "Prev" );
+        assertTextNotPresent( "Next" );
+        assertTextPresent( "No Results Found" );
+    }
 }

Modified: continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties?rev=948290&r1=948289&r2=948290&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
(original)
+++ continuum/trunk/continuum-webapp/src/main/resources/localization/Continuum.properties
Wed May 26 02:10:28 2010
@@ -1277,4 +1277,5 @@ projectBuilds.report.prev=Prev
 projectBuilds.report.next=Next
 projectBuilds.report.projectGroup = Project Group
 projectBuilds.report.project=Project
-projectBuilds.report.buildDate=Build Date
\ No newline at end of file
+projectBuilds.report.buildDate=Build Date
+projectBuilds.report.noResult=No Results Found
\ No newline at end of file

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/viewProjectBuildsReport.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/viewProjectBuildsReport.jsp?rev=948290&r1=948289&r2=948290&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/viewProjectBuildsReport.jsp
(original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/viewProjectBuildsReport.jsp
Wed May 26 02:10:28 2010
@@ -176,6 +176,9 @@
           </ec:row>
         </ec:table>
       </c:if>
+      <c:if test="${empty projectBuilds}">
+        <s:text name="projectBuilds.report.noResult"/>
+      </c:if>
     </div>
   </body>
   </s:i18n>



Mime
View raw message