Author: uli
Date: Wed Mar 31 14:43:34 2010
New Revision: 929552

URL: http://svn.apache.org/viewvc?rev=929552&view=rev
Log:
fix failing tests...

Modified:
    
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app1/RadioDemo.tml
    
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
    
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/RadioDemo.java

Modified: 
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app1/RadioDemo.tml
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app1/RadioDemo.tml?rev=929552&r1=929551&r2=929552&view=diff
==============================================================================
--- 
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app1/RadioDemo.tml
 (original)
+++ 
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/app1/RadioDemo.tml
 Wed Mar 31 14:43:34 2010
@@ -45,5 +45,9 @@
     <hr />
     Selected position: ${position}
   </t:if>
+  
+  <p>
+    <t:actionlink t:id="reset">reset</t:actionlink>
+  </p>
 
 </html>

Modified: 
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java?rev=929552&r1=929551&r2=929552&view=diff
==============================================================================
--- 
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
 (original)
+++ 
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/IntegrationTests.java
 Wed Mar 31 14:43:34 2010
@@ -1,4 +1,4 @@
-// Copyright 2006, 2007, 2008, 2009 The Apache Software Foundation
+// Copyright 2006, 2007, 2008, 2009, 2010 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -32,7 +32,6 @@ import java.net.URL;
  * Note: If these tests fail with BindException when starting Jetty, it could 
be Skype. At least on my system, Skype is
  * listening on localhost:80.
  */
-...@suppresswarnings({ "JavaDoc" })
 @Test(timeOut = 50000, sequential = true)
 public class IntegrationTests extends AbstractIntegrationTestSuite
 {
@@ -1094,6 +1093,8 @@ public class IntegrationTests extends Ab
     public void radio_button_and_group()
     {
         start("RadioDemo");
+        
+        clickAndWait("link=reset");
 
         String update = SUBMIT;
 
@@ -1120,11 +1121,12 @@ public class IntegrationTests extends Ab
     public void radio_group_validator()
     {
         start("RadioDemo");
-
-        String update = SUBMIT;
+        
+        clickAndWait("link=reset");
 
         // Verify that the "required" validator works.
-        clickAndWait(update);
+        clickAndWait(SUBMIT);
+        
         assertTextPresent("You must provide a value for Department.");
     }
 
@@ -3003,11 +3005,11 @@ public class IntegrationTests extends Ab
         
         click(SUBMIT);
         
-        String condition = 
String.format("selenium.browserbot.getCurrentWindow().$$(\"%s\")", 
"t-error-popup");
+        String condition = 
String.format("selenium.browserbot.getCurrentWindow().$$(\"%s\")", 
".t-error-popup");
 
         waitForCondition(condition, PAGE_LOAD_TIMEOUT);
         
-        assertText(String.format("//d...@class='%s']/span", "t-error-popup"), 
"You must provide a value for Car Model.");
+        assertTextPresent("You must provide a value for Car Model.");
         
         type("carModel", "7 Series");
         

Modified: 
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/RadioDemo.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/RadioDemo.java?rev=929552&r1=929551&r2=929552&view=diff
==============================================================================
--- 
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/RadioDemo.java
 (original)
+++ 
tapestry/tapestry5/branches/5.1.0.x-dev/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/RadioDemo.java
 Wed Mar 31 14:43:34 2010
@@ -1,4 +1,4 @@
-// Copyright 2007 The Apache Software Foundation
+// Copyright 2007, 2010 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -14,6 +14,7 @@
 
 package org.apache.tapestry5.integration.app1.pages;
 
+import org.apache.tapestry5.ComponentResources;
 import org.apache.tapestry5.annotations.Persist;
 import org.apache.tapestry5.integration.app1.data.Department;
 import org.apache.tapestry5.internal.TapestryInternalUtils;
@@ -32,6 +33,14 @@ public class RadioDemo
 
     @Inject
     private Messages messages;
+    
+    @Inject
+    private ComponentResources resources;
+
+    void onActionFromReset()
+    {
+        resources.discardPersistentFieldChanges();
+    }
 
     public Department[] getDepartments()
     {


Reply via email to