continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1149797 - in /continuum/trunk: continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
Date Sat, 23 Jul 2011 04:48:49 GMT
Author: ctan
Date: Sat Jul 23 04:48:48 2011
New Revision: 1149797

URL: http://svn.apache.org/viewvc?rev=1149797&view=rev
Log:
[CONTINUUM-2483] made build agent enabled by default

Modified:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java?rev=1149797&r1=1149796&r2=1149797&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java
Sat Jul 23 04:48:48 2011
@@ -29,10 +29,10 @@ public abstract class AbstractBuildAgent
         goToBuildAgentPage();
         assertBuildAgentPage();
         clickAndWait("editBuildAgent_0"); //add button
-        assertAddEditBuildAgentPage();
+        assertAddEditBuildAgentPage( true );
     }
 
-    public void assertAddEditBuildAgentPage()
+    public void assertAddEditBuildAgentPage( boolean isChecked )
     {
         assertPage( "Continuum - Add/Edit Build Agent" );
         assertTextPresent( "Add/Edit Build Agent" );
@@ -41,6 +41,12 @@ public abstract class AbstractBuildAgent
         assertTextPresent( "Enabled" );
         assertElementPresent( "saveBuildAgent_buildAgent_url" );
         assertElementPresent( "saveBuildAgent_buildAgent_description");
+
+        if ( isChecked )
+        {
+            assertIsChecked( "saveBuildAgent_buildAgent_enabled" );
+        }
+
         assertButtonWithValuePresent( "Save" );
         assertButtonWithValuePresent( "Cancel" );
     }
@@ -87,7 +93,7 @@ public abstract class AbstractBuildAgent
         }
         else
         {
-            assertAddEditBuildAgentPage();
+            assertAddEditBuildAgentPage( true );
         }
     }
 
@@ -95,7 +101,7 @@ public abstract class AbstractBuildAgent
     {
         goToBuildAgentPage();
         clickImgWithAlt( "Edit" );
-        assertAddEditBuildAgentPage();
+        assertAddEditBuildAgentPage( false );
         assertFieldValue( name, "saveBuildAgent_buildAgent_url" );
         assertFieldValue( description, "saveBuildAgent_buildAgent_description" );
 	}

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java?rev=1149797&r1=1149796&r2=1149797&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
Sat Jul 23 04:48:48 2011
@@ -104,6 +104,8 @@ public class BuildAgentAction
         else
         {
             type = "new";
+            buildAgent = new BuildAgentConfiguration();
+            buildAgent.setEnabled( true );
         }
 
         return INPUT;



Mime
View raw message