continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1548523 - in /continuum/branches/CONTINUUM-2713: continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/ continuum-webapp/src/main/webapp/WEB-INF/jsp/...
Date Fri, 06 Dec 2013 14:05:52 GMT
Author: brett
Date: Fri Dec  6 14:05:51 2013
New Revision: 1548523

URL: http://svn.apache.org/r1548523
Log:
[CONTINUUM-2713] remove DMI from build environments

Add more missing tests for installation functionality

Modified:
    continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java
    continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
    continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractInstallationTest.java
    continuum/branches/CONTINUUM-2713/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp

Modified: continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java?rev=1548523&r1=1548522&r2=1548523&view=diff
==============================================================================
--- continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java
(original)
+++ continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java
Fri Dec  6 14:05:51 2013
@@ -19,7 +19,7 @@ package org.apache.continuum.web.test;
  * under the License.
  */
 
-import org.apache.continuum.web.test.parent.AbstractAdminTest;
+import org.apache.continuum.web.test.parent.AbstractInstallationTest;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
@@ -30,12 +30,14 @@ import org.testng.annotations.Test;
  */
 @Test( groups = { "buildEnvironment" } )
 public class BuildEnvironmentTest
-    extends AbstractAdminTest
+    extends AbstractInstallationTest
 {
 
+    public static final String INSTALLATION_NAME = "varForBuildEnv";
+
     private String buildEnvName;
 
-    @BeforeClass
+    @BeforeClass(alwaysRun = true)
     public void setUp()
     {
         buildEnvName = getProperty( "BUILD_ENV_NAME" );
@@ -83,11 +85,43 @@ public class BuildEnvironmentTest
         String newName = "new_name";
         goToEditBuildEnvironment( buildEnvName );
         editBuildEnvironment( newName, new String[]{ }, true );
-        // TODO: ADD INSTALLATIONS TO ENVIROTMENT
         goToEditBuildEnvironment( newName );
         editBuildEnvironment( buildEnvName, new String[]{ }, true );
     }
 
+    @Test( dependsOnMethods = { "testAddBuildEnvironment" })
+    public void testAddInstallationToBuildEnvironment()
+    {
+        goToInstallationPage();
+        if ( !isTextPresent( INSTALLATION_NAME ) )
+        {
+            goToAddInstallationVariable();
+            addInstallation( INSTALLATION_NAME, "VAR_BUILD_ENV", "var_value", false, false,
true );
+        }
+
+        goToEditBuildEnvironment( buildEnvName );
+        editBuildEnvironment( buildEnvName, new String[] { INSTALLATION_NAME }, true );
+    }
+
+    @Test( dependsOnMethods = { "testAddInstallationToBuildEnvironment" })
+    public void testEditInstallationOnBuildEnvironment()
+    {
+        goToEditBuildEnvironment( buildEnvName );
+        clickLinkWithText( INSTALLATION_NAME );
+        assertEditInstallationVariablePage();
+        assert INSTALLATION_NAME.equals( getFieldValue( "installation.name" ) );
+    }
+
+    @Test( dependsOnMethods = { "testEditInstallationOnBuildEnvironment" })
+    public void testRemoveInstallationOnBuildEnvironment()
+    {
+        goToEditBuildEnvironment( buildEnvName );
+        assertLinkPresent( INSTALLATION_NAME );
+        clickImgWithAlt( "Delete" );
+        assertEditBuildEnvironmentPage( buildEnvName );
+        assertLinkNotPresent( INSTALLATION_NAME );
+    }
+
     @Test( dependsOnMethods = { "testEditInvalidBuildEnvironment", "testEditBuildEnvironment",
         "testAddDuplicatedBuildEnvironment", "testEditInvalidBuildEnvironment" } )
     public void testDeleteBuildEnvironment()
@@ -132,7 +166,7 @@ public class BuildEnvironmentTest
         }
     }
 
-    @AfterClass
+    @AfterClass(alwaysRun = true)
     public void tearDown()
     {
         removeBuildEnvironment( buildEnvName, false );

Modified: continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java?rev=1548523&r1=1548522&r2=1548523&view=diff
==============================================================================
--- continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
(original)
+++ continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
Fri Dec  6 14:05:51 2013
@@ -1274,7 +1274,7 @@ public abstract class AbstractContinuumT
         }
     }
 
-    void assertEditBuildEnvironmentPage( String name )
+    protected void assertEditBuildEnvironmentPage( String name )
     {
         assertAddBuildEnvironmentPage();
         assertTextPresent( "Installation Name" );

Modified: continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractInstallationTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractInstallationTest.java?rev=1548523&r1=1548522&r2=1548523&view=diff
==============================================================================
--- continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractInstallationTest.java
(original)
+++ continuum/branches/CONTINUUM-2713/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractInstallationTest.java
Fri Dec  6 14:05:51 2013
@@ -26,7 +26,7 @@ package org.apache.continuum.web.test.pa
 public abstract class AbstractInstallationTest
     extends AbstractAdminTest
 {
-    void goToInstallationPage()
+    protected void goToInstallationPage()
     {
         clickLinkWithText( "Installations" );
         assertInstallationPage();
@@ -97,7 +97,7 @@ public abstract class AbstractInstallati
         assertTextPresent( "Create a Build Environment with the Installation name" );
     }
 
-    void assertEditInstallationVariablePage()
+    protected void assertEditInstallationVariablePage()
     {
         assertPage( "Continuum - Installation" );
         assertTextPresent( "Continuum - Installation" );

Modified: continuum/branches/CONTINUUM-2713/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/CONTINUUM-2713/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp?rev=1548523&r1=1548522&r2=1548523&view=diff
==============================================================================
--- continuum/branches/CONTINUUM-2713/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp
(original)
+++ continuum/branches/CONTINUUM-2713/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp
Fri Dec  6 14:05:51 2013
@@ -84,21 +84,21 @@
                     autoIncludeParameters="false">
             <ec:row highlightRow="true">
               <ec:column property="nameEdit" title="profile.installation.name.label" style="white-space:
nowrap" width="50%">
-                <a href="editInstallation!edit.action?installation.installationId=<c:out
value="${profileInstallation.installationId}"/>">
+                <a href="editInstallation.action?installation.installationId=<c:out
value="${profileInstallation.installationId}"/>">
                   <c:out value="${profileInstallation.name}"/>
                 </a>
                 (<c:out value="${profileInstallation.varValue}"/>)
               </ec:column>
               <ec:column property="type" title="installation.type.label" style="white-space:
nowrap" width="49%"/>
               <ec:column property="id" title="&nbsp;" width="1%">
-                <a href="removeBuildEnvInstallation!removeInstallation.action?profile.id=<c:out
value="${profile.id}"/>&installationId=<c:out value="${profileInstallation.installationId}"/>">
+                <a href="removeBuildEnvInstallation.action?profile.id=<c:out value="${profile.id}"/>&installationId=<c:out
value="${profileInstallation.installationId}"/>">
                   <img src="<s:url value='/images/delete.gif' includeParams="none"/>"
alt="<s:text name='delete'/>" title="<s:text name='delete'/>" border="0" />
                 </a>
               </ec:column>
             </ec:row>
           </ec:table>
           <s:if test="allInstallations.size > 0">
-            <s:form action="addInstallationBuildEnv!addInstallation.action" method="get">
+            <s:form action="addInstallationBuildEnv.action" method="get">
               <s:hidden name="profile.id" />
               <div class="functnbar3">
                 <!-- can't use default profile to display this select -->



Mime
View raw message