Author: apetrelli
Date: Wed Feb 27 11:30:03 2008
New Revision: 631686

URL: http://svn.apache.org/viewvc?rev=631686&view=rev
Log:
TILES-85
Added tests for nested definitions in put-attribute and tiles:putAttribute tags.

Added:
    
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertnesteddefinition.jsp 
  (with props)
    
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertnesteddefinition_tags.jsp
   (with props)
    
tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredNestedDefinitionTest.html
   (with props)
    
tiles/framework/trunk/tiles-test/src/test/selenium/PutTagNestedDefinitionTest.html
   (with props)
Modified:
    tiles/framework/trunk/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml
    tiles/framework/trunk/tiles-test/src/main/webapp/index.jsp
    tiles/framework/trunk/tiles-test/src/test/selenium/TestSuite.html

Modified: 
tiles/framework/trunk/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml?rev=631686&r1=631685&r2=631686&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml 
(original)
+++ tiles/framework/trunk/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml Wed 
Feb 27 11:30:03 2008
@@ -170,4 +170,16 @@
       <put-attribute name="header" value="/header.jsp"/>
       <put-attribute name="body"   value="/body.jsp"/>
   </definition>
+
+  <definition name="test.nesting.definitions" template="/layout.jsp">
+      <put-attribute name="title"  value="This is the title."/>
+      <put-attribute name="header" value="/header.jsp"/>
+      <put-attribute name="body">
+          <definition template="/layout.jsp">
+              <put-attribute name="title"  value="This is a nested 
definition."/>
+              <put-attribute name="header" value="/header.jsp"/>
+              <put-attribute name="body"   value="/body.jsp"/>
+          </definition>
+      </put-attribute>
+  </definition>
 </tiles-definitions>

Modified: tiles/framework/trunk/tiles-test/src/main/webapp/index.jsp
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-test/src/main/webapp/index.jsp?rev=631686&r1=631685&r2=631686&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-test/src/main/webapp/index.jsp (original)
+++ tiles/framework/trunk/tiles-test/src/main/webapp/index.jsp Wed Feb 27 
11:30:03 2008
@@ -51,6 +51,8 @@
     <a href="testinsertdefinition_cascaded_list.jsp">Test Insert Configured 
Cascaded Definition with List</a><br/>
     <a href="testinsertdefinition_reversed.jsp">Test Insert Configured 
Definition with Reversed Attribute</a><br/>
     <a href="testinsertdefinition_reversed_explicit.jsp">Test Insert 
Configured Definition with Reversed Explicit Attribute</a><br/>
+    <a href="testinsertnesteddefinition.jsp">Test Insert Nested 
Definition</a><br/>
+    <a href="testinsertnesteddefinition_tags.jsp">Test Insert Nested 
Definition only using JSP tags</a><br/>
     <a href="testput.jsp">Test Put Tag</a><br/>
     <a href="testput_flush.jsp">Test Put Tag with Flush</a><br/>
     <a href="testput_el.jsp">Test Put Tag using EL</a><br/>

Added: 
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertnesteddefinition.jsp
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-test/src/main/webapp/testinsertnesteddefinition.jsp?rev=631686&view=auto
==============================================================================
--- 
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertnesteddefinition.jsp 
(added)
+++ 
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertnesteddefinition.jsp 
Wed Feb 27 11:30:03 2008
@@ -0,0 +1,27 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $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.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles"; prefix="tiles" %>
+
+<tiles:insertDefinition name="test.nesting.definitions" />

Propchange: 
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertnesteddefinition.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertnesteddefinition.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: 
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertnesteddefinition_tags.jsp
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-test/src/main/webapp/testinsertnesteddefinition_tags.jsp?rev=631686&view=auto
==============================================================================
--- 
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertnesteddefinition_tags.jsp
 (added)
+++ 
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertnesteddefinition_tags.jsp
 Wed Feb 27 11:30:03 2008
@@ -0,0 +1,38 @@
+<%@ page session="false" %>
+<%--
+/*
+ * $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.
+ *
+ */
+--%>
+<%@ taglib uri="http://tiles.apache.org/tags-tiles"; prefix="tiles" %>
+
+<tiles:definition name="test.nesting.definitions.tags" template="/layout.jsp">
+    <tiles:putAttribute name="title"  value="This is the title."/>
+    <tiles:putAttribute name="header" value="/header.jsp"/>
+    <tiles:putAttribute name="body">
+        <tiles:definition template="/layout.jsp">
+            <tiles:putAttribute name="title"  value="This is a nested 
definition."/>
+            <tiles:putAttribute name="header" value="/header.jsp"/>
+            <tiles:putAttribute name="body"   value="/body.jsp"/>
+        </tiles:definition>
+    </tiles:putAttribute>
+</tiles:definition>
+<tiles:insertDefinition name="test.nesting.definitions.tags" />

Propchange: 
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertnesteddefinition_tags.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tiles/framework/trunk/tiles-test/src/main/webapp/testinsertnesteddefinition_tags.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: 
tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredNestedDefinitionTest.html
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredNestedDefinitionTest.html?rev=631686&view=auto
==============================================================================
--- 
tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredNestedDefinitionTest.html
 (added)
+++ 
tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredNestedDefinitionTest.html
 Wed Feb 27 11:30:03 2008
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $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.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Configured Nested Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Configured Nested Definition Test</td></tr>
+</thead><tbody>
+<tr>
+       <td>open</td>
+       <td>/tiles-test/index.jsp</td>
+       <td></td>
+</tr>
+<tr>
+       <td>clickAndWait</td>
+       <td>link=Test Insert Nested Definition</td>
+       <td></td>
+</tr>
+<tr>
+       <td>assertTextPresent</td>
+       <td>This is the title.</td>
+       <td></td>
+</tr>
+<tr>
+       <td>assertTextPresent</td>
+       <td>This is the header</td>
+       <td></td>
+</tr>
+<tr>
+       <td>assertTextPresent</td>
+       <td>This is a nested definition.</td>
+       <td></td>
+</tr>
+<tr>
+       <td>assertTextPresent</td>
+       <td>This is the header</td>
+       <td></td>
+</tr>
+<tr>
+       <td>assertTextPresent</td>
+       <td>This is a body</td>
+       <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>

Propchange: 
tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredNestedDefinitionTest.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tiles/framework/trunk/tiles-test/src/test/selenium/ConfiguredNestedDefinitionTest.html
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: 
tiles/framework/trunk/tiles-test/src/test/selenium/PutTagNestedDefinitionTest.html
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-test/src/test/selenium/PutTagNestedDefinitionTest.html?rev=631686&view=auto
==============================================================================
--- 
tiles/framework/trunk/tiles-test/src/test/selenium/PutTagNestedDefinitionTest.html
 (added)
+++ 
tiles/framework/trunk/tiles-test/src/test/selenium/PutTagNestedDefinitionTest.html
 Wed Feb 27 11:30:03 2008
@@ -0,0 +1,71 @@
+<!--
+/*
+ * $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.
+ */
+-->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Put Tag with Nested Definition Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Put Tag with Nested Definition Test</td></tr>
+</thead><tbody>
+<tr>
+       <td>open</td>
+       <td>/tiles-test/index.jsp</td>
+       <td></td>
+</tr>
+<tr>
+       <td>clickAndWait</td>
+       <td>link=Test Insert Nested Definition only using JSP tags</td>
+       <td></td>
+</tr>
+<tr>
+       <td>assertTextPresent</td>
+       <td>This is the title.</td>
+       <td></td>
+</tr>
+<tr>
+       <td>assertTextPresent</td>
+       <td>This is the header</td>
+       <td></td>
+</tr>
+<tr>
+       <td>assertTextPresent</td>
+       <td>This is a nested definition.</td>
+       <td></td>
+</tr>
+<tr>
+       <td>assertTextPresent</td>
+       <td>This is the header</td>
+       <td></td>
+</tr>
+<tr>
+       <td>assertTextPresent</td>
+       <td>This is a body</td>
+       <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>

Propchange: 
tiles/framework/trunk/tiles-test/src/test/selenium/PutTagNestedDefinitionTest.html
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tiles/framework/trunk/tiles-test/src/test/selenium/PutTagNestedDefinitionTest.html
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: tiles/framework/trunk/tiles-test/src/test/selenium/TestSuite.html
URL: 
http://svn.apache.org/viewvc/tiles/framework/trunk/tiles-test/src/test/selenium/TestSuite.html?rev=631686&r1=631685&r2=631686&view=diff
==============================================================================
--- tiles/framework/trunk/tiles-test/src/test/selenium/TestSuite.html (original)
+++ tiles/framework/trunk/tiles-test/src/test/selenium/TestSuite.html Wed Feb 
27 11:30:03 2008
@@ -85,6 +85,9 @@
         <td><a href="ConfiguredDefinitionReversedExplicitTest.html">Configured 
Definition Reversed Explicit Test</a></td>
     </tr>
     <tr>
+        <td><a href="ConfiguredNestedDefinitionTest.html">Configured Nested 
Definition Test</a></td>
+    </tr>
+    <tr>
         <td><a href="PutTagTest.html">Put Tag Test</a></td>
     </tr>
     <tr>
@@ -110,6 +113,9 @@
     </tr>
     <tr>
         <td><a href="PutTagReversedExplicitTest.html">Put Tag Reversed 
Explicit Test</a></td>
+    </tr>
+    <tr>
+        <td><a href="PutTagNestedDefinitionTest.html">Put Tag with Nested 
Definition Test</a></td>
     </tr>
     <tr>
         <td><a href="PutListTagTest.html">Put List Tag Test</a></td>


Reply via email to