Revision: 794
http://jwebunit.svn.sourceforge.net/jwebunit/?rev=794&view=rev
Author: henryju
Date: 2009-01-21 14:11:01 +0000 (Wed, 21 Jan 2009)
Log Message:
-----------
Fixed JUnit tests on Windows (problem with system dependent line breaks)
Modified Paths:
--------------
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FormSubmissionTest.java
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java
Modified:
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FormSubmissionTest.java
===================================================================
---
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FormSubmissionTest.java
2009-01-14 08:08:40 UTC (rev 793)
+++
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FormSubmissionTest.java
2009-01-21 14:11:01 UTC (rev 794)
@@ -51,7 +51,7 @@
setTextField("text", "sometext");
submit("button");
assertTextPresent("Submitted parameters");
- assertTextPresent("Params are:\ntext=sometext");
+ assertTextPresent("Params are:" + System.getProperty("line.separator")
+ "text=sometext");
clickLink("return");
setTextField("text", "anothertext");
submit();
@@ -116,7 +116,7 @@
checkCheckbox("checkBox", "3");
checkCheckbox("checkBox", "3"); // check for duplicates
submit();
- assertTextPresent("checkBox=1,3\n");
+ assertTextPresent("checkBox=1,3" +
System.getProperty("line.separator"));
}
public void testCheckBoxDeSelectionWithSameFieldName() {
@@ -136,7 +136,7 @@
setTextField("color", "blue");
uncheckCheckbox("checkBox");
submit();
- assertTextPresent("color=blue\n");
+ assertTextPresent("color=blue" + System.getProperty("line.separator"));
}
public void testRadioSelection() {
@@ -144,7 +144,7 @@
clickRadioOption("radio", "1");
assertRadioOptionSelected("radio", "1");
submit();
- assertTextPresent("radio=1\n");
+ assertTextPresent("radio=1" + System.getProperty("line.separator"));
clickLink("return");
clickRadioOption("radio", "2");
clickRadioOption("radio", "3");
@@ -152,14 +152,14 @@
assertRadioOptionNotSelected("radio", "2");
assertRadioOptionSelected("radio", "3");
submit();
- assertTextPresent("radio=3\n");
+ assertTextPresent("radio=3" + System.getProperty("line.separator"));
}
public void testSingleFormSingleUnnamedButtonSubmission() {
beginAt("/SingleUnnamedButtonForm.html");
setTextField("color", "blue");
submit();
- assertTextPresent("color=blue\n");
+ assertTextPresent("color=blue" + System.getProperty("line.separator"));
}
public void testSingleNamedButtonSubmission() {
@@ -172,7 +172,7 @@
public void testSingleFormMultipleButtonSubmission() {
gotoMultiButtonPage();
submit("color");
- assertTextPresent("Params are:\ncolor=red");
+ assertTextPresent("Params are:" + System.getProperty("line.separator")
+ "color=red");
gotoMultiButtonPage();
submit("color", "blue");
assertTextPresent("color=blue");
@@ -252,7 +252,7 @@
beginAt("/MultiFormPage.html");
setTextField("param2", "anyvalue");
submit("button2b");
- assertTextPresent("param2=anyvalue\n");
+ assertTextPresent("param2=anyvalue" +
System.getProperty("line.separator"));
assertTextPresent("button2b=b2b");
}
Modified:
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
===================================================================
---
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
2009-01-14 08:08:40 UTC (rev 793)
+++
trunk/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/FramesAndWindowsTest.java
2009-01-21 14:11:01 UTC (rev 794)
@@ -151,7 +151,7 @@
assertFormPresent();
setTextField("color", "red");
submit("submit");
- assertTextPresent("color=red\n");
+ assertTextPresent("color=red" + System.getProperty("line.separator"));
}
public void testFormInputInInlineFrame() {
@@ -160,7 +160,7 @@
assertFormPresent();
setTextField("color", "red");
submit("submit");
- assertTextPresent("color=red\n");
+ assertTextPresent("color=red" + System.getProperty("line.separator"));
}
//TODO this just posts to a new frameset inside the frame, is the test
needed?
Modified:
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java
===================================================================
---
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java
2009-01-14 08:08:40 UTC (rev 793)
+++
trunk/jwebunit-core/src/main/java/net/sourceforge/jwebunit/junit/WebTester.java
2009-01-21 14:11:01 UTC (rev 794)
@@ -3205,7 +3205,7 @@
}
/**
- * Tell that the given alert boxe is expected.
+ * Tell that the given alert box is expected.
*
* @param message Message in the alert.
*/
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development