You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2012/11/30 19:22:12 UTC

[1/5] git commit: Fix broken tests

Updated Branches:
  refs/heads/5.4-js-rewrite 8c95676fc -> aa4ccaad9


Fix broken tests


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

Branch: refs/heads/5.4-js-rewrite
Commit: aa4ccaad93d7404d4c7693a4baba3ec48e5ed6d9
Parents: 20a1391
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Fri Nov 30 10:21:59 2012 -0800
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Fri Nov 30 10:21:59 2012 -0800

----------------------------------------------------------------------
 .../tapestry5/integration/app1/TreeTests.groovy    |   24 ++++++++------
 .../tapestry5/integration/app1/pages/TreeDemo.tml  |   16 ++++-----
 .../integration/app1/pages/TreeSelectionDemo.tml   |   14 +++-----
 3 files changed, 26 insertions(+), 28 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/aa4ccaad/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/TreeTests.groovy
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/TreeTests.groovy b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/TreeTests.groovy
index a7c84e2..0704f76 100644
--- a/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/TreeTests.groovy
+++ b/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/TreeTests.groovy
@@ -1,4 +1,4 @@
-// Copyright 2011 The Apache Software Foundation
+// Copyright 2011, 2012 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,20 +14,21 @@
 
 package org.apache.tapestry5.integration.app1
 
-import org.apache.tapestry5.test.SeleniumTestCase
+import org.apache.tapestry5.integration.TapestryCoreTestCase
 import org.testng.annotations.Test
 
-class TreeTests extends SeleniumTestCase
+class TreeTests extends TapestryCoreTestCase
 {
     @Test
     void basics()
     {
-
         openBaseURL()
 
         clickAndWait "link=Tree Component Demo"
 
-        clickAndWait "link=clear expansions"
+        clickAndWait "link=Clear Expansions"
+
+        waitForPageLoaded()
 
         //Click on Games
         click "//div[@class='t-tree-container test-hook']/ul/li[2]/span[@class='t-tree-icon']"
@@ -57,23 +58,26 @@ class TreeTests extends SeleniumTestCase
 
         clickAndWait "link=Tree Component Selection Demo"
 
-        clickAndWait "link=clear all"
+        clickAndWait "link=Clear All"
+
+        waitForPageLoaded()
 
         click "//span[@class='t-tree-icon']"
 
-        waitForCSSSelectedElementToAppear "span.t-leaf-node"
+        waitForCSSSelectedElementToAppear "li.t-leaf-node > span"
 
         assertTextPresent "Oscar", "Gromit", "Max", "Roger", "Cooper"
 
         // Click the first selectable node, probably Oscar
-        click "css=span.t-selectable"
 
-        waitForCSSSelectedElementToAppear "span.t-selected-leaf-node-label"
+        click "css=[data-tree-node-selection-enabled] li.t-leaf-node > span.t-tree-label"
+
+        waitForCSSSelectedElementToAppear "span.t-selected-leaf-node"
 
         clickAndWait "link=Redraw"
 
         // Make sure it is still there after a redraw
 
-        waitForCSSSelectedElementToAppear "span.t-selected-leaf-node-label"
+        waitForCSSSelectedElementToAppear "span.t-selected-leaf-node"
     }
 }

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/aa4ccaad/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/TreeDemo.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/TreeDemo.tml b/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/TreeDemo.tml
index 67b7661..450be3f 100644
--- a/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/TreeDemo.tml
+++ b/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/TreeDemo.tml
@@ -1,15 +1,13 @@
-<t:border xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd" xmlns:p="tapestry:parameter">
+<t:border xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
 
   <h1>Tree Demo</h1>
 
   <t:tree class="test-hook" t:id="tree" model="stuffModel"/>
 
-  <p>
-    [
-    <t:pagelink page="treeDemo">Redraw</t:pagelink>
-    ]
-    [
-    <t:actionlink t:id="clear">clear expansions</t:actionlink>
-    ]
-  </p>
+
+  <div class="btn-toolbar btn-group">
+      <t:pagelink page="treeDemo" class="btn">Redraw</t:pagelink>
+      <t:actionlink t:id="clear" class="btn">Clear Expansions</t:actionlink>
+  </div>
+
 </t:border>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/aa4ccaad/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/TreeSelectionDemo.tml
----------------------------------------------------------------------
diff --git a/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/TreeSelectionDemo.tml b/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/TreeSelectionDemo.tml
index d5a8870..97de48b 100644
--- a/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/TreeSelectionDemo.tml
+++ b/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/TreeSelectionDemo.tml
@@ -1,17 +1,13 @@
-<t:border xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd" xmlns:p="tapestry:parameter">
+<t:border xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
 
     <h1>Tree Selection Demo</h1>
 
     <t:tree class="test-hook" t:id="tree" model="stuffModel" selectionModel="selectionModel"/>
 
-    <p>
-        [
-        <t:pagelink page="treeSelectionDemo">Redraw</t:pagelink>
-        ]
-        [
-        <t:actionlink t:id="clearAll">clear all</t:actionlink>
-        ]
-    </p>
+    <div class="btn-toolbar btn-group">
+        <t:pagelink page="treeSelectionDemo" class="btn">Redraw</t:pagelink>
+        <t:actionlink t:id="clearAll" class="btn">Clear All</t:actionlink>
+    </div>
 
     <h2>Selections</h2>