Update of /cvsroot/jwebunit/jWebUnit/test/net/sourceforge/jwebunit
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4385/test/net/sourceforge/jwebunit
Modified Files:
FormSubmissionCheckboxesTest.java
Log Message:
Added JSP for asserting submitted request parameters. Used that to fix the
checkboxes test to validate submitted form.
Index: FormSubmissionCheckboxesTest.java
===================================================================
RCS file:
/cvsroot/jwebunit/jWebUnit/test/net/sourceforge/jwebunit/FormSubmissionCheckboxesTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FormSubmissionCheckboxesTest.java 22 Dec 2005 18:05:01 -0000 1.1
--- FormSubmissionCheckboxesTest.java 23 Dec 2005 10:21:33 -0000 1.2
***************
*** 17,30 ****
public void setUp() throws Exception {
super.setUp();
! getTestContext().setBaseUrl(HOST_PATH + "/FormSubmissionTest");
}
public void testCheckboxIdentificationLabelBeforeBox() {
! beginAt("/CheckboxFormWithLabels.html");
// we don't know the name or value, just the label
! checkCheckboxWithLabel("Check 20");
! //submit();
! //assertTextPresent("Params are: chk=20");
! assertFormElementEquals("chk", "20");
}
--- 17,31 ----
public void setUp() throws Exception {
super.setUp();
! getTestContext().setBaseUrl(HOST_PATH + "/FormSubmissionTest/");
}
public void testCheckboxIdentificationLabelBeforeBox() {
! beginAt("CheckboxFormWithLabels.html");
! assertFormPresent();
// we don't know the name or value, just the label
! checkCheckboxWithLabel("Check 20");
! assertFormElementEquals("chk", "20");
! submit();
! assertTextPresent(" chk=20 ");
}
***************
*** 38,46 ****
*/
private void doTestCheckboxBefore(int value) {
! beginAt("/CheckboxFormWithLabels.html");
checkCheckboxBeforeLabel("Check " + value);
! //submit();
! //assertTextPresent("Params are: chk=" + value);
! assertFormElementEquals("chk", "" + value);
}
--- 39,47 ----
*/
private void doTestCheckboxBefore(int value) {
! beginAt("CheckboxFormWithLabels.html");
checkCheckboxBeforeLabel("Check " + value);
! assertFormElementEquals("chk", "" + value);
! submit();
! assertTextPresent(" chk=" + value + " ");
}
***************
*** 54,63 ****
private void doTestRadioBefore(int value) {
! beginAt("/CheckboxFormWithLabels.html");
! // we don't know the name or value, just the label
checkCheckboxBeforeLabel("Radio " + value);
! //submit("button");
! //assertTextPresent("Params are: chk=" + value);
! assertFormElementEquals("rad", "" + value);
}
--- 55,63 ----
private void doTestRadioBefore(int value) {
! beginAt("CheckboxFormWithLabels.html");
checkCheckboxBeforeLabel("Radio " + value);
! assertFormElementEquals("radio", "" + value);
! submit();
! assertTextPresent(" radio=" + value + " ");
}
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development