You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by an...@apache.org on 2007/11/18 15:56:37 UTC
svn commit: r596090 - in /tapestry/tapestry4/trunk/tapestry-framework/src:
test-data/app1/Tap1775.html
test/org/apache/tapestry/integration/TestBrowserIssues.java
Author: andyhot
Date: Sun Nov 18 06:56:36 2007
New Revision: 596090
URL: http://svn.apache.org/viewvc?rev=596090&view=rev
Log:
reproduce TAPESTRY-1775
Modified:
tapestry/tapestry4/trunk/tapestry-framework/src/test-data/app1/Tap1775.html
tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/TestBrowserIssues.java
Modified: tapestry/tapestry4/trunk/tapestry-framework/src/test-data/app1/Tap1775.html
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test-data/app1/Tap1775.html?rev=596090&r1=596089&r2=596090&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test-data/app1/Tap1775.html (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test-data/app1/Tap1775.html Sun Nov 18 06:56:36 2007
@@ -4,23 +4,22 @@
<form jwcid="@Form" async="true" updateComponents="in">
<div jwcid="in@Any">
- <input jwcid="@Submit" value="First" listener="listener:doFirst" async="true"/>
- <input jwcid="@Submit" value="Second" listener="listener:doSecond" async="true"/>
- <input type="submit" value="Nothing"/>
+ <input jwcid="first@Submit" value="First" listener="listener:doFirst" async="true"/>
+ <input jwcid="second@Submit" value="Second" listener="listener:doSecond" async="true"/>
+ <input id="nothing" type="submit" value="Nothing"/>
<span jwcid="msg@Insert" value="ognl:message" style="color:red;" renderTag="true">Message</span>
</div>
</form>
<form jwcid="@Form" async="true" updateComponents="msg2"
success="listener:doSuccess" cancel="listener:doCancel" refresh="listener:doRefresh">
- <input jwcid="@Submit" value="Success" async="true"/>
- <input jwcid="@Submit" value="Cancel" submitType="cancel" async="true"/>
- <input jwcid="@Submit" value="Refresh" submitType="refresh" async="true"/>
+ <input jwcid="success@Submit" value="Success" async="true"/>
+ <input jwcid="cancel@Submit" value="Cancel" submitType="cancel" async="true"/>
+ <input jwcid="refresh@Submit" value="Refresh" submitType="refresh" async="true"/>
</form>
- <div jwcid="msg2@Any" style="color:red;">
- <span jwcid="@Insert" value="ognl:message">Message2</span>
- </div>
+ <div jwcid="msg2@Any"
+ style="color:red;"><span jwcid="@Insert" value="ognl:message">Message2</span></div>
</body>
</html>
Modified: tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/TestBrowserIssues.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/TestBrowserIssues.java?rev=596090&r1=596089&r2=596090&view=diff
==============================================================================
--- tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/TestBrowserIssues.java (original)
+++ tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/integration/TestBrowserIssues.java Sun Nov 18 06:56:36 2007
@@ -33,7 +33,7 @@
private static final int JETTY_PORT = 9999;
private static final String BASE_URL = "http://localhost:9999/";
- /** 60 seconds */
+ /** 60 seconds. */
public static final String PAGE_LOAD_TIMEOUT = "60000";
private Selenium _selenium;
@@ -71,11 +71,7 @@
public void test_issue_1141() throws Exception
{
- _selenium.open(BASE_URL);
-
- clickAndWait("link=TAPESTRY-1141");
-
- assertTrue(_selenium.getTitle().contains("TAPESTRY-1141"), _selenium.getHtmlSource());
+ openIssuePage("TAPESTRY-1141");
String body = _selenium.getBodyText();
@@ -103,28 +99,78 @@
waitForInnerHTML("testme", "[6]");
}
-
+
public void test_issue_1129() throws Exception
{
- _selenium.open(BASE_URL);
-
- clickAndWait("link=TAPESTRY-1129");
-
- assertTrue(_selenium.getTitle().contains("TAPESTRY-1129"));
+ openIssuePage("TAPESTRY-1129");
String body = _selenium.getBodyText();
assertTrue(body.contains("false"));
-
+
_selenium.click("link=refresh");
-
+
waitForInnerHTML("flag", "true");
-
+
assertTrue(_selenium.isElementPresent("TextArea"));
-
+
assertTrue("".equals(_selenium.getValue("TextArea").trim()));
}
-
+
+ public void test_issue_1775_a() throws Exception
+ {
+ openIssuePage("TAPESTRY-1775");
+
+ assertFalse(_selenium.isElementPresent("msg"));
+
+ _selenium.click("first");
+
+ waitForInnerHTML("msg", "FIRST");
+
+ _selenium.click("second");
+
+ waitForInnerHTML("msg", "SECOND");
+
+ _selenium.click("first");
+
+ waitForInnerHTML("msg", "");
+ }
+
+ public void test_issue_1775_b() throws Exception
+ {
+ openIssuePage("TAPESTRY-1775");
+
+ assertTrue("".equals(_selenium.getText("msg2").trim()));
+
+ _selenium.click("success");
+
+ waitForInnerHTML("msg2", "SUCCESS");
+
+ _selenium.click("cancel");
+
+ waitForInnerHTML("msg2", "CANCEL");
+
+ _selenium.click("success");
+
+ waitForInnerHTML("msg2", "SUCCESS");
+
+ _selenium.click("refresh");
+
+ waitForInnerHTML("msg2", "REFRESH");
+
+ _selenium.click("success");
+
+ waitForInnerHTML("msg2", "SUCCESS");
+ }
+
+ private void openIssuePage(String issue) {
+ _selenium.open(BASE_URL);
+
+ clickAndWait("link=" + issue);
+
+ assertTrue(_selenium.getTitle().contains(issue));
+ }
+
private void waitForInnerHTML(String elm, String content)
{
_selenium.waitForCondition("selenium.browserbot.getCurrentWindow().document.getElementById('"