Revision: 555
Author: solsson
Date: 2006-08-02 06:15:46 -0700 (Wed, 02 Aug 2006)
ViewCVS: http://svn.sourceforge.net/jwebunit/?rev=555&view=rev
Log Message:
-----------
Everything except table assertion passes now.
* |check|option equals| must be changed to 'selected option equals' in
accordance with the jWebUnit API change.
* |enter| does not work for radio option anymore. Use |select|radio option|
instead.
Modified Paths:
--------------
trunk/jwebfit/src/test/fit/testRadioGroup.fit
trunk/jwebfit/src/test/fit/testSelectBox.fit
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/testservlets/ColorPostServlet.java
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/testservlets/MoriaPostServlet.java
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/testservlets/PersonalInfoPostServlet.java
trunk/jwebfit/src/test/resources/testSite/ColorForm.html
trunk/jwebfit/src/test/resources/testSite/PersonalInfoForm.html
Modified: trunk/jwebfit/src/test/fit/testRadioGroup.fit
===================================================================
--- trunk/jwebfit/src/test/fit/testRadioGroup.fit 2006-08-02 12:01:20 UTC
(rev 554)
+++ trunk/jwebfit/src/test/fit/testRadioGroup.fit 2006-08-02 13:15:46 UTC
(rev 555)
@@ -9,10 +9,13 @@
| check | radio option present | sex | male |
| check | radio option present | sex | female |
| check | radio option not present | sex | other |
-| enter | sex | female ||
+| check | radio option not selected | sex | female |
+| select | radio option | sex
| female |
| check | radio option selected | sex | female |
| check | radio option not selected | sex | male |
| enter | fullName | Jim ||
| press | submit |||
| check | title equals | Personal Info Results||
-| check | text present | You are female ||
\ No newline at end of file
+| check | text present | You are female ||
+
+'enter' can not be used for radio option in jwebunit 2
\ No newline at end of file
Modified: trunk/jwebfit/src/test/fit/testSelectBox.fit
===================================================================
--- trunk/jwebfit/src/test/fit/testSelectBox.fit 2006-08-02 12:01:20 UTC
(rev 554)
+++ trunk/jwebfit/src/test/fit/testSelectBox.fit 2006-08-02 13:15:46 UTC
(rev 555)
@@ -9,7 +9,7 @@
|begin | personalInfoForm |||
|enter | fullName | Jim ||
|select | option | state | Tennessee |
-|check | option equals | state | Tennessee |
+|check | selected option equals | state | Tennessee |
|press | submit |||
|check | title equals | Personal Info Results ||
|check | text present | You live in Tennessee ||
Modified:
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/testservlets/ColorPostServlet.java
===================================================================
---
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/testservlets/ColorPostServlet.java
2006-08-02 12:01:20 UTC (rev 554)
+++
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/testservlets/ColorPostServlet.java
2006-08-02 13:15:46 UTC (rev 555)
@@ -12,7 +12,8 @@
private static final long serialVersionUID = 1L;
protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
- response.getWriter().write("<html><head><title>Color
Page</title></head>" +
+ response.setContentType("text/html");
+ response.getWriter().write("<html><head><title>Color
Page</title></head>" +
"<body style=\"color: rgb(0,0,0); background-color: " +
request.getParameter("color") + ";\" link=\"#000099\" vlink=\"#990099\"
alink=\"#000099\">" +
"Your chosen color was " + request.getParameter("color") + "."
+
"</body></html>");
Modified:
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/testservlets/MoriaPostServlet.java
===================================================================
---
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/testservlets/MoriaPostServlet.java
2006-08-02 12:01:20 UTC (rev 554)
+++
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/testservlets/MoriaPostServlet.java
2006-08-02 13:15:46 UTC (rev 555)
@@ -12,6 +12,7 @@
protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException,
IOException {
+ response.setContentType("text/html");
if ((!request.getParameter("EnterButton").equals(""))
&&
(request.getParameter("password").toLowerCase().equals("friend"))) {
response.getWriter().print(
Modified:
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/testservlets/PersonalInfoPostServlet.java
===================================================================
---
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/testservlets/PersonalInfoPostServlet.java
2006-08-02 12:01:20 UTC (rev 554)
+++
trunk/jwebfit/src/test/java/net/sourceforge/jwebunit/fit/testservlets/PersonalInfoPostServlet.java
2006-08-02 13:15:46 UTC (rev 555)
@@ -12,7 +12,11 @@
private static final long serialVersionUID = 1L;
protected void doPost(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
- String citizenship = "not a citizen";
+ response.setContentType("text/html");
+ for (Object param : request.getParameterMap().keySet()) {
+ System.out.println("param: " + param + " = " +
request.getParameterMap().get(param));
+ }
+ String citizenship = "not a citizen";
if (request.getParameter("citizenCheckbox") != null &&
request.getParameterValues("citizenCheckbox")[0].equals("on")) {
citizenship = "a citizen";
Modified: trunk/jwebfit/src/test/resources/testSite/ColorForm.html
===================================================================
--- trunk/jwebfit/src/test/resources/testSite/ColorForm.html 2006-08-02
12:01:20 UTC (rev 554)
+++ trunk/jwebfit/src/test/resources/testSite/ColorForm.html 2006-08-02
13:15:46 UTC (rev 555)
@@ -1,4 +1,6 @@
-<html>
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Choose Color</title></head>
<div align="center"><h1>Choose Color</h1></div>
<body style="background-color: beige">
Modified: trunk/jwebfit/src/test/resources/testSite/PersonalInfoForm.html
===================================================================
--- trunk/jwebfit/src/test/resources/testSite/PersonalInfoForm.html
2006-08-02 12:01:20 UTC (rev 554)
+++ trunk/jwebfit/src/test/resources/testSite/PersonalInfoForm.html
2006-08-02 13:15:46 UTC (rev 555)
@@ -1,20 +1,22 @@
-<html>
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Personal Info Questionnaire</title></head>
<body style="background-color: beige">
<div align="center"><h1>Personal Info Questionnaire</h1></div>
- <form method=POST action="/personalInfoPost" >
+ <form method="post" action="/personalInfoPost" >
<table align="center">
<tr><td colspan="2">Please describe yourself:</td></tr>
<tr><td colspan="2"> </td></tr>
- <tr><td>Name </td><td><input type="text"
name="fullName"></td></tr>
- <tr><td>Citizen? </td><td><input type="checkbox"
name="citizenCheckbox" value="on"></td></tr>
- <tr><td>Sex </td><td><input type="radio" name="sex"
value="male">Male
- <input type="radio" name="sex"
value="female">Female</td></tr>
+ <tr><td>Name </td><td><input type="text"
name="fullName"/></td></tr>
+ <tr><td>Citizen? </td><td><input type="checkbox"
name="citizenCheckbox" value="on"/></td></tr>
+ <tr><td>Sex </td><td><input type="radio" name="sex"
value="male"/>Male
+ <input type="radio" name="sex"
value="female"/>Female</td></tr>
<tr><td>State of Residence </td><td><select
name="state"><option value="Tennessee">Tennessee</option>
- <option value="None" SELECTED> </option>
+ <option value="None" selected="selected"> </option>
<option
value="Georgia">Georgia</option></select></td></tr>
<tr><td colspan="2"> </td></tr>
- <tr><td colspan="2" align="center"><input
type="submit"></td></tr>
+ <tr><td colspan="2" align="center"><input
type="submit"/></td></tr>
</table>
</form>
</body>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development