myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pau...@apache.org
Subject svn commit: r481238 - in /myfaces/tomahawk/trunk/examples/simple/src: main/webapp/testSuite/hForm.jsp main/webapp/testSuite/template.jsp test/selenium/TestSuite.html test/selenium/hFormText.html
Date Fri, 01 Dec 2006 13:23:34 GMT
Author: paulsp
Date: Fri Dec  1 05:23:33 2006
New Revision: 481238

URL: http://svn.apache.org/viewvc?view=rev&rev=481238
Log:
o TOMAHAWK-809 Add test for h:Form
o Update test template

Added:
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/hForm.jsp
    myfaces/tomahawk/trunk/examples/simple/src/test/selenium/hFormText.html
Modified:
    myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/template.jsp
    myfaces/tomahawk/trunk/examples/simple/src/test/selenium/TestSuite.html

Added: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/hForm.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/hForm.jsp?view=auto&rev=481238
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/hForm.jsp (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/hForm.jsp Fri Dec  1
05:23:33 2006
@@ -0,0 +1,74 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+<!--
+/*
+ * 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.
+ */
+//-->
+
+<f:view>
+  <t:document>
+    <t:documentHead>
+      <t:htmlTag value="title">
+        <h:outputText value="Test #{view.viewId}" />
+      </t:htmlTag>
+    </t:documentHead>
+    <t:documentBody>
+      <h:outputText value="Running test #{view.viewId}" />
+      <t:htmlTag value="br" />
+      <t:htmlTag value="br" />
+
+      <!-- Begin test -->
+
+      <h:form id="basicForm">
+        <h:outputText id="hOutputText" value="in basicForm" />
+      </h:form>
+
+      <!-- Verify form is not rendered -->
+      <h:form id="nonRenderedForm" rendered="false">
+        <h:outputText id="hOutputText" value="in nonrenderedForm" />
+      </h:form>
+
+      <!-- 
+  Just testing attributes.  The value for each attribute are not ment
+  to be valid.
+-->
+      <h:form id="formWithAttributes" target="formFrame"
+        accept="contentType" acceptCharset="charSet"
+        enctype="encodeType" onreset="Alert('onReset');"
+        onsubmit="Alert('onSubmit');">
+        <h:outputText id="hOutputText" value="in formWithAttributes" />
+      </h:form>
+
+      <!-- End test -->
+
+      <t:htmlTag value="br" />
+      <t:htmlTag value="br" />
+      <h:form id="footerLinks">
+        <h:commandLink id="homeLink" action="home" value="Home" />
+        <h:outputText value=" " />
+        <h:outputLink id="sourceLink" target="sourceWindow"
+          value="#{facesContext.externalContext.requestContextPath}#{view.viewId}.source">
+          <h:outputText value="View source in popup window" />
+        </h:outputLink>
+      </h:form>
+    </t:documentBody>
+  </t:document>
+</f:view>

Modified: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/template.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/template.jsp?view=diff&rev=481238&r1=481237&r2=481238
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/template.jsp (original)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/testSuite/template.jsp Fri Dec
 1 05:23:33 2006
@@ -27,11 +27,19 @@
   <t:document>
     <t:documentHead>
       <t:htmlTag value="title">
-        <h:outputText value="Hello World" />
+        <h:outputText value="#{view.viewId}" />
       </t:htmlTag>
     </t:documentHead>
     <t:documentBody>
-      <h:outputText value="Hello World" />
+      <h:outputText value="Running test #{view.viewId}" />
+      <t:htmlTag value="br" />
+      <t:htmlTag value="br" />
+
+      <!-- Begin test -->
+
+      <!-- End test -->
+
+      <t:htmlTag value="br" />
       <h:form id="footerLinks">
         <h:commandLink id="homeLink" action="home" value="Home" />
         <h:outputText value=" " />

Modified: myfaces/tomahawk/trunk/examples/simple/src/test/selenium/TestSuite.html
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/test/selenium/TestSuite.html?view=diff&rev=481238&r1=481237&r2=481238
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/test/selenium/TestSuite.html (original)
+++ myfaces/tomahawk/trunk/examples/simple/src/test/selenium/TestSuite.html Fri Dec  1 05:23:33
2006
@@ -30,6 +30,11 @@
                <a href="hOutputText.html">hOutputText</a>
            </td>
          </tr>
+          <tr>
+            <td>
+               <a href="hFormText.html">hForm</a>
+           </td>
+         </tr>
          <tr>
             <td>
                <a href="hPanelGridTest.html">hpanelGrid</a>

Added: myfaces/tomahawk/trunk/examples/simple/src/test/selenium/hFormText.html
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/test/selenium/hFormText.html?view=auto&rev=481238
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/test/selenium/hFormText.html (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/test/selenium/hFormText.html Fri Dec  1 05:23:33
2006
@@ -0,0 +1,84 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>hFormText</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">hFormText</td></tr>
+</thead><tbody>
+<tr>
+	<td>open</td>
+	<td>/myfaces-example-simple/testSuite/home.jsf</td>
+	<td></td>
+</tr>
+<tr>
+	<td>open</td>
+	<td>/myfaces-example-simple/testSuite/hForm.jsf</td>
+	<td></td>
+</tr>
+<!--Test basicForm-->
+<tr>
+	<td>assertElementPresent</td>
+	<td>//form[@id='basicForm']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertElementPresent</td>
+	<td>//span[@id='basicForm:hOutputText']</td>
+	<td></td>
+</tr>
+<!--Test nonRenderedForm-->
+<tr>
+	<td>assertElementNotPresent</td>
+	<td>//form[@id='nonRenderedForm']</td>
+	<td></td>
+</tr>
+<!--Test formWithAttributes-->
+<tr>
+	<td>assertElementPresent</td>
+	<td>//form[@id='formWithAttributes']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertElementPresent</td>
+	<td>//span[@id='formWithAttributes:hOutputText']</td>
+	<td></td>
+</tr>
+<tr>
+	<td>assertAttribute</td>
+	<td>//form[@id='formWithAttributes']@target</td>
+	<td>formFrame</td>
+</tr>
+<tr>
+	<td>assertAttribute</td>
+	<td>//form[@id='formWithAttributes']@accept</td>
+	<td>contentType</td>
+</tr>
+<!-- IE - it appears the attribute 'accept-charset' is not available
+<tr>
+	<td>assertAttribute</td>
+	<td>//form[@id='formWithAttributes']@accept-charset</td>
+	<td>charSet</td>
+</tr>
+-->
+<tr>
+	<td>assertAttribute</td>
+	<td>//form[@id='formWithAttributes']@enctype</td>
+	<td>encodeType</td>
+</tr>
+<tr>
+	<td>assertAttribute</td>
+	<td>//form[@id='formWithAttributes']@onreset</td>
+	<td>glob:*Alert('onReset');*</td>
+</tr>
+<tr>
+	<td>assertAttribute</td>
+	<td>//form[@id='formWithAttributes']@onsubmit</td>
+	<td>glob:*Alert('onSubmit');*</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>



Mime
View raw message