Author: ppitonak(a)redhat.com
Date: 2012-01-04 09:35:01 -0500 (Wed, 04 Jan 2012)
New Revision: 23125
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreePhases.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java
Log:
failing tests put to group 4.2
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreePhases.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreePhases.java 2012-01-04
12:24:22 UTC (rev 23124)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreePhases.java 2012-01-04
14:35:01 UTC (rev 23125)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -26,6 +26,7 @@
import javax.faces.event.PhaseId;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -47,6 +48,7 @@
}
@Test
+ @Use(field = "sample", strings = { "simpleSwingTreeNode",
"simpleRichFacesTreeDataModel" })
public void testPhasesSelection() {
tree.getNode(4).expand();
tree.getNode(4).getNode(3).select();
@@ -54,6 +56,13 @@
phaseInfo.assertListener(PhaseId.APPLY_REQUEST_VALUES, "selection change
listener invoked");
}
+ @Test(groups = { "4.2" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11766")
+ @Use(field = "sample", strings = { "simpleRichFacesTreeNode" })
+ public void testPhasesSelectionWithSimpleTreeNode() {
+ testPhasesSelection();
+ }
+
@Test
public void testPhasesToggling() {
tree.getNode(2).expand();
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java 2012-01-04
12:24:22 UTC (rev 23124)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java 2012-01-04
14:35:01 UTC (rev 23125)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -36,9 +36,8 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.utils.text.SimplifiedFormat;
import org.richfaces.component.SwitchType;
-import org.richfaces.tests.metamer.ftest.annotations.Inject;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.Use;
-import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
/**
@@ -48,31 +47,22 @@
@Use(field = "selectionPaths", value = "")
public class TestTreeSelection extends AbstractTestTree {
- protected Integer[][] selectionPaths = new Integer[][] {{4, 3}, {1, 4}, {2, 1, 1},
{2}, {2, 1},
- {3, 5 }, {4, 10, 3 } };
-
+ protected Integer[][] selectionPaths = new Integer[][] { { 4, 3 }, { 2, 1, 1 }, { 2
}, { 4, 10, 3 } };
+
protected TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
protected TreeNodeModel treeNode;
- @Inject
- @Use(value = "selectionTypes")
- SwitchType selectionType;
- SwitchType[] selectionTypes = new SwitchType[] {SwitchType.ajax, SwitchType.client};
- SwitchType[] eventEnabledSelectionTypes = new SwitchType[] {SwitchType.ajax};
-
JQueryLocator expandAll = jq("input:submit[id$=expandAll]");
JQueryLocator selection = jq("span[id$=selection]");
JQueryLocator clientId = jq("span[id$=selectionEventClientId]");
JQueryLocator newSelection = jq("span[id$=selectionEventNewSelection]");
JQueryLocator oldSelection = jq("span[id$=selectionEventOldSelection]");
- @BeforeMethod
- public void testInitialize() {
+ public void testInitialize(SwitchType selectionType) {
treeAttributes.set(TreeAttributes.selectionType, selectionType);
tree.setSelectionType(selectionType);
}
- @Test
public void testTopLevelSelection() {
assertEquals(tree.getAnySelectedNodesCount(), 0);
@@ -88,6 +78,26 @@
}
@Test
+ public void testTopLevelSelectionClient() {
+ testInitialize(SwitchType.client);
+ testTopLevelSelection();
+ }
+
+ @Test
+ @Use(field = "sample", strings = { "simpleSwingTreeNode",
"simpleRichFacesTreeDataModel" })
+ public void testTopLevelSelectionAjax() {
+ testInitialize(SwitchType.ajax);
+ testTopLevelSelection();
+ }
+
+ @Test(groups = { "4.2" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11766")
+ @Use(field = "sample", strings = { "simpleRichFacesTreeNode" })
+ public void testTopLevelSelectionAjaxWithSimpleTreeNode() {
+ testInitialize(SwitchType.ajax);
+ testTopLevelSelection();
+ }
+
public void testSubNodesSelection() {
expandAll();
assertEquals(tree.getAnySelectedNodesCount(), 0);
@@ -105,7 +115,26 @@
}
@Test
- @Use(field = "selectionType", value =
"eventEnabledSelectionTypes")
+ public void testSubNodesSelectionClient() {
+ testInitialize(SwitchType.client);
+ testSubNodesSelection();
+ }
+
+ @Test
+ @Use(field = "sample", strings = { "simpleSwingTreeNode",
"simpleRichFacesTreeDataModel" })
+ public void testSubNodesSelectionAjax() {
+ testInitialize(SwitchType.ajax);
+ testSubNodesSelection();
+ }
+
+ @Test(groups = { "4.2" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11766")
+ @Use(field = "sample", strings = { "simpleRichFacesTreeNode" })
+ public void testSubNodesSelectionAjaxWithSimpleTreeNode() {
+ testInitialize(SwitchType.ajax);
+ testSubNodesSelection();
+ }
+
public void testSubNodesSelectionEvents() {
expandAll();
Integer[] old = null;
@@ -139,6 +168,28 @@
}
}
+ @Test(groups = { "4.2" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11766")
+ public void testSubNodesSelectionEventsClient() {
+ testInitialize(SwitchType.client);
+ testSubNodesSelectionEvents();
+ }
+
+ @Test
+ @Use(field = "sample", strings = { "simpleSwingTreeNode",
"simpleRichFacesTreeDataModel" })
+ public void testSubNodesSelectionEventsAjax() {
+ testInitialize(SwitchType.ajax);
+ testSubNodesSelectionEvents();
+ }
+
+ @Test(groups = { "4.2" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11766")
+ @Use(field = "sample", strings = { "simpleRichFacesTreeNode" })
+ public void testSubNodesSelectionEventsAjaxWithSimpleTreeNode() {
+ testInitialize(SwitchType.ajax);
+ testSubNodesSelectionEvents();
+ }
+
protected void expandAll() {
guardXhr(selenium).click(expandAll);
}
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java
===================================================================
---
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java 2012-01-04
12:24:22 UTC (rev 23124)
+++
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java 2012-01-04
14:35:01 UTC (rev 23125)
@@ -1,6 +1,6 @@
/*******************************************************************************
* JBoss, Home of Professional Open Source
- * Copyright 2010-2011, Red Hat, Inc. and individual contributors
+ * Copyright 2010-2012, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
@@ -243,6 +243,7 @@
}
@Test
+ @Use(field = "sample", strings = { "simpleSwingTreeNode",
"simpleRichFacesTreeDataModel" })
@Templates(exclude = "a4jRegion")
public void testSelectionClientSideEvents() {
String[] events = new String[] { "beforeselectionchange",
"begin", "beforedomupdate", "complete",
@@ -252,6 +253,14 @@
testRequestEventsAfter(events);
}
+ @Test(groups = { "4.2" })
+ @IssueTracking("https://issues.jboss.org/browse/RF-11766")
+ @Use(field = "sample", strings = { "simpleRichFacesTreeNode" })
+ @Templates(exclude = "a4jRegion")
+ public void testSelectionClientSideEventsWithSimpleTreeNode() {
+ testSelectionClientSideEvents();
+ }
+
@Test(groups = { "4.Future" })
@IssueTracking("https://issues.jboss.org/browse/RF-11319")
@Templates(value = "a4jRegion")