Revision: 592
http://svn.sourceforge.net/jwebunit/?rev=592&view=rev
Author: henryju
Date: 2006-10-28 02:58:45 -0700 (Sat, 28 Oct 2006)
Log Message:
-----------
Add unit tests for JavaScript alert.
Modified Paths:
--------------
branches/1.x/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/JavaScriptTest.java
Modified:
branches/1.x/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/JavaScriptTest.java
===================================================================
---
branches/1.x/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/JavaScriptTest.java
2006-10-27 13:12:53 UTC (rev 591)
+++
branches/1.x/jwebunit-commons-tests/src/main/java/net/sourceforge/jwebunit/tests/JavaScriptTest.java
2006-10-28 09:58:45 UTC (rev 592)
@@ -29,5 +29,21 @@
//FIXME Fails with HtmlUnit
//assertTextPresent("Hello World");
}
+
+ public void testAlertOnPageLoad() {
+ beginAt("Alert.html");
+ assertJavascriptAlertPresent("Foo Bar");
+ }
+
+ public void testInvalidAlertOnPageLoad() {
+ beginAt("Alert.html");
+ assertFail("assertJavascriptAlertPresent", "invalid");
+ }
+ public void testMultipleAlerts() {
+ beginAt("MultipleAlerts.html");
+ assertJavascriptAlertPresent("Alert 1");
+ assertJavascriptAlertPresent("Alert 2");
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jwebunit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development