Updated Branches:
  refs/heads/master b6d1bdeba -> 09bd34c8b

Fix test that fails using jQuery as infrastructure


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/9ce2d4e7
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/9ce2d4e7
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/9ce2d4e7

Branch: refs/heads/master
Commit: 9ce2d4e7c1a0142c9e351f3f201b2fe8cc5010d6
Parents: b6d1bde
Author: Howard M. Lewis Ship <hls...@apache.org>
Authored: Mon Nov 25 10:33:05 2013 -0800
Committer: Howard M. Lewis Ship <hls...@apache.org>
Committed: Mon Nov 25 10:33:05 2013 -0800

----------------------------------------------------------------------
 .../src/test/app1/NestedFormFragment.tml        | 18 ++++------------
 .../tapestry5/integration/app1/AjaxTests.java   |  9 ++------
 .../app1/pages/NestedFormFragment.java          | 22 +-------------------
 3 files changed, 7 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9ce2d4e7/tapestry-core/src/test/app1/NestedFormFragment.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/app1/NestedFormFragment.tml 
b/tapestry-core/src/test/app1/NestedFormFragment.tml
index fe41262..2922e14 100644
--- a/tapestry-core/src/test/app1/NestedFormFragment.tml
+++ b/tapestry-core/src/test/app1/NestedFormFragment.tml
@@ -7,25 +7,15 @@
     <t:form>
         <t:formfragment t:id="outerhide" visible="true" class="well">
             <div id="outertext1">Outer Text -- nested in outerhide</div>
+            <label class="checkbox">
+                <t:checkbox t:id="innertrigger1" value="true" 
t:mixins="triggerfragment" fragment="innerhide"/>
+                Trigger hide/reveal of innerhide
+            </label>
             <t:formfragment t:id="innerhide" visible="true">
                 <div id="innertext1">Inner Text -- nested in innerhide</div>
-                <label class="checkbox">
-                    <t:checkbox t:id="innertrigger1" value="true" 
t:mixins="triggerfragment" fragment="innerhide"/>
-                    Trigger hide/reveal of innerhide
-                </label>
             </t:formfragment>
         </t:formfragment>
 
-        <t:formfragment t:id="outerremove" visible="true" class="well">
-            <div id="outertext2">Outer Text -- nested in outerremove</div>
-            <t:formfragment t:id="innerremove" visible="true">
-                <div id="innertext2">Inner Text -- nested in innerremove</div>
-                <label class="checkbox">
-                    <t:checkbox t:id="innertrigger2" value="true"/>
-                    Does nothing ... looks like this was not fully implemented.
-                </label>
-            </t:formfragment>
-        </t:formfragment>
 
     </t:form>
 </t:border>

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9ce2d4e7/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java
----------------------------------------------------------------------
diff --git 
a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java
 
b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java
index 41f8673..17cb399 100644
--- 
a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java
+++ 
b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/AjaxTests.java
@@ -88,16 +88,11 @@ public class AjaxTests extends App1TestCase
         assertTrue(isVisible("outertext1"));
         assertTrue(isVisible("innertext1"));
         assertTrue(isChecked("innertrigger1"));
+
         click("innertrigger1");
 
         assertTrue(isVisible("outertext1"));
-
-        //now make sure that hide_and_remove is properly handled, as well...
-        assertTrue(isVisible("outertext2"));
-        assertTrue(isVisible("innertext2"));
-
-        // Looks like at one time there was work to have a trigger that 
removed the fragment entirely,
-        // not just hide/reveal it, but that seems to have been lost.
+        assertFalse(isVisible("innertext1"));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9ce2d4e7/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/NestedFormFragment.java
----------------------------------------------------------------------
diff --git 
a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/NestedFormFragment.java
 
b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/NestedFormFragment.java
index f5d6f5f..b90f4fe 100644
--- 
a/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/NestedFormFragment.java
+++ 
b/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/NestedFormFragment.java
@@ -1,26 +1,6 @@
 package org.apache.tapestry5.integration.app1.pages;
 
-import org.apache.tapestry5.ioc.annotations.Inject;
-import org.apache.tapestry5.annotations.InjectComponent;
-import org.apache.tapestry5.annotations.Property;
-import org.apache.tapestry5.corelib.components.Checkbox;
-import org.apache.tapestry5.corelib.components.FormFragment;
-import org.apache.tapestry5.services.javascript.JavaScriptSupport;
-
-public class NestedFormFragment 
+public class NestedFormFragment
 {
 
-    @InjectComponent
-    private FormFragment innerremove;
-
-    @InjectComponent
-    private Checkbox innertrigger2;
-
-    @Inject
-    private JavaScriptSupport jsSupport;
-
-    void afterRender() 
-    {
-        jsSupport.addScript("$('%s').observe('click', function() { 
$('%s').fire(Tapestry.HIDE_AND_REMOVE_EVENT); });", 
innertrigger2.getClientId(), innerremove.getClientId()); 
-    }
 }

Reply via email to