Author: dolander
Date: Thu Apr 14 13:38:30 2005
New Revision: 161349
URL: http://svn.apache.org/viewcvs?view=rev&rev=161349
Log:
Add BVT for Jira 522 -- Verification of the Error message from a Area tag.
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/j522/
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/j522/Controller.jpf
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/j522/index.jsp
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/j522/redblue.gif
(with props)
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/J522.xml
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/TextBox.java
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
Modified:
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/TextBox.java
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/TextBox.java?view=diff&r1=161348&r2=161349
==============================================================================
---
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/TextBox.java
(original)
+++
incubator/beehive/trunk/netui/src/tags-html/org/apache/beehive/netui/tags/html/TextBox.java
Thu Apr 14 13:38:30 2005
@@ -138,6 +138,15 @@
}
/**
+ * return the password <code>boolean</code> value.
+ * @return
+ */
+ protected boolean getPassword()
+ {
+ return _password;
+ }
+
+ /**
* Set if this TextBox is read-only.
* @param readonly - the read-only state
* @jsptagref.attributedescription Boolean. Determines if the rendered
<input> element is read-only.
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/j522/Controller.jpf
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/j522/Controller.jpf?view=auto&rev=161349
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/j522/Controller.jpf
(added)
+++
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/j522/Controller.jpf
Thu Apr 14 13:38:30 2005
@@ -0,0 +1,111 @@
+package bugs.j522;
+
+import javax.servlet.http.HttpSession;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+/**
+ * This is the default controller for a blank web application.
+ */
[EMAIL PROTECTED]
+public class Controller extends PageFlowController
+{
+ private String _action;
+ private String _text;
+ public String getAction() {
+ return _action;
+ }
+
+ public String getText() {
+ return _text;
+}
+
+
+ @Jpf.Action(
+ forwards={
+ @Jpf.Forward(name="index", path="index.jsp")
+ }
+ )
+ protected Forward begin()
+ {
+ _action = "begin";
+ return new Forward("index");
+ }
+
+ @Jpf.Action(
+ forwards={
+ @Jpf.Forward(name="index", path="index.jsp")
+ }
+ )
+ protected Forward red()
+ {
+ _action = "red";
+ return new Forward("index");
+ }
+
+ @Jpf.Action(
+ forwards={
+ @Jpf.Forward(name="index", path="index.jsp")
+ }
+ )
+ protected Forward blue()
+ {
+ _action = "blue";
+ return new Forward("index");
+ }
+
+ @Jpf.Action(
+ forwards={
+ @Jpf.Forward(name="index", path="index.jsp")
+ }
+ )
+ protected Forward post(Bean form)
+ {
+ _action = "post";
+ _text = form.getText1();
+ return new Forward("index");
+ }
+
+ /**
+ * Callback that is invoked when this controller instance is created.
+ */
+ protected void onCreate()
+ {
+ }
+
+ /**
+ * Callback that is invoked when this controller instance is destroyed.
+ */
+ protected void onDestroy(HttpSession session)
+ {
+ }
+
+ public static class Bean extends FormData
+ {
+ private String text1;
+
+ private String text2;
+
+ public String getText1()
+ {
+ return text1;
+ }
+
+ public void setText1(String value)
+ {
+ text1 = value;
+ }
+
+ public String getText2()
+ {
+ return text2;
+ }
+
+ public void setText2(String value)
+ {
+ text2 = value;
+ }
+ }
+}
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/j522/index.jsp
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/j522/index.jsp?view=auto&rev=161349
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/j522/index.jsp
(added)
+++ incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/j522/index.jsp
Thu Apr 14 13:38:30 2005
@@ -0,0 +1,28 @@
+<%@ page language="java" contentType="text/html;charset=UTF-8"%>
+<%@ taglib prefix="netui" uri="http://beehive.apache.org/netui/tags-html-1.0"%>
+
+<netui:html>
+ <head>
+ <netui:base/>
+ </head>
+ <netui:body tagId="body">
+ <p style="color: green">This test verifies that a Area can be used to
+ submit a form. The image and the map containing the area tags must be
+ within the form. Below, by pushing on the red square you will submit
+ the form to the "post" action.
+ </p>
+ <netui:form action="post">
+ Text: <netui:textBox dataSource="actionForm.text1" /><br><br>
+ <netui:image src="redblue.gif" alt="pick a color" usemap="#map1"
+ width="200" height="100"/>
+ <map id="map1" name="map1">
+ <netui:area shape="rect" coords="10, 10, 90, 90"/>
+ <netui:area shape="rect" coords="110, 10, 190, 90"/>
+ </map>
+ </netui:form>
+ <hr>
+ <netui:span value="Action: ${pageFlow.action}"/><br>
+ <netui:span value="Text: ${pageFlow.text}"/><br>
+ </p>
+ </netui:body>
+</netui:html>
Added:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/j522/redblue.gif
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/j522/redblue.gif?view=auto&rev=161349
==============================================================================
Binary file - no diff available.
Propchange:
incubator/beehive/trunk/netui/test/webapps/drt/coreWeb/bugs/j522/redblue.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified:
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml?view=diff&r1=161348&r2=161349
==============================================================================
---
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
(original)
+++
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/config/testRecorder-tests.xml
Thu Apr 14 13:38:30 2005
@@ -4326,6 +4326,15 @@
</categories>
</test>
<test>
+ <name>J522</name>
+ <description>Error in Area tag.</description>
+ <webapp>coreWeb</webapp>
+ <categories>
+ <category>bvt</category>
+ <category>jiriBugs</category>
+ </categories>
+ </test>
+ <test>
<name>JpfScopedFormsTest49</name>
<description>JpfScopedFormsTest49</description>
<webapp>coreWeb</webapp>
Added:
incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/J522.xml
URL:
http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/J522.xml?view=auto&rev=161349
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/J522.xml
(added)
+++ incubator/beehive/trunk/netui/test/webapps/drt/testRecorder/tests/J522.xml
Thu Apr 14 13:38:30 2005
@@ -0,0 +1,166 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ses:recorderSession
xmlns:ses="http://beehive.apache.org/netui/tools/testrecorder/2004/session">
+ <ses:sessionName>J522</ses:sessionName>
+ <ses:tester>Daryl</ses:tester>
+ <ses:startDate>14 Apr 2005, 01:51:34.558 PM MDT</ses:startDate>
+ <ses:description>Verification of errors in Area.</ses:description>
+ <ses:tests>
+ <ses:test>
+ <ses:testNumber>1</ses:testNumber>
+ <ses:request>
+ <ses:protocol>HTTP</ses:protocol>
+ <ses:protocolVersion>1.1</ses:protocolVersion>
+ <ses:host>localhost</ses:host>
+ <ses:port>8080</ses:port>
+ <ses:uri>/coreWeb/bugs/j522/Controller.jpf</ses:uri>
+ <ses:method>GET</ses:method>
+ <ses:parameters/>
+ <ses:cookies>
+ <ses:cookie>
+ <ses:name>JSESSIONID</ses:name>
+ <ses:value>F19772AE32919CFE9D28ECB791665E96</ses:value>
+ </ses:cookie>
+ </ses:cookies>
+ <ses:headers>
+ <ses:header>
+ <ses:name>---------------</ses:name>
+ <ses:value>------------</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept</ses:name>
+
<ses:value>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-charset</ses:name>
+ <ses:value>ISO-8859-1,utf-8;q=0.7,*;q=0.7</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>accept-language</ses:name>
+ <ses:value>en-us,en;q=0.5</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>connection</ses:name>
+ <ses:value>keep-alive</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>cookie</ses:name>
+
<ses:value>JSESSIONID=F19772AE32919CFE9D28ECB791665E96</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>host</ses:name>
+ <ses:value>localhost:8080</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>keep-alive</ses:name>
+ <ses:value>300</ses:value>
+ </ses:header>
+ <ses:header>
+ <ses:name>user-agent</ses:name>
+ <ses:value>Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.7.6) Gecko/20050317 Firefox/1.0.2</ses:value>
+ </ses:header>
+ </ses:headers>
+ </ses:request>
+ <ses:response>
+ <ses:statusCode>200</ses:statusCode>
+ <ses:reason/>
+ <ses:responseBody><![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html lang="en">
+
+ <head>
+ <base href="http://localhost:8080/coreWeb/bugs/j522/index.jsp">
+ </head>
+ <body id="body">
+ <p style="color: green">This test verifies that a Area can be used to
+ submit a form. The image and the map containing the area tags must be
+ within the form. Below, by pushing on the red square you will submit
+ the form to the "post" action.
+ </p>
+ <form action="/coreWeb/bugs/j522/post.do" method="post">
+ Text: <input type="text" name="{actionForm.text1}"><br><br>
+ <img src="/coreWeb/bugs/j522/redblue.gif" width="200" height="100"
usemap="#map1" alt="pick a color">
+ <map id="map1" name="map1">
+ <span style="color:red;background-color:white">
+ [<b>Tag Error:1</b>, Found in tag <b>Area</b>]</span>
+ <span style="color:red;background-color:white">
+ [<b>Tag Error:2</b>, Found in tag <b>Area</b>]</span>
+ </map>
+ </form>
+ <hr>
+ <span>Action: begin</span><br>
+ <span>Text: </span><br>
+ </p>
+ <div> <hr /><table border="1" cellspacing="0"
style="color:red;background-color:white">
+ <tr><th colspan="6">Page Errors</th></tr>
+ <tr><th>Error Number</th><th>Tag Type</th><th colspan="4">Error</th></tr>
+<tr><th>1</th><th>Area</th><th>Message</th><td>The Area URI is invalid; it
must be exactly one of tagId, href, action</td></tr>
+<tr><th>2</th><th>Area</th><th>Message</th><td>The Area URI is invalid; it
must be exactly one of tagId, href, action</td></tr>
+</table></div>
+<script language="JavaScript" type="text/JavaScript">
+<!--
+
+// **** Start the NetUI Framework Generated JavaScript ****
+
+// Build the netui_names table to map the tagId attributes
+// to the real id written into the HTML
+if (netui_names == null)
+ var netui_names = new Object();
+netui_names.body="body"
+
+
+// method which will return a real id for a tagId,
+// the tag parameter will be used to find the idScope for
+// containers that may scope their ids
+function getNetuiTagName(id, tag)
+{
+ var idScope = getScopeId(tag);
+ if (idScope == "")
+ return netui_names[id];
+ else
+ return netui_names[idScope + "__" + id];
+}
+
+// This method will walk the hierarchy from the pass element looking for a
idScope.
+// The first idScope found will be returned or the empty string if a idScope
is not found.
+function getScopeId(tag)
+{
+ if (tag == null || tag.getAttribute == null)
+ return "";
+ var attrVal = tag.getAttribute("netui:idScope");
+ if (attrVal != null)
+ return attrVal;
+ return getScopeId(tag.parentNode);
+}
+
+// lookup by tagId to "real id"
+function lookupIdByTagId(id, tag)
+{
+ var idScope = lookupIdScope(tag,".");
+ return (idScope == "") ? id : idScope + id;
+}
+
+//Non-Legacy lookup method creating a fully qualified scope id
+function lookupIdScope(tag,sep)
+{
+ var val = "";
+ if (sep == null) sep = "";
+ while (tag != null && tag.getAttribute != null) {
+ try {
+ var attrVal = tag.getAttribute("netui:idScope");
+ } catch (e) { /* ignore, in IE6 calling on a table results in an
exception */ }
+ if (attrVal != null)
+ val = attrVal + sep + val;
+ tag = tag.parentNode;
+ }
+ return val;
+}
+-->
+</script></body>
+
+</html>]]></ses:responseBody>
+ </ses:response>
+ </ses:test>
+ </ses:tests>
+ <ses:endDate>14 Apr 2005, 01:51:44.453 PM MDT</ses:endDate>
+ <ses:testCount>1</ses:testCount>
+</ses:recorderSession>
\ No newline at end of file