[richfaces-svn-commits] JBoss Rich Faces SVN: r12401 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Fri Jan 23 09:25:46 EST 2009


Author: konstantin.mishin
Date: 2009-01-23 09:25:45 -0500 (Fri, 23 Jan 2009)
New Revision: 12401

Added:
   trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/treeNodesAdaptor/recursiveTreeNodesAdaptor.xhtml
   trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/treeNodesAdaptor/treeNodesAdaptorBase.xhtml
   trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AbstractTreeNodesAdaptorTest.java
   trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/RecursiveTreeNodesAdaptorTest.java
Modified:
   trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/treeNodesAdaptor/treeNodesAdaptor.xhtml
   trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeNodesAdaptorTest.java
Log:
RF-5576 RF-5577 RF-5578

Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/treeNodesAdaptor/recursiveTreeNodesAdaptor.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/treeNodesAdaptor/recursiveTreeNodesAdaptor.xhtml	                        (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/treeNodesAdaptor/recursiveTreeNodesAdaptor.xhtml	2009-01-23 14:25:45 UTC (rev 12401)
@@ -0,0 +1,21 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" 
+	xmlns:a4j="http://richfaces.org/a4j"
+	xmlns:rich="http://richfaces.org/rich"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition template="treeNodesAdaptorBase.xhtml">
+	<ui:define name="treeNodesAdaptor">
+		<rich:recursiveTreeNodesAdaptor roots="#{treeNodesAdaptor.nodes}" var="node" nodes="#{node.children}" includedNode="#{treeNodesAdaptor.includedNode}">
+			<rich:treeNode ajaxSingle="#{treeNodesAdaptor.ajaxSingle}">
+				<h:inputText value="#{node.id}"></h:inputText>
+				<h:commandButton id="submit" value="submit" actionListener="#{treeNodesAdaptor.submit}"></h:commandButton>
+				<a4j:commandButton id="ajaxSubmit" value="ajaxSubmit" actionListener="#{treeNodesAdaptor.submit}"></a4j:commandButton>
+				<a4j:commandButton id="ajaxSingleSubmit" value="ajaxSingleSubmit" actionListener="#{treeNodesAdaptor.submit}" ajaxSingle="true"></a4j:commandButton>
+			</rich:treeNode>
+		</rich:recursiveTreeNodesAdaptor>
+	</ui:define>
+</ui:composition>
+</html>
\ No newline at end of file

Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/treeNodesAdaptor/treeNodesAdaptor.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/treeNodesAdaptor/treeNodesAdaptor.xhtml	2009-01-23 13:48:43 UTC (rev 12400)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/treeNodesAdaptor/treeNodesAdaptor.xhtml	2009-01-23 14:25:45 UTC (rev 12401)
@@ -6,48 +6,32 @@
 	xmlns:f="http://java.sun.com/jsf/core"
 	xmlns:ui="http://java.sun.com/jsf/facelets">
 
-<ui:composition template="#{templateBean.template}">
-	<ui:define name="component">
-		<h:form id="attrForm">
-			<h:outputText value="ajaxSingle" />
-			<h:selectBooleanCheckbox id="ajaxSingle" value="#{treeNodesAdaptor.ajaxSingle}">
-				<a4j:support event="onchange" reRender="tree"/>
-			</h:selectBooleanCheckbox>		
-			<h:outputText value="includedNode" />
-			<h:selectBooleanCheckbox id="includedNode" value="#{treeNodesAdaptor.includedNode}">
-				<a4j:support event="onchange" reRender="tree"/>
-			</h:selectBooleanCheckbox>		
-		</h:form>
-		<h:form id="mainForm">
-			<rich:tree id="tree">
-				<rich:treeNodesAdaptor nodes="#{treeNodesAdaptor.nodes}" var="node">
+<ui:composition template="treeNodesAdaptorBase.xhtml">
+	<ui:define name="treeNodesAdaptor">
+		<rich:treeNodesAdaptor nodes="#{treeNodesAdaptor.nodes}" var="node">
+			<rich:treeNode>
+				<h:inputText value="#{node.id}"></h:inputText>
+				<h:commandButton id="submit" value="submit" actionListener="#{treeNodesAdaptor.submit}"></h:commandButton>
+				<a4j:commandButton id="ajaxSubmit" value="ajaxSubmit" actionListener="#{treeNodesAdaptor.submit}"></a4j:commandButton>
+				<a4j:commandButton id="ajaxSingleSubmit" value="ajaxSingleSubmit" actionListener="#{treeNodesAdaptor.submit}" ajaxSingle="true"></a4j:commandButton>
+			</rich:treeNode>
+			<rich:treeNodesAdaptor nodes="#{node.children}" var="child" includedNode="#{treeNodesAdaptor.includedNode}">
+				<rich:treeNode ajaxSingle="#{treeNodesAdaptor.ajaxSingle}">
+					<h:inputText value="#{child.id}"></h:inputText>
+					<h:commandButton id="submit2" value="submit" actionListener="#{treeNodesAdaptor.submit}"></h:commandButton>
+					<a4j:commandButton id="ajaxSubmit2" value="ajaxSubmit" actionListener="#{treeNodesAdaptor.submit}"></a4j:commandButton>
+					<a4j:commandButton id="ajaxSingleSubmit2" value="ajaxSingleSubmit" actionListener="#{treeNodesAdaptor.submit}" ajaxSingle="true"></a4j:commandButton>
+				</rich:treeNode>
+				<rich:treeNodesAdaptor nodes="#{child.children}" var="child2">
 					<rich:treeNode>
-						<h:outputText value="#{node.id}"></h:outputText>
-						<h:commandButton id="submit" value="submit" actionListener="#{treeNodesAdaptor.submit}"></h:commandButton>
-						<a4j:commandButton id="ajaxSubmit" value="ajaxSubmit" actionListener="#{treeNodesAdaptor.submit}"></a4j:commandButton>
-						<a4j:commandButton id="ajaxSingleSubmit" value="ajaxSingleSubmit" actionListener="#{treeNodesAdaptor.submit}" ajaxSingle="true"></a4j:commandButton>
+						<h:inputText value="#{child2.id}"></h:inputText>
+						<h:commandButton id="submit3" value="submit" actionListener="#{treeNodesAdaptor.submit}"></h:commandButton>
+						<a4j:commandButton id="ajaxSubmit3" value="ajaxSubmit" actionListener="#{treeNodesAdaptor.submit}"></a4j:commandButton>
+						<a4j:commandButton id="ajaxSingleSubmit3" value="ajaxSingleSubmit" actionListener="#{treeNodesAdaptor.submit}" ajaxSingle="true"></a4j:commandButton>
 					</rich:treeNode>
-					<rich:treeNodesAdaptor nodes="#{node.children}" var="child" includedNode="#{treeNodesAdaptor.includedNode}">
-						<rich:treeNode  ajaxSingle="#{treeNodesAdaptor.ajaxSingle}">
-							<h:inputText value="#{child.id}"></h:inputText>
-						</rich:treeNode>
-						<rich:treeNodesAdaptor nodes="#{child.children}" var="child2">
-							<rich:treeNode>
-								<h:outputText value="#{child2.id}"></h:outputText>
-							</rich:treeNode>
-						</rich:treeNodesAdaptor>
-					</rich:treeNodesAdaptor>
 				</rich:treeNodesAdaptor>
-			</rich:tree>
-		</h:form>
-		<a4j:outputPanel ajaxRendered="true">
-			<h:outputText id="outputText" value="#{treeNodesAdaptor.trace}"></h:outputText>
-			<h:dataTable id="dataTable" value="#{treeNodesAdaptor.nodes[1].children}" var="child">
-				<h:column>
-					<h:outputText value="#{child.id}"></h:outputText>
-				</h:column>
-			</h:dataTable>
-		</a4j:outputPanel>
+			</rich:treeNodesAdaptor>
+		</rich:treeNodesAdaptor>
 	</ui:define>
 </ui:composition>
 </html>
\ No newline at end of file

Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/treeNodesAdaptor/treeNodesAdaptorBase.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/treeNodesAdaptor/treeNodesAdaptorBase.xhtml	                        (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/treeNodesAdaptor/treeNodesAdaptorBase.xhtml	2009-01-23 14:25:45 UTC (rev 12401)
@@ -0,0 +1,36 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" 
+	xmlns:a4j="http://richfaces.org/a4j"
+	xmlns:rich="http://richfaces.org/rich"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition template="#{templateBean.template}">
+	<ui:define name="component">
+		<h:form id="attrForm">
+			<h:outputText value="ajaxSingle" />
+			<h:selectBooleanCheckbox id="ajaxSingle" value="#{treeNodesAdaptor.ajaxSingle}">
+				<a4j:support event="onchange" reRender="tree"/>
+			</h:selectBooleanCheckbox>		
+			<h:outputText value="includedNode" />
+			<h:selectBooleanCheckbox id="includedNode" value="#{treeNodesAdaptor.includedNode}">
+				<a4j:support event="onchange" reRender="tree"/>
+			</h:selectBooleanCheckbox>		
+		</h:form>
+		<h:form id="mainForm">
+			<rich:tree id="tree">
+				<ui:insert name="treeNodesAdaptor" />
+			</rich:tree>
+		</h:form>
+		<a4j:outputPanel ajaxRendered="true">
+			<h:outputText id="outputText" value="#{treeNodesAdaptor.trace}"></h:outputText>
+			<h:dataTable id="dataTable" value="#{treeNodesAdaptor.nodes[1].children}" var="child">
+				<h:column>
+					<h:outputText value="#{child.id}"></h:outputText>
+				</h:column>
+			</h:dataTable>
+		</a4j:outputPanel>
+	</ui:define>
+</ui:composition>
+</html>
\ No newline at end of file

Added: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AbstractTreeNodesAdaptorTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AbstractTreeNodesAdaptorTest.java	                        (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AbstractTreeNodesAdaptorTest.java	2009-01-23 14:25:45 UTC (rev 12401)
@@ -0,0 +1,149 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */ 
+package org.richfaces.testng;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.ajax4jsf.bean.tree.TreeNodesAdaptorTestBean.Node;
+import org.ajax4jsf.template.Template;
+import org.richfaces.SeleniumTestBase;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+
+public abstract class AbstractTreeNodesAdaptorTest extends SeleniumTestBase {
+
+	private List<Node> nodes;
+
+	private String ajaxSingle;
+
+	private String includedNode;
+
+	private String tree;
+
+	private String outputText;
+	private String dataTable;
+	private void init(Template template) {
+        renderPage(null, template, "#{treeNodesAdaptor.init}");
+		nodes = new ArrayList<Node>(3);
+		for (int i = 1; i <= 3; i++) {
+			Node node = new Node(Integer.toString(i));
+			nodes.add(node);
+			for (int j = 1; j <= 3; j++) {
+				Node node2 = new Node(Integer.toString(i * 10 + j));
+				node.addChild(node2);
+				for (int k = 1; k <= 3; k++) {
+					node2.addChild(new Node(Integer.toString(i * 100 + j * 10 + k)));
+				}
+			}
+		}
+       String attrForm = getParentId() + "attrForm";
+        ajaxSingle = attrForm + ":ajaxSingle";
+        includedNode = attrForm + ":includedNode";
+        String mainForm = getParentId() + "mainForm";
+        tree = mainForm + ":tree";
+        outputText = getParentId() + "outputText";
+        dataTable = getParentId() + "dataTable";
+    }
+
+    /**
+     *  component builds right tree structure: data is fetched from nodes collection
+     *  and assigned to var variable
+     */
+	@Test
+	public void testTreeStructure(Template template) {
+        init(template);
+		String locator = "xpath=id('"+ tree + "')/div";
+        for (int i = 0; i < nodes.size(); i++) {
+        	Node node = nodes.get(i);
+			String rootLocator = locator + "/table[" + (i + 1) + "]/tbody/tr";
+			Assert.assertEquals(selenium.getValue(rootLocator + "/td[3]/input[1]"), node.getId());
+			clickAjaxCommandAndWait(rootLocator + "/td[1]/div/a");
+			String nodesLocator = locator + "/div[" + (i + 1) + "]";
+			List<Node> children = node.getChildren();
+	        for (int j = 0; j < children.size(); j++) {
+				Assert.assertEquals(selenium.getValue(nodesLocator + "/table[" + (j + 1) + "]/tbody/tr/td[3]/input[1]"), children.get(j).getId());
+			}
+		}
+	}
+	
+	private void checkModel(String nodesLocator, boolean ajaxSingle) {
+		String dataTableLocator = "xpath=id('"+ dataTable + "')/tbody/tr[";
+        for (int j = 1; j <= 3; j++) {
+        	if (ajaxSingle && j != 2) {
+        		Assert.assertFalse(selenium.getValue(nodesLocator + "/table[" + j + "]/tbody/tr/td[3]/input[1]").equals(selenium.getText(dataTableLocator + j + "]")));
+        	} else {
+        		Assert.assertEquals(selenium.getValue(nodesLocator + "/table[" + j + "]/tbody/tr/td[3]/input[1]"), selenium.getText(dataTableLocator + j + "]"));
+        	}
+        }		
+	}
+	
+    /**
+     *  check input and command components processing with ajaxSingle nodes
+     */
+	@Test
+	public void testComponentsProcessing(Template template) {
+        init(template);
+		String locator = "xpath=id('"+ tree + "')/div";
+		String titleLocator = locator + "/table[2]/tbody/tr";
+		clickAjaxCommandAndWait(titleLocator + "/td[1]/div/a");
+		String nodesLocator = locator + "/div[2]";
+		checkModel(nodesLocator, false);
+        for (int j = 1; j <= 3; j++) {
+        	selenium.type(nodesLocator + "/table[" + j + "]/tbody/tr/td[3]/input[1]", "abc" + j);
+		}		
+		clickAjaxCommandAndWait(nodesLocator + "/table[1]/tbody/tr/td[1]/div/a");        
+		checkModel(nodesLocator, false);
+		clickAjaxCommandAndWait(ajaxSingle);
+        for (int j = 1; j <= 3; j++) {
+        	selenium.type(nodesLocator + "/table[" + j + "]/tbody/tr/td[3]/input[1]", "xyz" + j);
+		}		
+		clickAjaxCommandAndWait(nodesLocator + "/table[2]/tbody/tr/td[1]/div/a");        
+		checkModel(nodesLocator, true);
+		String buttonLocator = titleLocator + "/td[3]/input[";
+		Assert.assertEquals(selenium.getText(outputText), "");
+		selenium.click(buttonLocator + "2]");
+		waitForPageToLoad();
+		Assert.assertTrue(selenium.getText(outputText).indexOf("1::submit") != -1);
+		selenium.click(buttonLocator + "3]");
+        waitForAjaxCompletion();
+		Assert.assertTrue(selenium.getText(outputText).indexOf("1::ajaxSubmit") != -1);
+		selenium.click(buttonLocator + "4]");
+        waitForAjaxCompletion();
+		Assert.assertTrue(selenium.getText(outputText).indexOf("1::ajaxSingleSubmit") != -1);
+	}
+	
+    /**
+     *  includedNode expression is handled properly
+     */
+	@Test
+	public void testIncludedNode(Template template) {
+        init(template);
+		String xpath = "id('"+ tree + "')/div";
+		clickAjaxCommandAndWait("xpath=" + xpath + "/table[2]/tbody/tr/td[1]/div/a");
+		String childrenXpath = "id('"+ tree + "')/div" + "/div[2]/table";
+		Assert.assertEquals(selenium.getXpathCount(childrenXpath), nodes.get(1).getChildren().size());
+		clickAjaxCommandAndWait(includedNode);
+		Assert.assertEquals(selenium.getXpathCount(childrenXpath), 0);		
+	}
+	
+}

Added: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/RecursiveTreeNodesAdaptorTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/RecursiveTreeNodesAdaptorTest.java	                        (rev 0)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/RecursiveTreeNodesAdaptorTest.java	2009-01-23 14:25:45 UTC (rev 12401)
@@ -0,0 +1,32 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */ 
+package org.richfaces.testng;
+
+
+
+public class RecursiveTreeNodesAdaptorTest extends AbstractTreeNodesAdaptorTest {
+
+	@Override
+	public String getTestUrl() {
+		return "pages/treeNodesAdaptor/recursiveTreeNodesAdaptor.xhtml";
+	}
+
+}

Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeNodesAdaptorTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeNodesAdaptorTest.java	2009-01-23 13:48:43 UTC (rev 12400)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeNodesAdaptorTest.java	2009-01-23 14:25:45 UTC (rev 12401)
@@ -20,132 +20,10 @@
  */ 
 package org.richfaces.testng;
 
-import java.util.ArrayList;
-import java.util.List;
 
-import org.ajax4jsf.bean.tree.TreeNodesAdaptorTestBean.Node;
-import org.ajax4jsf.template.Template;
-import org.richfaces.SeleniumTestBase;
-import org.testng.Assert;
-import org.testng.annotations.Test;
 
+public class TreeNodesAdaptorTest extends AbstractTreeNodesAdaptorTest {
 
-public class TreeNodesAdaptorTest extends SeleniumTestBase {
-
-	private List<Node> nodes;
-
-	private String ajaxSingle;
-
-	private String includedNode;
-
-	private String tree;
-
-	private String outputText;
-	private String dataTable;
-	private void init(Template template) {
-        renderPage(null, template, "#{treeNodesAdaptor.init}");
-		nodes = new ArrayList<Node>(3);
-		for (int i = 1; i <= 3; i++) {
-			Node node = new Node(Integer.toString(i));
-			nodes.add(node);
-			for (int j = 1; j <= 3; j++) {
-				Node node2 = new Node(Integer.toString(i * 10 + j));
-				node.addChild(node2);
-				for (int k = 1; k <= 3; k++) {
-					node2.addChild(new Node(Integer.toString(i * 100 + j * 10 + k)));
-				}
-			}
-		}
-       String attrForm = getParentId() + "attrForm";
-        ajaxSingle = attrForm + ":ajaxSingle";
-        includedNode = attrForm + ":includedNode";
-        String mainForm = getParentId() + "mainForm";
-        tree = mainForm + ":tree";
-        outputText = getParentId() + "outputText";
-        dataTable = getParentId() + "dataTable";
-    }
-
-    /**
-     *  component builds right tree structure: data is fetched from nodes collection
-     *  and assigned to var variable
-     */
-	@Test
-	public void testTreeStructure(Template template) {
-        init(template);
-		String locator = "xpath=id('"+ tree + "')/div";
-        for (int i = 0; i < nodes.size(); i++) {
-        	Node node = nodes.get(i);
-			String rootLocator = locator + "/table[" + (i + 1) + "]/tbody/tr";
-			Assert.assertEquals(selenium.getText(rootLocator), node.getId());
-			clickAjaxCommandAndWait(rootLocator + "/td[1]/div/a");
-			String nodesLocator = locator + "/div[" + (i + 1) + "]";
-			List<Node> children = node.getChildren();
-	        for (int j = 0; j < children.size(); j++) {
-				Assert.assertEquals(selenium.getValue(nodesLocator + "/table[" + (j + 1) + "]/tbody/tr/td[3]/input"), children.get(j).getId());
-			}
-		}
-	}
-	
-	private void checkModel(String nodesLocator, boolean ajaxSingle) {
-		String dataTableLocator = "xpath=id('"+ dataTable + "')/tbody/tr[";
-        for (int j = 1; j <= 3; j++) {
-        	if (ajaxSingle && j != 2) {
-        		Assert.assertFalse(selenium.getValue(nodesLocator + "/table[" + j + "]/tbody/tr/td[3]/input").equals(selenium.getText(dataTableLocator + j + "]")));
-        	} else {
-        		Assert.assertEquals(selenium.getValue(nodesLocator + "/table[" + j + "]/tbody/tr/td[3]/input"), selenium.getText(dataTableLocator + j + "]"));
-        	}
-        }		
-	}
-	
-    /**
-     *  check input and command components processing with ajaxSingle nodes
-     */
-	@Test
-	public void testComponentsProcessing(Template template) {
-        init(template);
-		String locator = "xpath=id('"+ tree + "')/div";
-		String titleLocator = locator + "/table[2]/tbody/tr";
-		clickAjaxCommandAndWait(titleLocator + "/td[1]/div/a");
-		String nodesLocator = locator + "/div[2]";
-		checkModel(nodesLocator, false);
-        for (int j = 1; j <= 3; j++) {
-        	selenium.type(nodesLocator + "/table[" + j + "]/tbody/tr/td[3]/input", "abc" + j);
-		}		
-		clickAjaxCommandAndWait(nodesLocator + "/table[1]/tbody/tr/td[1]/div/a");        
-		checkModel(nodesLocator, false);
-		clickAjaxCommandAndWait(ajaxSingle);
-        for (int j = 1; j <= 3; j++) {
-        	selenium.type(nodesLocator + "/table[" + j + "]/tbody/tr/td[3]/input", "xyz" + j);
-		}		
-		clickAjaxCommandAndWait(nodesLocator + "/table[2]/tbody/tr/td[1]/div/a");        
-		checkModel(nodesLocator, true);
-		String buttonLocator = titleLocator + "/td[3]/input[";
-		Assert.assertEquals(selenium.getText(outputText), "");
-		selenium.click(buttonLocator + "1]");
-		waitForPageToLoad();
-		Assert.assertTrue(selenium.getText(outputText).endsWith("1::submit"));
-		selenium.click(buttonLocator + "2]");
-        waitForAjaxCompletion();
-		Assert.assertTrue(selenium.getText(outputText).endsWith("1::ajaxSubmit"));
-		selenium.click(buttonLocator + "3]");
-        waitForAjaxCompletion();
-		Assert.assertTrue(selenium.getText(outputText).endsWith("1::ajaxSingleSubmit"));
-	}
-	
-    /**
-     *  includedNode expression is handled properly
-     */
-	@Test
-	public void testIncludedNode(Template template) {
-        init(template);
-		String xpath = "id('"+ tree + "')/div";
-		clickAjaxCommandAndWait("xpath=" + xpath + "/table[2]/tbody/tr/td[1]/div/a");
-		String childrenXpath = "id('"+ tree + "')/div" + "/div[2]/table";
-		Assert.assertEquals(selenium.getXpathCount(childrenXpath), nodes.get(1).getChildren().size());
-		clickAjaxCommandAndWait(includedNode);
-		Assert.assertEquals(selenium.getXpathCount(childrenXpath), 0);		
-	}
-	
 	@Override
 	public String getTestUrl() {
 		return "pages/treeNodesAdaptor/treeNodesAdaptor.xhtml";




More information about the richfaces-svn-commits mailing list