continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From batkin...@apache.org
Subject svn commit: r1654308 - in /continuum/trunk: continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ continuum-webapp/src/main/resources/template/simple/ continuum-webapp/src/main/webapp/WEB-INF/jsp/
Date Fri, 23 Jan 2015 18:48:20 GMT
Author: batkinson
Date: Fri Jan 23 18:48:19 2015
New Revision: 1654308

URL: http://svn.apache.org/r1654308
Log:
[CONTINUUM-2723] Attempting to edit a project results in an internal error

Added:
    continuum/trunk/continuum-webapp/src/main/resources/template/simple/
    continuum/trunk/continuum-webapp/src/main/resources/template/simple/dynamic-attributes.ftl
Modified:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectEdit.jsp

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=1654308&r1=1654307&r2=1654308&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
Fri Jan 23 18:48:19 2015
@@ -85,6 +85,28 @@ public class MavenTwoProjectTest
         assertTextPresent( projectGroupScmRootUrl );
     }
 
+    @Test( dependsOnMethods = { "testAddMavenTwoProject" } )
+    public void testEditProjectName()
+         throws Exception
+    {
+        // Create a project to use
+        testAddMavenTwoProject();
+
+        // Navigate to project's edit page
+        clickLinkWithText(projectName);
+        clickButtonWithValue("Edit");
+        assertPage("Continuum - Update Continuum Project");
+
+        // Edit the name of the project and save it
+        String newName = "New Name";
+        setFieldValue("projectSave_name", newName);
+        clickButtonWithValue("Save");
+
+        // Verify that the save succeeded
+        assertPage("Continuum - Continuum Project");
+        assertTextPresent(String.format("Continuum Project \"%s\"", newName));
+    }
+
     /**
      * Test flat multi module project with names that start with the same letter
      */

Added: continuum/trunk/continuum-webapp/src/main/resources/template/simple/dynamic-attributes.ftl
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/resources/template/simple/dynamic-attributes.ftl?rev=1654308&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/resources/template/simple/dynamic-attributes.ftl
(added)
+++ continuum/trunk/continuum-webapp/src/main/resources/template/simple/dynamic-attributes.ftl
Fri Jan 23 18:48:19 2015
@@ -0,0 +1,37 @@
+<#--
+/*
+ * $Id$
+ *
+ * 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.
+ */
+-->
+<#--
+  TODO: Fixes CONTINUUM-2723, remove this after upgrading to struts-2.3.20+
+-->
+<#if (parameters.dynamicAttributes?? && parameters.dynamicAttributes?size >
0)><#rt/>
+<#assign aKeys = parameters.dynamicAttributes.keySet()><#rt/>
+<#list aKeys as aKey><#rt/>
+  <#assign keyValue = parameters.dynamicAttributes.get(aKey)/>
+  <#if keyValue?is_string>
+      <#assign value = struts.translateVariables(keyValue)!keyValue/>
+  <#else>
+      <#assign value = keyValue?string/>
+  </#if>
+ ${aKey}="${value?html}"<#rt/>
+</#list><#rt/>
+</#if><#rt/>
\ No newline at end of file

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectEdit.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectEdit.jsp?rev=1654308&r1=1654307&r2=1654308&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectEdit.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/projectEdit.jsp Fri Jan 23
18:48:19 2015
@@ -76,4 +76,4 @@
       </div>
     </body>
   </s:i18n>
-</html>
\ No newline at end of file
+</html>



Mime
View raw message