Author: lfryc(a)redhat.com
Date: 2011-02-03 17:20:40 -0500 (Thu, 03 Feb 2011)
New Revision: 21442
Added:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/RecursiveModelRepresentation.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorLazyLoading.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSimple.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorToggling.java
Removed:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/RecursiveModelRepresentation.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorLazyLoading.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorSelection.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorSimple.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorToggling.java
Log:
renamed treeModelAdaptor package to richTreeModelAdaptor
Copied:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/RecursiveModelRepresentation.java
(from rev 21441,
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/RecursiveModelRepresentation.java)
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/RecursiveModelRepresentation.java
(rev 0)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/RecursiveModelRepresentation.java 2011-02-03
22:20:40 UTC (rev 21442)
@@ -0,0 +1,30 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richTreeModelAdaptor;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public enum RecursiveModelRepresentation {
+ MAP, LIST;
+}
Copied:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorLazyLoading.java
(from rev 21441,
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorLazyLoading.java)
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorLazyLoading.java
(rev 0)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorLazyLoading.java 2011-02-03
22:20:40 UTC (rev 21442)
@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richTreeModelAdaptor;
+
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.testng.Assert.assertEquals;
+
+import java.net.URL;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.commons.lang.StringUtils;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.richfaces.tests.metamer.ftest.richTree.TreeAttributes;
+import org.richfaces.tests.metamer.ftest.richTree.TreeModel;
+import org.richfaces.tests.metamer.ftest.richTree.TreeNodeModel;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class TestTreeModelAdaptorLazyLoading extends AbstractMetamerTest {
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath,
"faces/components/richTree/treeAdaptors.xhtml");
+ }
+
+ protected TreeAttributes treeAttributes = new
TreeAttributes(jq("span[id*=treeAttributes]"));
+ protected TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
+ protected TreeNodeModel treeNode;
+
+ JQueryLocator lazyInitialized = pjq("span[id$=lazyInitialized]");
+
+ protected Integer[][] paths = new Integer[][] { { 1, 1, 1, 8, 1 }, { 4, 4, 11, 4 }
};
+
+ @Test
+ public void testLazyLoading() {
+ List<String> expected = getListOfVisibleNodes();
+ List<String> actual = getLazyInitialized();
+
+ assertEquals(actual, expected);
+
+ for (Integer[] path : paths) {
+ treeNode = null;
+ for (int i = 0; i < path.length; i++) {
+ int index = path[i];
+ treeNode = (treeNode == null) ? tree.getNode(index) :
treeNode.getNode(index);
+ if (i < path.length - 1) {
+ treeNode.expand();
+
+ expected = getListOfVisibleNodes();
+ actual = getLazyInitialized();
+
+ assertEquals(actual, expected);
+ }
+ }
+ }
+ }
+
+ private List<String> getListOfVisibleNodes() {
+ // takes only recursive nodes + model node (representing leaves)
+ Pattern pattern = Pattern.compile("([RM\\-\\.0-9]+)(?:-.*)?");
+ SortedSet<String> result = new TreeSet<String>();
+ for (TreeNodeModel treeNode : tree.getAnyNodes()) {
+ String labelText = treeNode.getLabelText();
+
+ Matcher matcher = pattern.matcher(labelText);
+
+ if (matcher.matches()) {
+ String node = matcher.group(1);
+ result.add(node);
+ }
+ }
+ return new LinkedList<String>(result);
+ }
+
+ private List<String> getLazyInitialized() {
+ String unseparated = selenium.getText(lazyInitialized);
+ String[] separated = StringUtils.split(unseparated, "[], ");
+ List<String> result = Arrays.asList(separated);
+ Collections.sort(result);
+ return result;
+ }
+}
Copied:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java
(from rev 21441,
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorSelection.java)
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java
(rev 0)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java 2011-02-03
22:20:40 UTC (rev 21442)
@@ -0,0 +1,168 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richTreeModelAdaptor;
+
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+
+import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.Use;
+import org.richfaces.tests.metamer.ftest.annotations.Uses;
+import org.richfaces.tests.metamer.ftest.richTree.TestTreeSelection;
+import org.richfaces.tests.metamer.ftest.richTree.TreeAttributes;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class TestTreeModelAdaptorSelection extends TestTreeSelection {
+
+ @Inject
+ PathsCrate paths;
+ PathsCrate pathsForListModel = new PathsCrate("listModel", new Integer[][]
{ { 2, 1, 3 }, { 3, 3, 2, 2 } });
+ PathsCrate pathsForMapModel = new PathsCrate("mapModel", new Integer[][] {
{ 2, 1, 5 }, { 3, 3, 2, 6 } });
+ PathsCrate pathsForRecursiveModel = new PathsCrate("recursiveModel", new
Integer[][] { { 4, 1, 10, 2 },
+ { 1, 4, 3, 11, 4, 1 } });
+
+ @Inject
+ @Use(enumeration = true)
+ public RecursiveModelRepresentation representation =
RecursiveModelRepresentation.LIST;
+
+ @Inject
+ @Use(booleans = { true, false })
+ public boolean recursiveLeafChildrenNullable;
+
+ public URL getTestUrl() {
+ return buildUrl(contextPath,
"http://localhost:8080/metamer/faces/components/richTree/treeAdaptors.xhtml");
+ }
+
+ @BeforeClass
+ public void initTreeAttributes() {
+ treeAttributes = new TreeAttributes(jq("span[id*=treeAttributes]"));
+ }
+
+ @BeforeMethod
+ public void initPathsAndModelRepresentation() {
+ if (paths != null) {
+ selectionPaths = paths.paths;
+ }
+ if (representation == RecursiveModelRepresentation.MAP) {
+
guardXhr(selenium).click(pjq(":radio[id*=recursiveModelRepresentation]").getNthOccurence(2));
+ }
+ if (recursiveLeafChildrenNullable) {
+
guardXhr(selenium).click(pjq(":checkbox[id$=recursiveLeafChildrenNullable]"));
+ }
+ }
+
+ @Test
+ @Override
+ @Use(field = "paths", empty = true)
+ public void testTopLevelSelection() {
+ super.testTopLevelSelection();
+ }
+
+ @Test
+ @Override
+ @Use(field = "paths", value = "paths*")
+ public void testSubNodesSelection() {
+ super.testSubNodesSelection();
+ }
+
+ @Test
+ @Override
+ @Uses({ @Use(field = "paths", value = "paths*"),
+ @Use(field = "selectionType", value =
"eventEnabledSelectionTypes") })
+ public void testSubNodesSelectionEvents() {
+ super.testSubNodesSelectionEvents();
+ }
+
+ @Override
+ protected void expandAll() {
+ for (Integer[] path : selectionPaths) {
+ treeNode = null;
+ for (int i = 0; i < path.length; i++) {
+ int index = path[i];
+ treeNode = (treeNode == null) ? tree.getNode(index) :
treeNode.getNode(index);
+ if (i < path.length - 1) {
+ treeNode.expand();
+ }
+ }
+ }
+ }
+
+ @Override
+ protected Integer[] getIntsFromString(String string) {
+ Pattern pattern = Pattern.compile("(?:\\{[^}]+modelKey=(\\d+)\\})");
+ Matcher matcher = pattern.matcher(string);
+ List<Integer> list = new LinkedList<Integer>();
+ while (matcher.find()) {
+ int integer = Integer.valueOf(matcher.group(1)) + 1;
+ integer = fixShiftWhenModelPresent(list, integer);
+ list.add(integer);
+ }
+ if (list.isEmpty()) {
+ throw new IllegalStateException("pattern does not match");
+ }
+ return list.toArray(new Integer[list.size()]);
+ }
+
+ private Integer fixShiftWhenModelPresent(List<Integer> list, int integer) {
+ if (paths.toString().equals(pathsForRecursiveModel.toString())) {
+ if (!list.isEmpty()) {
+ if (list.get(0) % 2 == 0) {
+ if (list.size() == 2) {
+ return integer + 7;
+ }
+ } else {
+ if (list.size() == 3) {
+ return integer + 7;
+ }
+ }
+ }
+ }
+ return integer;
+ }
+
+ private class PathsCrate {
+ String name;
+ Integer[][] paths;
+
+ public PathsCrate(String name, Integer[][] paths) {
+ this.name = name;
+ this.paths = paths;
+ }
+
+ public String toString() {
+ return name;
+ }
+ }
+}
Copied:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSimple.java
(from rev 21441,
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorSimple.java)
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSimple.java
(rev 0)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSimple.java 2011-02-03
22:20:40 UTC (rev 21442)
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richTreeModelAdaptor;
+
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+
+import java.net.URL;
+
+import org.jboss.test.selenium.locator.ExtendedLocator;
+import org.jboss.test.selenium.locator.JQueryLocator;
+import org.richfaces.tests.metamer.ftest.AbstractComponentAttributes;
+import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
+import org.richfaces.tests.metamer.ftest.richTree.TreeAttributes;
+import org.richfaces.tests.metamer.ftest.richTree.TreeModel;
+import org.richfaces.tests.metamer.ftest.richTree.TreeNodeModel;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class TestTreeModelAdaptorSimple extends AbstractMetamerTest {
+
+ protected TreeAttributes treeAttributes = new
TreeAttributes(jq("span[id*=treeAttributes]"));
+ protected TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
+ protected TreeNodeModel treeNode;
+
+ @Override
+ public URL getTestUrl() {
+ return buildUrl(contextPath,
"faces/components/richTree/treeAdaptors.xhtml");
+ }
+
+ @Test
+ public void testModelAdaptorRendered() {
+ tree.getNode(2).expand();
+ tree.getNode(2).getNode(2).expand();
+ treeNode = tree.getNode(2).getNode(2).getNode(1);
+
+ assertTrue(treeNode.isLeaf());
+
+ modelAdaptorAttributes.setRendered(false);
+
+ assertFalse(treeNode.isLeaf());
+ }
+
+ @Test
+ public void testRecursiveModelAdaptorRendered() {
+ tree.getNode(2).expand();
+ tree.getNode(2).getNode(2).expand();
+
+ boolean subnodePresent = false;
+ for (TreeNodeModel treeNode : tree.getNode(2).getNode(2).getNodes()) {
+ if (!treeNode.isLeaf()) {
+ subnodePresent = true;
+ }
+ }
+ assertTrue(subnodePresent, "there should be at least one subnode (not leaf)
in expanded branch");
+
+ recursiveModelAdaptorAttributes.setRendered(false);
+
+ for (TreeNodeModel treeNode : tree.getNode(2).getNode(2).getNodes()) {
+ if (!treeNode.isLeaf()) {
+ fail("there should be no subnode (not leaf) in expanded
branch");
+ }
+ }
+ }
+
+ private ModelAdaptorAttributes modelAdaptorAttributes = new ModelAdaptorAttributes(
+ pjq("span[id$=:listAttributes:panel]"));
+ private RecursiveModelAdaptorAttributes recursiveModelAdaptorAttributes = new
RecursiveModelAdaptorAttributes(
+ pjq("span[id$=:recursiveAttributes:panel]"));
+
+ private class ModelAdaptorAttributes extends AbstractComponentAttributes {
+
+ public <T extends ExtendedLocator<JQueryLocator>>
ModelAdaptorAttributes(T root) {
+ super(root);
+ }
+
+ public void setRendered(Boolean rendered) {
+ setProperty("rendered", rendered);
+ }
+ }
+
+ private class RecursiveModelAdaptorAttributes extends AbstractComponentAttributes {
+
+ public <T extends ExtendedLocator<JQueryLocator>>
RecursiveModelAdaptorAttributes(T root) {
+ super(root);
+ }
+
+ public void setRendered(Boolean rendered) {
+ setProperty("rendered", rendered);
+ }
+ }
+}
Copied:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorToggling.java
(from rev 21441,
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorToggling.java)
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorToggling.java
(rev 0)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorToggling.java 2011-02-03
22:20:40 UTC (rev 21442)
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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 software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ *******************************************************************************/
+package org.richfaces.tests.metamer.ftest.richTreeModelAdaptor;
+
+import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
+import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+
+import java.net.URL;
+
+import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.Use;
+import org.richfaces.tests.metamer.ftest.richTree.TestTreeToggling;
+import org.richfaces.tests.metamer.ftest.richTree.TreeAttributes;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
+ * @version $Revision$
+ */
+public class TestTreeModelAdaptorToggling extends TestTreeToggling {
+
+ @Inject
+ @Use(enumeration = true)
+ public RecursiveModelRepresentation representation;
+
+ @Inject
+ @Use(booleans = { true, false })
+ public boolean recursiveLeafChildrenNullable;
+
+ @BeforeClass
+ public void initTreeAttributes() {
+ treeAttributes = new TreeAttributes(jq("span[id*=treeAttributes]"));
+ }
+
+ @BeforeMethod
+ public void initPathsAndModelRepresentation() {
+ if (representation == RecursiveModelRepresentation.MAP) {
+
guardXhr(selenium).click(pjq(":radio[id*=recursiveModelRepresentation]").getNthOccurence(2));
+ }
+ if (recursiveLeafChildrenNullable) {
+
guardXhr(selenium).click(pjq(":checkbox[id$=recursiveLeafChildrenNullable]"));
+ }
+ }
+
+ public URL getTestUrl() {
+ return buildUrl(contextPath,
"http://localhost:8080/metamer/faces/components/richTree/treeAdaptors.xhtml");
+ }
+
+ @Test
+ @Override
+ public void testTopLevelNodesExpansion() {
+ super.testTopLevelNodesExpansion();
+ }
+
+ @Test
+ @Override
+ public void testTopLevelNodesCollapsion() {
+ super.testTopLevelNodesCollapsion();
+ }
+
+ @Test
+ @Override
+ public void testDeepExpansion() {
+ super.testDeepExpansion();
+ }
+
+ @Test
+ @Override
+ public void testDeepCollapsion() {
+ super.testDeepCollapsion();
+ }
+}
Deleted:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/RecursiveModelRepresentation.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/RecursiveModelRepresentation.java 2011-02-03
22:16:35 UTC (rev 21441)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/RecursiveModelRepresentation.java 2011-02-03
22:20:40 UTC (rev 21442)
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- *******************************************************************************/
-package org.richfaces.tests.metamer.ftest.treeModelAdaptor;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-public enum RecursiveModelRepresentation {
- MAP, LIST;
-}
Deleted:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorLazyLoading.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorLazyLoading.java 2011-02-03
22:16:35 UTC (rev 21441)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorLazyLoading.java 2011-02-03
22:20:40 UTC (rev 21442)
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- *******************************************************************************/
-package org.richfaces.tests.metamer.ftest.treeModelAdaptor;
-
-import static org.jboss.test.selenium.locator.LocatorFactory.jq;
-import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
-import static org.testng.Assert.assertEquals;
-
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.SortedSet;
-import java.util.TreeSet;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.commons.lang.StringUtils;
-import org.jboss.test.selenium.locator.JQueryLocator;
-import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
-import org.richfaces.tests.metamer.ftest.richTree.TreeAttributes;
-import org.richfaces.tests.metamer.ftest.richTree.TreeModel;
-import org.richfaces.tests.metamer.ftest.richTree.TreeNodeModel;
-import org.testng.annotations.Test;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-public class TestTreeModelAdaptorLazyLoading extends AbstractMetamerTest {
- @Override
- public URL getTestUrl() {
- return buildUrl(contextPath,
"faces/components/richTree/treeAdaptors.xhtml");
- }
-
- protected TreeAttributes treeAttributes = new
TreeAttributes(jq("span[id*=treeAttributes]"));
- protected TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
- protected TreeNodeModel treeNode;
-
- JQueryLocator lazyInitialized = pjq("span[id$=lazyInitialized]");
-
- protected Integer[][] paths = new Integer[][] { { 1, 1, 1, 8, 1 }, { 4, 4, 11, 4 }
};
-
- @Test
- public void testLazyLoading() {
- List<String> expected = getListOfVisibleNodes();
- List<String> actual = getLazyInitialized();
-
- assertEquals(actual, expected);
-
- for (Integer[] path : paths) {
- treeNode = null;
- for (int i = 0; i < path.length; i++) {
- int index = path[i];
- treeNode = (treeNode == null) ? tree.getNode(index) :
treeNode.getNode(index);
- if (i < path.length - 1) {
- treeNode.expand();
-
- expected = getListOfVisibleNodes();
- actual = getLazyInitialized();
-
- assertEquals(actual, expected);
- }
- }
- }
- }
-
- private List<String> getListOfVisibleNodes() {
- // takes only recursive nodes + model node (representing leaves)
- Pattern pattern = Pattern.compile("([RM\\-\\.0-9]+)(?:-.*)?");
- SortedSet<String> result = new TreeSet<String>();
- for (TreeNodeModel treeNode : tree.getAnyNodes()) {
- String labelText = treeNode.getLabelText();
-
- Matcher matcher = pattern.matcher(labelText);
-
- if (matcher.matches()) {
- String node = matcher.group(1);
- result.add(node);
- }
- }
- return new LinkedList<String>(result);
- }
-
- private List<String> getLazyInitialized() {
- String unseparated = selenium.getText(lazyInitialized);
- String[] separated = StringUtils.split(unseparated, "[], ");
- List<String> result = Arrays.asList(separated);
- Collections.sort(result);
- return result;
- }
-}
Deleted:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorSelection.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorSelection.java 2011-02-03
22:16:35 UTC (rev 21441)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorSelection.java 2011-02-03
22:20:40 UTC (rev 21442)
@@ -1,168 +0,0 @@
-/*******************************************************************************
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- *******************************************************************************/
-package org.richfaces.tests.metamer.ftest.treeModelAdaptor;
-
-import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
-import static org.jboss.test.selenium.locator.LocatorFactory.jq;
-import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
-
-import java.net.URL;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.richfaces.tests.metamer.ftest.annotations.Inject;
-import org.richfaces.tests.metamer.ftest.annotations.Use;
-import org.richfaces.tests.metamer.ftest.annotations.Uses;
-import org.richfaces.tests.metamer.ftest.richTree.TestTreeSelection;
-import org.richfaces.tests.metamer.ftest.richTree.TreeAttributes;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-public class TestTreeModelAdaptorSelection extends TestTreeSelection {
-
- @Inject
- PathsCrate paths;
- PathsCrate pathsForListModel = new PathsCrate("listModel", new Integer[][]
{ { 2, 1, 3 }, { 3, 3, 2, 2 } });
- PathsCrate pathsForMapModel = new PathsCrate("mapModel", new Integer[][] {
{ 2, 1, 5 }, { 3, 3, 2, 6 } });
- PathsCrate pathsForRecursiveModel = new PathsCrate("recursiveModel", new
Integer[][] { { 4, 1, 10, 2 },
- { 1, 4, 3, 11, 4, 1 } });
-
- @Inject
- @Use(enumeration = true)
- public RecursiveModelRepresentation representation =
RecursiveModelRepresentation.LIST;
-
- @Inject
- @Use(booleans = { true, false })
- public boolean recursiveLeafChildrenNullable;
-
- public URL getTestUrl() {
- return buildUrl(contextPath,
"http://localhost:8080/metamer/faces/components/richTree/treeAdaptors.xhtml");
- }
-
- @BeforeClass
- public void initTreeAttributes() {
- treeAttributes = new TreeAttributes(jq("span[id*=treeAttributes]"));
- }
-
- @BeforeMethod
- public void initPathsAndModelRepresentation() {
- if (paths != null) {
- selectionPaths = paths.paths;
- }
- if (representation == RecursiveModelRepresentation.MAP) {
-
guardXhr(selenium).click(pjq(":radio[id*=recursiveModelRepresentation]").getNthOccurence(2));
- }
- if (recursiveLeafChildrenNullable) {
-
guardXhr(selenium).click(pjq(":checkbox[id$=recursiveLeafChildrenNullable]"));
- }
- }
-
- @Test
- @Override
- @Use(field = "paths", empty = true)
- public void testTopLevelSelection() {
- super.testTopLevelSelection();
- }
-
- @Test
- @Override
- @Use(field = "paths", value = "paths*")
- public void testSubNodesSelection() {
- super.testSubNodesSelection();
- }
-
- @Test
- @Override
- @Uses({ @Use(field = "paths", value = "paths*"),
- @Use(field = "selectionType", value =
"eventEnabledSelectionTypes") })
- public void testSubNodesSelectionEvents() {
- super.testSubNodesSelectionEvents();
- }
-
- @Override
- protected void expandAll() {
- for (Integer[] path : selectionPaths) {
- treeNode = null;
- for (int i = 0; i < path.length; i++) {
- int index = path[i];
- treeNode = (treeNode == null) ? tree.getNode(index) :
treeNode.getNode(index);
- if (i < path.length - 1) {
- treeNode.expand();
- }
- }
- }
- }
-
- @Override
- protected Integer[] getIntsFromString(String string) {
- Pattern pattern = Pattern.compile("(?:\\{[^}]+modelKey=(\\d+)\\})");
- Matcher matcher = pattern.matcher(string);
- List<Integer> list = new LinkedList<Integer>();
- while (matcher.find()) {
- int integer = Integer.valueOf(matcher.group(1)) + 1;
- integer = fixShiftWhenModelPresent(list, integer);
- list.add(integer);
- }
- if (list.isEmpty()) {
- throw new IllegalStateException("pattern does not match");
- }
- return list.toArray(new Integer[list.size()]);
- }
-
- private Integer fixShiftWhenModelPresent(List<Integer> list, int integer) {
- if (paths.toString().equals(pathsForRecursiveModel.toString())) {
- if (!list.isEmpty()) {
- if (list.get(0) % 2 == 0) {
- if (list.size() == 2) {
- return integer + 7;
- }
- } else {
- if (list.size() == 3) {
- return integer + 7;
- }
- }
- }
- }
- return integer;
- }
-
- private class PathsCrate {
- String name;
- Integer[][] paths;
-
- public PathsCrate(String name, Integer[][] paths) {
- this.name = name;
- this.paths = paths;
- }
-
- public String toString() {
- return name;
- }
- }
-}
Deleted:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorSimple.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorSimple.java 2011-02-03
22:16:35 UTC (rev 21441)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorSimple.java 2011-02-03
22:20:40 UTC (rev 21442)
@@ -1,117 +0,0 @@
-/*******************************************************************************
- * JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- *******************************************************************************/
-package org.richfaces.tests.metamer.ftest.treeModelAdaptor;
-
-import static org.jboss.test.selenium.locator.LocatorFactory.jq;
-import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
-
-import java.net.URL;
-
-import org.jboss.test.selenium.locator.ExtendedLocator;
-import org.jboss.test.selenium.locator.JQueryLocator;
-import org.richfaces.tests.metamer.ftest.AbstractComponentAttributes;
-import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
-import org.richfaces.tests.metamer.ftest.richTree.TreeAttributes;
-import org.richfaces.tests.metamer.ftest.richTree.TreeModel;
-import org.richfaces.tests.metamer.ftest.richTree.TreeNodeModel;
-import org.testng.annotations.Test;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-public class TestTreeModelAdaptorSimple extends AbstractMetamerTest {
-
- protected TreeAttributes treeAttributes = new
TreeAttributes(jq("span[id*=treeAttributes]"));
- protected TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
- protected TreeNodeModel treeNode;
-
- @Override
- public URL getTestUrl() {
- return buildUrl(contextPath,
"faces/components/richTree/treeAdaptors.xhtml");
- }
-
- @Test
- public void testModelAdaptorRendered() {
- tree.getNode(2).expand();
- tree.getNode(2).getNode(2).expand();
- treeNode = tree.getNode(2).getNode(2).getNode(1);
-
- assertTrue(treeNode.isLeaf());
-
- modelAdaptorAttributes.setRendered(false);
-
- assertFalse(treeNode.isLeaf());
- }
-
- @Test
- public void testRecursiveModelAdaptorRendered() {
- tree.getNode(2).expand();
- tree.getNode(2).getNode(2).expand();
-
- boolean subnodePresent = false;
- for (TreeNodeModel treeNode : tree.getNode(2).getNode(2).getNodes()) {
- if (!treeNode.isLeaf()) {
- subnodePresent = true;
- }
- }
- assertTrue(subnodePresent, "there should be at least one subnode (not leaf)
in expanded branch");
-
- recursiveModelAdaptorAttributes.setRendered(false);
-
- for (TreeNodeModel treeNode : tree.getNode(2).getNode(2).getNodes()) {
- if (!treeNode.isLeaf()) {
- fail("there should be no subnode (not leaf) in expanded
branch");
- }
- }
- }
-
- private ModelAdaptorAttributes modelAdaptorAttributes = new ModelAdaptorAttributes(
- pjq("span[id$=:listAttributes:panel]"));
- private RecursiveModelAdaptorAttributes recursiveModelAdaptorAttributes = new
RecursiveModelAdaptorAttributes(
- pjq("span[id$=:recursiveAttributes:panel]"));
-
- private class ModelAdaptorAttributes extends AbstractComponentAttributes {
-
- public <T extends ExtendedLocator<JQueryLocator>>
ModelAdaptorAttributes(T root) {
- super(root);
- }
-
- public void setRendered(Boolean rendered) {
- setProperty("rendered", rendered);
- }
- }
-
- private class RecursiveModelAdaptorAttributes extends AbstractComponentAttributes {
-
- public <T extends ExtendedLocator<JQueryLocator>>
RecursiveModelAdaptorAttributes(T root) {
- super(root);
- }
-
- public void setRendered(Boolean rendered) {
- setProperty("rendered", rendered);
- }
- }
-}
Deleted:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorToggling.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorToggling.java 2011-02-03
22:16:35 UTC (rev 21441)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/treeModelAdaptor/TestTreeModelAdaptorToggling.java 2011-02-03
22:20:40 UTC (rev 21442)
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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 software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- *******************************************************************************/
-package org.richfaces.tests.metamer.ftest.treeModelAdaptor;
-
-import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
-import static org.jboss.test.selenium.locator.LocatorFactory.jq;
-import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
-
-import java.net.URL;
-
-import org.richfaces.tests.metamer.ftest.annotations.Inject;
-import org.richfaces.tests.metamer.ftest.annotations.Use;
-import org.richfaces.tests.metamer.ftest.richTree.TestTreeToggling;
-import org.richfaces.tests.metamer.ftest.richTree.TreeAttributes;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-public class TestTreeModelAdaptorToggling extends TestTreeToggling {
-
- @Inject
- @Use(enumeration = true)
- public RecursiveModelRepresentation representation;
-
- @Inject
- @Use(booleans = { true, false })
- public boolean recursiveLeafChildrenNullable;
-
- @BeforeClass
- public void initTreeAttributes() {
- treeAttributes = new TreeAttributes(jq("span[id*=treeAttributes]"));
- }
-
- @BeforeMethod
- public void initPathsAndModelRepresentation() {
- if (representation == RecursiveModelRepresentation.MAP) {
-
guardXhr(selenium).click(pjq(":radio[id*=recursiveModelRepresentation]").getNthOccurence(2));
- }
- if (recursiveLeafChildrenNullable) {
-
guardXhr(selenium).click(pjq(":checkbox[id$=recursiveLeafChildrenNullable]"));
- }
- }
-
- public URL getTestUrl() {
- return buildUrl(contextPath,
"http://localhost:8080/metamer/faces/components/richTree/treeAdaptors.xhtml");
- }
-
- @Test
- @Override
- public void testTopLevelNodesExpansion() {
- super.testTopLevelNodesExpansion();
- }
-
- @Test
- @Override
- public void testTopLevelNodesCollapsion() {
- super.testTopLevelNodesCollapsion();
- }
-
- @Test
- @Override
- public void testDeepExpansion() {
- super.testDeepExpansion();
- }
-
- @Test
- @Override
- public void testDeepCollapsion() {
- super.testDeepCollapsion();
- }
-}