JBoss Rich Faces SVN: r22760 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: jpapouse
Date: 2011-09-26 03:21:10 -0400 (Mon, 26 Sep 2011)
New Revision: 22760
Modified:
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingList.java
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingListAttributes.java
Log:
tests for ondblclick and onlistdblclick attributes
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingList.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingList.java	2011-09-26 07:20:15 UTC (rev 22759)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingList.java	2011-09-26 07:21:10 UTC (rev 22760)
@@ -21,14 +21,14 @@
  *******************************************************************************/
 package org.richfaces.tests.metamer.ftest.richOrderingList;
 
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
 import java.net.URL;
 
 import org.jboss.test.selenium.utils.URLUtils;
-import org.richfaces.tests.metamer.ftest.model.OrderingList;
 import org.testng.annotations.Test;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.assertEquals;
 
 /**
  * Selenium tests for page faces/components/richOrderingList/withColumn.xhtml.
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingListAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingListAttributes.java	2011-09-26 07:20:15 UTC (rev 22759)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richOrderingList/TestOrderingListAttributes.java	2011-09-26 07:21:10 UTC (rev 22760)
@@ -21,25 +21,20 @@
  *******************************************************************************/
 package org.richfaces.tests.metamer.ftest.richOrderingList;
 
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.fail;
+
 import java.net.URL;
 import java.util.HashMap;
 import java.util.Map;
 
-import javax.swing.plaf.basic.BasicInternalFrameTitlePane.RestoreAction;
-
 import org.jboss.test.selenium.css.CssProperty;
 import org.jboss.test.selenium.dom.Event;
 import org.jboss.test.selenium.locator.JQueryLocator;
 import org.jboss.test.selenium.utils.URLUtils;
-import org.jboss.test.selenium.waiting.EventFiredCondition;
-import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
-import org.richfaces.tests.metamer.ftest.model.OrderingList;
 import org.testng.annotations.Test;
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.fail;
-import static org.jboss.test.selenium.locator.LocatorFactory.jq;
 
 /**
  * Selenium tests for page faces/components/richOrderingList/withColumn.xhtml.
@@ -127,10 +122,9 @@
         testFireEvent(Event.CLICK, getOrderingList().getLocator());
     }
     
-    @Test(enabled=false)
-    @IssueTracking("https://issues.jboss.org/browse/RF-11318")
+    @Test
     public void testOndblclick() {
-        // TODO
+        testFireEvent(Event.DBLCLICK, getOrderingList().getLocator());
     }
     
     @Test(enabled=false)
@@ -158,9 +152,9 @@
         testFireEvent(Event.CLICK, getOrderingList().getList(), "listclick");
     }
     
-    @Test(enabled=false)
+    @Test
     public void testOnlistdblclick() {
-        // TODO
+        testFireEvent(Event.DBLCLICK, getOrderingList().getList(), "listdblclick");
     }    
 
     @Test
@@ -246,6 +240,11 @@
         super.testStyle(getOrderingList().getLocator());
     }
     
+    @Test(enabled=false)
+    public void testValueChangeListener() {
+        
+    }
+    
     private void testSizeCssProperty(JQueryLocator element, OrderingListAttributes attribute, CssProperty cssProperty) {
         Map<String, String> values = new HashMap<String, String>();
         values.put("100", "100px");
                                
                         
                        
                                
                                14 years, 1 month
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r22759 - modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: jpapouse
Date: 2011-09-26 03:20:15 -0400 (Mon, 26 Sep 2011)
New Revision: 22759
Modified:
   modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/simple.xhtml
   modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/withColumn.xhtml
Log:
RF-11318: typo
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/simple.xhtml	2011-09-23 22:33:15 UTC (rev 22758)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/simple.xhtml	2011-09-26 07:20:15 UTC (rev 22759)
@@ -29,6 +29,14 @@
 
 <ui:composition template="/templates/template.xhtml">
 
+    <ui:define name="view">
+        <f:metadata>
+            <f:viewParam name="templates" value="#{templateBean.templates}">
+                <f:converter converterId="templatesListConverter" />
+            </f:viewParam>
+        </f:metadata>
+    </ui:define>
+
     <ui:define name="component">
         <h:form>
             <h:commandButton id="submitButton" value="submit" execute="@form" />
@@ -54,7 +62,7 @@
                                onblur="#{richOrderingListBean.attributes['onblur'].value}"
                                onchange="#{richOrderingListBean.attributes['onchange'].value}"
                                onclick="#{richOrderingListBean.attributes['onclick'].value}"
-                               ondblclick="#{richOrderingListBean.attributes['ondbclick'].value}"
+                               ondblclick="#{richOrderingListBean.attributes['ondblclick'].value}"
                                onfocus="#{richOrderingListBean.attributes['onfocus'].value}"
                                onkeydown="#{richOrderingListBean.attributes['onkeydown'].value}"
                                onkeypress="#{richOrderingListBean.attributes['onkeypress'].value}"
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/withColumn.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/withColumn.xhtml	2011-09-23 22:33:15 UTC (rev 22758)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richOrderingList/withColumn.xhtml	2011-09-26 07:20:15 UTC (rev 22759)
@@ -29,6 +29,14 @@
 
 <ui:composition template="/templates/template.xhtml">
 
+    <ui:define name="view">
+        <f:metadata>
+            <f:viewParam name="templates" value="#{templateBean.templates}">
+                <f:converter converterId="templatesListConverter" />
+            </f:viewParam>
+        </f:metadata>
+    </ui:define>
+
     <ui:define name="component">
         <h:form>
             <h:commandButton id="submitButton" value="submit" execute="@form" />
@@ -53,7 +61,7 @@
                                onblur="#{richOrderingListBean.attributes['onblur'].value}"
                                onchange="#{richOrderingListBean.attributes['onchange'].value}"
                                onclick="#{richOrderingListBean.attributes['onclick'].value}"
-                               ondblclick="#{richOrderingListBean.attributes['ondbclick'].value}"
+                               ondblclick="#{richOrderingListBean.attributes['ondblclick'].value}"
                                onfocus="#{richOrderingListBean.attributes['onfocus'].value}"
                                onkeydown="#{richOrderingListBean.attributes['onkeydown'].value}"
                                onkeypress="#{richOrderingListBean.attributes['onkeypress'].value}"
                                
                         
                        
                                
                                14 years, 1 month
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r22758 - modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: jjamrich
Date: 2011-09-23 18:33:15 -0400 (Fri, 23 Sep 2011)
New Revision: 22758
Added:
   modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/eventHandlers.xhtml
Modified:
   modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/list.xhtml
Log:
RFPL-1424: add page with example of valueChangeListener and ajax with listener
Added: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/eventHandlers.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/eventHandlers.xhtml	                        (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/eventHandlers.xhtml	2011-09-23 22:33:15 UTC (rev 22758)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!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:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"
+      xmlns:rich="http://richfaces.org/rich"
+      xmlns:metamer="http://java.sun.com/jsf/composite/metamer">
+
+    <!--
+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.
+    -->
+
+    <ui:composition template="/templates/template.xhtml">
+
+        <ui:define name="view">
+            <f:metadata>
+                <f:viewParam name="templates" value="#{templateBean.templates}">
+                    <f:converter converterId="templatesListConverter" />
+                </f:viewParam>
+            </f:metadata>
+        </ui:define>
+
+        <ui:define name="component">
+            <h:panelGrid columns="3">
+                <h:column>
+                    h:inputText:
+                </h:column>
+                <h:column>
+                    <h:inputText id="simpleText1" value="#{a4jAjaxBean.input}" 
+                                 valueChangeListener="#{richBean.valueChangeListener}" >
+                        <a4j:ajax event="change" listener="#{richBean.actionListener}" render="output1" />
+                    </h:inputText>
+                </h:column>
+                <h:column>
+                    <h:inputText id="simpleText2" value="#{a4jAjaxBean.input}" >
+                        <a4j:ajax event="change" listener="#{richBean.actionListener}" render="output1" />
+                    </h:inputText>
+                </h:column>
+                
+                <h:column>
+                    rich:autocomplete:
+                </h:column>
+                <h:column>
+                    <rich:autocomplete id="autocomplete1" value="#{a4jAjaxBean.input}" 
+                                       valueChangeListener="#{richBean.valueChangeListener}" >
+                        <a4j:ajax event="change" listener="#{richBean.actionListener}" render="output1" />
+                    </rich:autocomplete>
+                </h:column>
+                    <rich:autocomplete id="autocomplete2" value="#{a4jAjaxBean.input}">
+                        <a4j:ajax event="change" listener="#{richBean.actionListener}" render="output1" />
+                    </rich:autocomplete>
+                <h:column>
+                </h:column>
+            </h:panelGrid>
+            
+            <br/>
+            <a4j:outputPanel id="output1" layout="block">
+                Output: <h:outputText value="#{a4jAjaxBean.input}"/>
+            </a4j:outputPanel>
+            
+        </ui:define>
+
+        <ui:define name="outOfTemplateAfter">
+            
+        </ui:define>
+
+    </ui:composition>
+</html>
\ No newline at end of file
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/list.xhtml	2011-09-23 22:32:57 UTC (rev 22757)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/list.xhtml	2011-09-23 22:33:15 UTC (rev 22758)
@@ -89,6 +89,10 @@
             <metamer:testPageLink id="hSelectOneListbox" outcome="hSelectOneListbox" value="Select One Listbox">
                 Simple page that contains <b>h:selectOneListbox</b> with <b>a4j:ajax</b> and input boxes for all its attributes.
             </metamer:testPageLink>
+            
+            <metamer:testPageLink id="eventHandlers" outcome="eventHandlers" value="Event handlers for various components">
+                Simple page that contains <b>various components</b> with <b>a4j:ajax</b> with event handler to tests collisions on this attribute
+            </metamer:testPageLink>
 
         </ui:define>
 
                                
                         
                        
                                
                                14 years, 1 month
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r22757 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richValidator.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: jjamrich
Date: 2011-09-23 18:32:57 -0400 (Fri, 23 Sep 2011)
New Revision: 22757
Modified:
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richValidator/TestWrappingValidatorSingle.java
Log:
Add issue tracking for CSV testing no XHR request during validation
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richValidator/TestWrappingValidatorSingle.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richValidator/TestWrappingValidatorSingle.java	2011-09-23 14:15:23 UTC (rev 22756)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richValidator/TestWrappingValidatorSingle.java	2011-09-23 22:32:57 UTC (rev 22757)
@@ -26,6 +26,7 @@
 import java.net.URL;
 
 import org.jboss.test.selenium.utils.URLUtils;
+import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
 import org.testng.annotations.Test;
 
 /**
@@ -47,6 +48,7 @@
     }
     
     @Test
+    @IssueTracking("https://issues.jboss.org/browse/RF-11139")
     public void testIntegerMin() {
         selenium.click(pjq("input[id$=setCorrectValuesButton]"));
         
                                
                         
                        
                                
                                14 years, 1 month
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r22756 - modules/tests/metamer/trunk/ftest.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: ppitonak(a)redhat.com
Date: 2011-09-23 10:15:23 -0400 (Fri, 23 Sep 2011)
New Revision: 22756
Modified:
   modules/tests/metamer/trunk/ftest/pom.xml
Log:
added relativePath to ftest parent
Modified: modules/tests/metamer/trunk/ftest/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/pom.xml	2011-09-23 14:13:43 UTC (rev 22755)
+++ modules/tests/metamer/trunk/ftest/pom.xml	2011-09-23 14:15:23 UTC (rev 22756)
@@ -26,6 +26,7 @@
         <artifactId>functional-test-jboss-ci-template</artifactId>
         <groupId>org.jboss.test.richfaces-selenium</groupId>
         <version>1.5.3.Final</version>
+        <relativePath/>
     </parent>
 
     <groupId>org.richfaces.tests</groupId>
                                
                         
                        
                                
                                14 years, 1 month
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r22755 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel and 1 other directory.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: jpapouse
Date: 2011-09-23 10:13:43 -0400 (Fri, 23 Sep 2011)
New Revision: 22755
Modified:
   modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichTabPanelBean.properties
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
Log:
RFPL-1674: tests for headerPosition and headerAlignment attributes (rich:tabPanel)
Modified: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichTabPanelBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichTabPanelBean.properties	2011-09-23 13:31:48 UTC (rev 22754)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/rich/RichTabPanelBean.properties	2011-09-23 14:13:43 UTC (rev 22755)
@@ -6,6 +6,10 @@
 attr.headerAlignment.right=right
 attr.headerAlignment.null=
 
+attr.headerPosition.bottom=bottom
+attr.headerPosition.top=top
+attr.headerPosition.null=
+
 attr.switchType.client=client
 attr.switchType.server=server
 attr.switchType.ajax=ajax
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java	2011-09-23 13:31:48 UTC (rev 22754)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java	2011-09-23 14:13:43 UTC (rev 22755)
@@ -33,6 +33,7 @@
 
 import javax.faces.event.PhaseId;
 
+import org.jboss.test.selenium.css.CssProperty;
 import org.jboss.test.selenium.dom.Event;
 import org.jboss.test.selenium.encapsulated.JavaScript;
 import org.jboss.test.selenium.locator.JQueryLocator;
@@ -41,6 +42,7 @@
 import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
 import org.richfaces.tests.metamer.ftest.annotations.RegressionTest;
 import org.testng.annotations.Test;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
 
 /**
  * Test case for page /faces/components/richTabPanel/simple.xhtml
@@ -68,6 +70,44 @@
     }
 
     @Test
+    public void testHeaderAlignment() {
+        JQueryLocator spaceLeft = jq(panel.getRawLocator() + " *.rf-tab-hdr-spcr:eq(0)");
+        JQueryLocator spaceRight = jq(panel.getRawLocator() + " *.rf-tab-hdr-spcr:eq(6)");
+        
+        assertEquals(selenium.getStyle(spaceLeft, CssProperty.WIDTH), "0px", "The header should be aligned to the left, but it isn't.");
+        assertTrue(Integer.parseInt(selenium.getStyle(spaceRight, CssProperty.WIDTH).replace("px", "")) > 100, "The header should be aligned to the left, but it isn't.");
+        
+        selenium.click(pjq("input[name$=headerAlignmentInput][value=left]"));
+        selenium.waitForPageToLoad();
+        
+        assertEquals(selenium.getStyle(spaceLeft, CssProperty.WIDTH), "0px", "The header should be aligned to the left, but it isn't.");
+        assertTrue(Integer.parseInt(selenium.getStyle(spaceRight, CssProperty.WIDTH).replace("px", "")) > 100, "The header should be aligned to the left, but it isn't.");
+        
+        selenium.click(pjq("input[name$=headerAlignmentInput][value=right]"));
+        selenium.waitForPageToLoad();
+        
+        assertTrue(Integer.parseInt(selenium.getStyle(spaceLeft, CssProperty.WIDTH).replace("px", "")) > 100, "The header should be aligned to the right, but it isn't.");
+        assertEquals(selenium.getStyle(spaceRight, CssProperty.WIDTH), "0px", "The header should be aligned to the right, but it isn't.");
+    }
+    
+    @Test
+    public void testHeaderPosition() {
+        selenium.click(pjq("input[name$=headerPositionInput][value=bottom]"));
+        selenium.waitForPageToLoad();        
+        
+        JQueryLocator bottomVersion = jq(panel.getRawLocator() + " *.rf-tab-hdr-tabline-btm-vis");
+        JQueryLocator topVersion = jq(panel.getRawLocator() + " *.rf-tab-hdr-tabline-top-vis");
+
+        selenium.click(pjq("input[name$=headerPositionInput][value=top]"));
+        selenium.waitForPageToLoad();        
+        assertTrue(selenium.isElementPresent(topVersion), "The header should be placed on the top position (" + topVersion.getRawLocator() +")");
+
+        selenium.click(pjq("input[name$=headerPositionInput][value=bottom]"));
+        selenium.waitForPageToLoad();        
+        assertTrue(selenium.isElementPresent(bottomVersion), "The header should be placed on the bottom position (" + bottomVersion.getRawLocator() +")");        
+    }
+    
+    @Test
     public void testInit() {
         boolean displayed = selenium.isDisplayed(panel);
         assertTrue(displayed, "Tab panel is not present on the page.");
@@ -101,7 +141,7 @@
     }
 
     @Test
-    @IssueTracking("https://issues.jboss.org/browse/RF-10351")
+    @RegressionTest("https://issues.jboss.org/browse/RF-10351")
     public void testActiveItem() {
         selenium.type(pjq("input[type=text][id$=activeItemInput]"), "tab5");
         selenium.waitForPageToLoad();
                                
                         
                        
                                
                                14 years, 1 month
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r22754 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richTree and 1 other directories.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: jjamrich
Date: 2011-09-23 09:31:48 -0400 (Fri, 23 Sep 2011)
New Revision: 22754
Removed:
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TreeModelAdaptorAttributes.java
Modified:
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSimple.java
Log:
RFPL-1439: Remove AbstractComponentAttributes class. R.I.P, you did good job, but it was not enough!
Remove all unused classes and references to this class. This class was completelly replaced by org.richfaces.tests.metamer.ftest.attributes.Attributes and related classes providing type safe and quite easier and better manageable way to setting component attributes.
Deleted: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java	2011-09-23 13:31:18 UTC (rev 22753)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/AbstractComponentAttributes.java	2011-09-23 13:31:48 UTC (rev 22754)
@@ -1,180 +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;
-
-import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guard;
-import static org.jboss.test.selenium.locator.Attribute.VALUE;
-import static org.jboss.test.selenium.locator.LocatorFactory.jq;
-import static org.jboss.test.selenium.locator.reference.ReferencedLocator.referenceInferred;
-import static org.richfaces.tests.metamer.ftest.AbstractMetamerTest.pjq;
-
-import org.jboss.test.selenium.dom.Event;
-import org.jboss.test.selenium.framework.AjaxSelenium;
-import org.jboss.test.selenium.framework.AjaxSeleniumProxy;
-import org.jboss.test.selenium.interception.CommandContext;
-import org.jboss.test.selenium.interception.CommandInterceptionException;
-import org.jboss.test.selenium.interception.CommandInterceptor;
-import org.jboss.test.selenium.locator.Attribute;
-import org.jboss.test.selenium.locator.AttributeLocator;
-import org.jboss.test.selenium.locator.ElementLocator;
-import org.jboss.test.selenium.locator.ExtendedLocator;
-import org.jboss.test.selenium.locator.JQueryLocator;
-import org.jboss.test.selenium.locator.option.OptionValueLocator;
-import org.jboss.test.selenium.locator.reference.LocatorReference;
-import org.jboss.test.selenium.locator.reference.ReferencedLocator;
-import org.jboss.test.selenium.request.RequestType;
-import org.jboss.test.selenium.waiting.Wait;
-
-import com.thoughtworks.selenium.SeleniumException;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-public class AbstractComponentAttributes {
-
-    protected AjaxSelenium selenium = AjaxSeleniumProxy.getInstance();
-    LocatorReference<ExtendedLocator<JQueryLocator>> root = new LocatorReference<ExtendedLocator<JQueryLocator>>(
-        pjq(""));
-    ReferencedLocator<JQueryLocator> propertyLocator = referenceInferred(root, ":input[id*=:{0}Input]{1}");
-
-    RequestType requestType = RequestType.HTTP;
-
-    public AbstractComponentAttributes() {
-    }
-
-    public <T extends ExtendedLocator<JQueryLocator>> AbstractComponentAttributes(T root) {
-        this.root.setLocator(root);
-    }
-
-    public ExtendedLocator<JQueryLocator> getRoot() {
-        return root.getLocator();
-    }
-
-    public void setRoot(ExtendedLocator<JQueryLocator> root) {
-        this.root.setLocator(root);
-    }
-
-    protected String getProperty(String propertyName) {
-        final ReferencedLocator<JQueryLocator> locator = propertyLocator.format(propertyName, "");
-        if (selenium.getCount(locator) > 1) {
-            return selenium.getAttribute(propertyLocator.format(propertyName, "[checked]").getAttribute(VALUE));
-        }
-        return selenium.getValue(locator);
-    }
-
-    protected void setProperty(String propertyName, Object value) {
-        selenium.getInterceptionProxy().registerInterceptor(new RepeatForElementNotFound());
-
-        ExtendedLocator<JQueryLocator> locator = propertyLocator.format(propertyName, "");
-        final AttributeLocator<?> typeLocator = locator.getAttribute(Attribute.TYPE);
-        final ExtendedLocator<JQueryLocator> optionLocator = locator.getChild(jq("option"));
-
-        String inputType = null;
-        if (selenium.getCount(propertyLocator.format(propertyName)) > 1) {
-            inputType = "radio";
-        } else if (selenium.getCount(optionLocator) > 1) {
-            inputType = "select";
-        } else {
-            inputType = selenium.getAttribute(typeLocator);
-        }
-
-        if (value == null) {
-            value = "";
-        }
-
-        String valueAsString = value.toString();
-
-        if ("text".equals(inputType)) {
-            applyText(locator, valueAsString);
-        } else if ("checkbox".equals(inputType)) {
-            boolean checked = Boolean.valueOf(valueAsString);
-            applyCheckbox(locator, checked);
-        } else if ("radio".equals(inputType)) {
-            locator = propertyLocator.format(propertyName, "[value="
-                + ("".equals(valueAsString) ? "null" : valueAsString) + "]");
-
-            if (!selenium.isChecked(locator)) {
-                applyRadio(locator);
-            }
-        } else if ("select".equals(inputType)) {
-            String curValue = selenium.getValue(locator);
-            if (valueAsString.equals(curValue)) {
-                return;
-            }
-            applySelect(locator, valueAsString);
-        }
-
-        selenium.getInterceptionProxy().unregisterInterceptorType(RepeatForElementNotFound.class);
-    }
-
-    public void setRequestType(RequestType requestType) {
-        this.requestType = requestType;
-    }
-
-    public RequestType getRequestType() {
-        return requestType;
-    }
-
-    protected void applyText(ElementLocator<?> locator, String value) {
-        guard(selenium, requestType).type(locator, value);
-    }
-
-    protected void applyCheckbox(ElementLocator<?> locator, boolean checked) {
-        selenium.check(locator, checked);
-        guard(selenium, requestType).fireEvent(locator, Event.CHANGE);
-    }
-
-    protected void applyRadio(ElementLocator<?> locator) {
-        guard(selenium, requestType).click(locator);
-    }
-
-    protected void applySelect(ElementLocator<?> locator, String value) {
-        OptionValueLocator optionLocator = new OptionValueLocator(value);
-        guard(selenium, requestType).select(locator, optionLocator);
-    }
-
-    public void setOncomplete(String oncomplete) {
-        setProperty("oncomplete", oncomplete);
-    }
-
-    private class RepeatForElementNotFound implements CommandInterceptor {
-        @Override
-        public void intercept(CommandContext ctx) throws CommandInterceptionException {
-            for (int i = 1; i <= 3; i++) {
-                try {
-                    ctx.invoke();
-                    break;
-                } catch (SeleniumException e) {
-                    if (i == 3) {
-                        throw e;
-                    }
-                    if (e.getMessage().matches("ERROR: Element .* not found")) {
-                        Wait.waitAjax().timeout(500).interval(100).waitForTimeout();
-                        continue;
-                    }
-                    throw e;
-                }
-            }
-        }
-    }
-}
Deleted: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TreeModelAdaptorAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TreeModelAdaptorAttributes.java	2011-09-23 13:31:18 UTC (rev 22753)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TreeModelAdaptorAttributes.java	2011-09-23 13:31:48 UTC (rev 22754)
@@ -1,34 +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.richTree;
-
-import org.richfaces.tests.metamer.ftest.AbstractComponentAttributes;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-public class TreeModelAdaptorAttributes extends AbstractComponentAttributes {
-    public void setRendered(Boolean rendered) {
-        setProperty("rendered", rendered);
-    }
-}
Modified: 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/TestTreeModelAdaptorSimple.java	2011-09-23 13:31:18 UTC (rev 22753)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSimple.java	2011-09-23 13:31:48 UTC (rev 22754)
@@ -28,9 +28,6 @@
 
 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.attributes.AttributeEnum;
 import org.richfaces.tests.metamer.ftest.attributes.Attributes;
                                
                         
                        
                                
                                14 years, 1 month
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r22753 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richTree and 2 other directories.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: jjamrich
Date: 2011-09-23 09:31:18 -0400 (Fri, 23 Sep 2011)
New Revision: 22753
Removed:
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TreeModelRecursiveAdaptorAttributes.java
Modified:
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java
   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
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeToggling.java
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TreeAttributes.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
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TreeNodeAttributes.java
Log:
RFPL-1439: Update tests for tree to use unified way to setting attributes
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java	2011-09-23 13:30:37 UTC (rev 22752)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java	2011-09-23 13:31:18 UTC (rev 22753)
@@ -1,7 +1,7 @@
 package org.richfaces.tests.metamer.ftest.attributes;
 
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
 import static org.richfaces.tests.metamer.ftest.AbstractMetamerTest.pjq;
-import javassist.expr.NewArray;
 
 import org.jboss.test.selenium.request.RequestType;
 import org.richfaces.tests.metamer.ftest.BasicAttributes;
@@ -30,6 +30,7 @@
 import org.richfaces.tests.metamer.ftest.richPanelMenuItem.PanelMenuItemAttributes;
 import org.richfaces.tests.metamer.ftest.richPickList.PickListAttributes;
 import org.richfaces.tests.metamer.ftest.richTooltip.TooltipAttributes;
+import org.richfaces.tests.metamer.ftest.richTree.TreeAttributes;
 
 public class AttributeList {
     public static Attributes<BasicAttributes> basicAttributes = new Attributes<BasicAttributes>();
@@ -61,5 +62,6 @@
     public static Attributes<PanelMenuGroupAttributes> panelMenuGroupAttributes = new Attributes<PanelMenuGroupAttributes>();
     public static Attributes<PanelMenuItemAttributes> panelMenuItemAttributes = new Attributes<PanelMenuItemAttributes>();
     public static Attributes<PickListAttributes> pickListAttributes = new Attributes<PickListAttributes>();
+    public static Attributes<TreeAttributes> treeAttributes = new Attributes<TreeAttributes>(jq("span[id*=attributes]"));
     
 }
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	2011-09-23 13:30:37 UTC (rev 22752)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreePhases.java	2011-09-23 13:31:18 UTC (rev 22753)
@@ -21,8 +21,8 @@
  *******************************************************************************/
 package org.richfaces.tests.metamer.ftest.richTree;
 
-import static org.jboss.test.selenium.locator.LocatorFactory.jq;
 import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.treeAttributes;
 
 import java.net.URL;
 
@@ -43,7 +43,6 @@
     @Use(booleans = { true, false })
     Boolean immediate;
 
-    private TreeAttributes treeAttributes = new TreeAttributes(jq("span[id*=attributes]"));
     private TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
 
     @Override
@@ -53,7 +52,7 @@
 
     @BeforeMethod
     public void initialize() {
-        treeAttributes.setImmediate(immediate);
+        treeAttributes.set(TreeAttributes.immediate, immediate);
     }
 
     @Test
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	2011-09-23 13:30:37 UTC (rev 22752)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSelection.java	2011-09-23 13:31:18 UTC (rev 22753)
@@ -27,6 +27,7 @@
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertTrue;
+import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.treeAttributes;
 
 import java.net.URL;
 import java.util.Arrays;
@@ -53,7 +54,6 @@
     protected Integer[][] selectionPaths = new Integer[][] {{2, 3}, {3, 4}, {4, 1, 1}, {4}, {4, 1},
         {1, 5 }, {2, 3, 3 } };
     
-    protected TreeAttributes treeAttributes = new TreeAttributes(jq("span[id*=attributes]"));
     protected TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
     protected TreeNodeModel treeNode;
 
@@ -77,7 +77,7 @@
 
     @BeforeMethod
     public void testInitialize() {
-        treeAttributes.setSelectionType(selectionType);
+        treeAttributes.set(TreeAttributes.selectionType, selectionType);
         tree.setSelectionType(selectionType);
     }
 
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	2011-09-23 13:30:37 UTC (rev 22752)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeSimple.java	2011-09-23 13:31:18 UTC (rev 22753)
@@ -38,10 +38,26 @@
 import static org.jboss.test.selenium.locator.LocatorFactory.jq;
 import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
 import static org.jboss.test.selenium.utils.text.SimplifiedFormat.format;
+import static org.richfaces.tests.metamer.ftest.BasicAttributes.handleClass;
+import static org.richfaces.tests.metamer.ftest.BasicAttributes.iconClass;
+import static org.richfaces.tests.metamer.ftest.BasicAttributes.labelClass;
+import static org.richfaces.tests.metamer.ftest.BasicAttributes.nodeClass;
+import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.treeAttributes;
+import static org.richfaces.tests.metamer.ftest.richTree.TreeAttributes.data;
+import static org.richfaces.tests.metamer.ftest.richTree.TreeAttributes.execute;
+import static org.richfaces.tests.metamer.ftest.richTree.TreeAttributes.iconCollapsed;
+import static org.richfaces.tests.metamer.ftest.richTree.TreeAttributes.iconExpanded;
+import static org.richfaces.tests.metamer.ftest.richTree.TreeAttributes.iconLeaf;
+import static org.richfaces.tests.metamer.ftest.richTree.TreeAttributes.limitRender;
+import static org.richfaces.tests.metamer.ftest.richTree.TreeAttributes.oncomplete;
+import static org.richfaces.tests.metamer.ftest.richTree.TreeAttributes.render;
+import static org.richfaces.tests.metamer.ftest.richTree.TreeAttributes.rendered;
+import static org.richfaces.tests.metamer.ftest.richTree.TreeAttributes.selectionType;
+import static org.richfaces.tests.metamer.ftest.richTree.TreeAttributes.status;
+import static org.richfaces.tests.metamer.ftest.richTree.TreeAttributes.toggleNodeEvent;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertTrue;
-import static org.richfaces.tests.metamer.ftest.BasicAttributes.*;
 
 import java.net.URL;
 
@@ -57,7 +73,6 @@
 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.richfaces.tests.metamer.ftest.richTreeNode.TreeNodeAttributes;
 import org.testng.annotations.Test;
 
 /**
@@ -89,12 +104,6 @@
     TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
     TreeNodeModel treeNode;
 
-    TreeAttributes attributes = new TreeAttributes(pjq("span[id*=attributes]"));
-    TreeNodeAttributes[] nodeAttributes = new TreeNodeAttributes[] {
-        new TreeNodeAttributes(pjq("span[id*=treeNode1Attributes]")),
-        new TreeNodeAttributes(pjq("span[id*=treeNode2Attributes]")),
-        new TreeNodeAttributes(pjq("span[id*=treeNode3Attributes]")) };
-
     JQueryLocator expandAll = jq("input:submit[id$=expandAll]");
     JQueryLocator loadingFacet = jq("input:checkbox[id$=loadingFacet]");
 
@@ -105,8 +114,8 @@
 
     @Test
     public void testData() {
-        attributes.setData("RichFaces 4");
-        attributes.setOncomplete("data = event.data");
+        treeAttributes.set(data, "RichFaces 4");
+        treeAttributes.set(oncomplete, "data = event.data");
 
         retrieveRequestTime.initializeValue();
         tree.getNode(1).select();
@@ -122,7 +131,7 @@
 
     @Test
     public void testExecute() {
-        attributes.setExecute("executeChecker @this");
+        treeAttributes.set(execute, "executeChecker @this");
         tree.getNode(1).select();
         assertTrue(selenium.isTextPresent("* executeChecker"));
     }
@@ -153,7 +162,7 @@
 
     @Test
     public void testIconCollapsed() {
-        attributes.setIconCollapsed(IMAGE_URL);
+        treeAttributes.set(iconCollapsed, IMAGE_URL);
 
         for (int i = 0; i < 3; i++) {
             ExtendedLocator<JQueryLocator> icons = tree.getAnyNode().getIcon();
@@ -172,7 +181,7 @@
 
     @Test
     public void testIconExpanded() {
-        attributes.setIconExpanded(IMAGE_URL);
+        treeAttributes.set(iconExpanded, IMAGE_URL);
 
         for (int i = 0; i < 3; i++) {
             ExtendedLocator<JQueryLocator> icons = tree.getAnyNode().getIcon();
@@ -191,7 +200,7 @@
 
     @Test
     public void testIconLeaf() {
-        attributes.setIconLeaf(IMAGE_URL);
+        treeAttributes.set(iconLeaf, IMAGE_URL);
 
         for (int i = 0; i < 3; i++) {
             ExtendedLocator<JQueryLocator> icons = tree.getAnyNode().getIcon();
@@ -215,8 +224,8 @@
 
     @Test
     public void testLimitRender() {
-        attributes.setRender("@this renderChecker");
-        attributes.setLimitRender(true);
+        treeAttributes.set(render, "@this renderChecker");
+        treeAttributes.set(limitRender, true);
         retrieveRenderChecker.initializeValue();
         String requestTime = retrieveRequestTime.retrieve();
         tree.getNode(1).select();
@@ -251,7 +260,7 @@
 
     @Test
     public void testRender() {
-        attributes.setRender("@this renderChecker");
+        treeAttributes.set(render, "@this renderChecker");
         retrieveRenderChecker.initializeValue();
         tree.getNode(1).select();
         waitGui.waitForChange(retrieveRenderChecker);
@@ -260,7 +269,7 @@
     @Test
     public void testRendered() {
         assertTrue(selenium.isElementPresent(tree) && selenium.isVisible(tree));
-        attributes.setRendered(false);
+        treeAttributes.set(rendered, false);
         assertFalse(selenium.isElementPresent(tree));
     }
 
@@ -270,7 +279,7 @@
         tree.getNode(1).select();
         assertFalse(retrieveStatusChecker.isValueChanged());
 
-        attributes.setStatus("statusChecker");
+        treeAttributes.set(status, "statusChecker");
         retrieveStatusChecker.initializeValue();
         tree.getNode(1).select();
         assertTrue(retrieveStatusChecker.isValueChanged());
@@ -295,12 +304,12 @@
     @Use(field = "eventToFire", value = "eventsToFire")
     public void testToggleNodeEvent() {
         treeNode = tree.getNode(2);
-        attributes.setSelectionType(SwitchType.client);
+        treeAttributes.set(selectionType, SwitchType.client);
         ExtendedLocator<JQueryLocator> target = treeNode.getLabel();
 
         for (Event eventToSetup : eventsToFire) {
             assertTrue(treeNode.isCollapsed());
-            attributes.setToggleNodeEvent(eventToSetup.getEventName());
+            treeAttributes.set(toggleNodeEvent, eventToSetup.getEventName());
 
             fireEvent(target, eventToFire, eventToSetup);
 
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeToggling.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeToggling.java	2011-09-23 13:30:37 UTC (rev 22752)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TestTreeToggling.java	2011-09-23 13:31:18 UTC (rev 22753)
@@ -25,6 +25,7 @@
 import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertTrue;
+import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.treeAttributes;
 
 import java.net.URL;
 import java.util.Deque;
@@ -46,7 +47,6 @@
     private static final int TOP_LEVEL_NODES = 4;
 
     protected int[][] paths = new int[][] {{3, 2, 1 }, {2, 4, 1 }};
-    protected TreeAttributes treeAttributes = new TreeAttributes(jq("span[id*=attributes]"));
     
     @Inject
     @Use(enumeration = true)
@@ -62,7 +62,7 @@
 
     @BeforeMethod
     public void verifyInitialState() {
-        treeAttributes.setToggleType(toggleType);
+        treeAttributes.set(TreeAttributes.toggleType, toggleType);
         tree.setToggleType(toggleType);
         assertEquals(tree.getCollapsedNodesCount(), TOP_LEVEL_NODES);
         assertEquals(tree.getExpandedNodesCount(), 0);
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TreeAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TreeAttributes.java	2011-09-23 13:30:37 UTC (rev 22752)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TreeAttributes.java	2011-09-23 13:31:18 UTC (rev 22753)
@@ -21,86 +21,30 @@
  *******************************************************************************/
 package org.richfaces.tests.metamer.ftest.richTree;
 
-import org.jboss.test.selenium.locator.ExtendedLocator;
-import org.jboss.test.selenium.locator.JQueryLocator;
-import org.richfaces.component.SwitchType;
-import org.richfaces.tests.metamer.ftest.AbstractComponentAttributes;
+import org.richfaces.tests.metamer.ftest.attributes.AttributeEnum;
 
 /**
  * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
  * @version $Revision$
  */
-public class TreeAttributes extends AbstractComponentAttributes {
-
-    public TreeAttributes() {
-        super();
-    }
-
-    public <T extends ExtendedLocator<JQueryLocator>> TreeAttributes(T root) {
-        super(root);
-    }
-
-    public void setData(String data) {
-        setProperty("data", data);
-    }
-
-    public void setExecute(String execute) {
-        setProperty("execute", execute);
-    }
-
-    public void setIconCollapsed(String iconCollapsed) {
-        setProperty("iconCollapsed", iconCollapsed);
-    }
-
-    public void setIconExpanded(String iconExpanded) {
-        setProperty("iconExpanded", iconExpanded);
-    }
-
-    public void setIconLeaf(String iconLeaf) {
-        setProperty("iconLeaf", iconLeaf);
-    }
-
-    public void setImmediate(Boolean immediate) {
-        setProperty("immediate", immediate);
-    }
-
-    public void setKeepSaved(Boolean keepSaved) {
-        setProperty("keepSaved", keepSaved);
-    }
-
-    public void setLang(String lang) {
-        setProperty("lang", lang);
-    }
-
-    public void setLimitRender(Boolean limitRender) {
-        setProperty("limitRender", limitRender);
-    }
-
-    public void setRender(String render) {
-        setProperty("render", render);
-    }
-
-    public void setRendered(Boolean rendered) {
-        setProperty("rendered", rendered);
-    }
-
-    public void setSelectionType(SwitchType selectionType) {
-        setProperty("selectionType", selectionType);
-    }
-
-    public void setStatus(String status) {
-        setProperty("status", status);
-    }
-
-    public void setTitle(String title) {
-        setProperty("title", title);
-    }
-
-    public void setToggleNodeEvent(String toggleNodeEvent) {
-        setProperty("toggleNodeEvent", toggleNodeEvent);
-    }
-
-    public void setToggleType(SwitchType toggleType) {
-        setProperty("toggleType", toggleType);
-    }
+public enum TreeAttributes implements AttributeEnum {
+    
+    data,
+    execute,
+    iconCollapsed,
+    iconExpanded,
+    iconLeaf,
+    immediate,
+    keepSaved,
+    lang,
+    limitRender,
+    oncomplete,
+    render,
+    rendered,
+    selectionType,
+    status,
+    title,
+    toggleNodeEvent,
+    toggleType,
+    
 }
Deleted: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TreeModelRecursiveAdaptorAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TreeModelRecursiveAdaptorAttributes.java	2011-09-23 13:30:37 UTC (rev 22752)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTree/TreeModelRecursiveAdaptorAttributes.java	2011-09-23 13:31:18 UTC (rev 22753)
@@ -1,34 +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.richTree;
-
-import org.richfaces.tests.metamer.ftest.AbstractComponentAttributes;
-
-/**
- * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
- * @version $Revision$
- */
-public class TreeModelRecursiveAdaptorAttributes extends AbstractComponentAttributes {
-    public void setRendered(Boolean rendered) {
-        setProperty("rendered", rendered);
-    }
-}
Modified: 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/TestTreeModelAdaptorLazyLoading.java	2011-09-23 13:30:37 UTC (rev 22752)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorLazyLoading.java	2011-09-23 13:31:18 UTC (rev 22753)
@@ -21,7 +21,6 @@
  *******************************************************************************/
 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;
 
@@ -38,7 +37,6 @@
 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;
@@ -49,7 +47,6 @@
  */
 public class TestTreeModelAdaptorLazyLoading 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;
     
Modified: 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/TestTreeModelAdaptorSelection.java	2011-09-23 13:30:37 UTC (rev 22752)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSelection.java	2011-09-23 13:31:18 UTC (rev 22753)
@@ -22,7 +22,6 @@
 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;
@@ -35,8 +34,6 @@
 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;
 
@@ -65,11 +62,6 @@
         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) {
Modified: 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/TestTreeModelAdaptorSimple.java	2011-09-23 13:30:37 UTC (rev 22752)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorSimple.java	2011-09-23 13:31:18 UTC (rev 22753)
@@ -21,7 +21,6 @@
  *******************************************************************************/
 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;
@@ -33,7 +32,8 @@
 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.attributes.AttributeEnum;
+import org.richfaces.tests.metamer.ftest.attributes.Attributes;
 import org.richfaces.tests.metamer.ftest.richTree.TreeModel;
 import org.richfaces.tests.metamer.ftest.richTree.TreeNodeModel;
 import org.testng.annotations.Test;
@@ -44,14 +44,13 @@
  */
 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;
     
-    private ModelAdaptorAttributes modelAdaptorAttributes = new ModelAdaptorAttributes(
+    private Attributes<ModelAdaptorAttributes> modelAdaptorAttributes = new Attributes<ModelAdaptorAttributes>(
         pjq("span[id$=:listAttributes:panel]"));
-    private RecursiveModelAdaptorAttributes recursiveModelAdaptorAttributes = new RecursiveModelAdaptorAttributes(
-        pjq("span[id$=:recursiveAttributes:panel]"));
+    private Attributes<RecursiveModelAdaptorAttributes> recursiveModelAdaptorAttributes = 
+        new Attributes<RecursiveModelAdaptorAttributes>(pjq("span[id$=:recursiveAttributes:panel]"));
 
 
     @Override
@@ -67,7 +66,7 @@
 
         assertTrue(treeNode.isLeaf());
 
-        modelAdaptorAttributes.setRendered(false);
+        modelAdaptorAttributes.set(ModelAdaptorAttributes.rendered, false);
 
         assertFalse(treeNode.isLeaf());
     }
@@ -85,7 +84,7 @@
         }
         assertTrue(subnodePresent, "there should be at least one subnode (not leaf) in expanded branch");
 
-        recursiveModelAdaptorAttributes.setRendered(false);
+        recursiveModelAdaptorAttributes.set(RecursiveModelAdaptorAttributes.rendered, false);
 
         for (TreeNodeModel treeNode : tree.getNode(2).getNode(2).getNodes()) {
             if (!treeNode.isLeaf()) {
@@ -94,25 +93,12 @@
         }
     }
     
-    private class ModelAdaptorAttributes extends AbstractComponentAttributes {
-
-        public <T extends ExtendedLocator<JQueryLocator>> ModelAdaptorAttributes(T root) {
-            super(root);
-        }
-
-        public void setRendered(Boolean rendered) {
-            setProperty("rendered", rendered);
-        }
+    private enum ModelAdaptorAttributes implements AttributeEnum {
+        rendered,
     }
 
-    private class RecursiveModelAdaptorAttributes extends AbstractComponentAttributes {
-
-        public <T extends ExtendedLocator<JQueryLocator>> RecursiveModelAdaptorAttributes(T root) {
-            super(root);
-        }
-
-        public void setRendered(Boolean rendered) {
-            setProperty("rendered", rendered);
-        }
+    private enum RecursiveModelAdaptorAttributes implements AttributeEnum {
+        rendered,
     }
+
 }
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorToggling.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorToggling.java	2011-09-23 13:30:37 UTC (rev 22752)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeModelAdaptor/TestTreeModelAdaptorToggling.java	2011-09-23 13:31:18 UTC (rev 22753)
@@ -22,7 +22,6 @@
 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;
@@ -30,7 +29,6 @@
 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;
@@ -51,7 +49,6 @@
 
     @BeforeClass
     public void setupTreeModelTesting() {
-        treeAttributes = new TreeAttributes(jq("span[id*=treeAttributes]"));
         paths = new int[][] { { 3, 2, 1, 2 }, { 2, 4, 6 } };
     }
 
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java	2011-09-23 13:30:37 UTC (rev 22752)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TestTreeNodeSimple.java	2011-09-23 13:31:18 UTC (rev 22753)
@@ -36,6 +36,7 @@
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertTrue;
+import static org.richfaces.tests.metamer.ftest.richTreeNode.TreeNodeAttributes.*;
 
 import java.net.URL;
 
@@ -51,6 +52,7 @@
 import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
 import org.richfaces.tests.metamer.ftest.annotations.Inject;
 import org.richfaces.tests.metamer.ftest.annotations.Use;
+import org.richfaces.tests.metamer.ftest.attributes.Attributes;
 import org.richfaces.tests.metamer.ftest.richTree.TreeAttributes;
 import org.richfaces.tests.metamer.ftest.richTree.TreeModel;
 import org.richfaces.tests.metamer.ftest.richTree.TreeNodeModel;
@@ -67,9 +69,9 @@
     private static final String JQ_SAMPLE_CLASS = "[sample-class]";
     private static final String IMAGE_URL = "/resources/images/loading.gif";
 
-    TreeAttributes attributesTree = new TreeAttributes(jq("span[id$=attributes:panel]"));
-    TreeNodeAttributes attributes = new TreeNodeAttributes(jq("span[id$=treeNode1Attributes:panel]"));
-    TreeNodeAttributes attributesLeaf = new TreeNodeAttributes(jq("span[id$=treeNode3Attributes:panel]"));
+    Attributes<TreeAttributes> attributesTree = new Attributes<TreeAttributes>(jq("span[id$=attributes:panel]"));
+    Attributes<TreeNodeAttributes> attributes = new Attributes<TreeNodeAttributes>(jq("span[id$=treeNode1Attributes:panel]"));
+    Attributes<TreeNodeAttributes> attributesLeaf = new Attributes<TreeNodeAttributes>(jq("span[id$=treeNode3Attributes:panel]"));
 
     TreeModel tree = new TreeModel(pjq("div.rf-tr[id$=richTree]"));
     TreeNodeModel treeNode = tree.getNode(1);
@@ -112,7 +114,7 @@
     public void testHandleClass() {
         assertEquals(selenium.getCount(not(tree.getAnyNode().getHandle(), JQ_SAMPLE_CLASS)), 4);
 
-        attributes.setHandleClass(SAMPLE_CLASS);
+        attributes.set(handleClass, SAMPLE_CLASS);
 
         assertEquals(selenium.getCount(append(tree.getAnyNode().getHandle(), JQ_SAMPLE_CLASS)), 0);
         assertEquals(selenium.getCount(not(tree.getAnyNode().getHandle(), JQ_SAMPLE_CLASS)), 4);
@@ -122,7 +124,7 @@
     public void testIconClass() {
         assertEquals(selenium.getCount(not(tree.getAnyNode().getIcon(), JQ_SAMPLE_CLASS)), 4);
 
-        attributes.setIconClass(SAMPLE_CLASS);
+        attributes.set(iconClass, SAMPLE_CLASS);
 
         assertEquals(selenium.getCount(append(tree.getAnyNode().getIcon(), JQ_SAMPLE_CLASS)), 0);
         assertEquals(selenium.getCount(not(tree.getAnyNode().getIcon(), JQ_SAMPLE_CLASS)), 4);
@@ -133,7 +135,7 @@
         assertTrue(selenium.isElementPresent(iconImage));
         assertFalse(selenium.isAttributePresent(imageSrc));
 
-        attributes.setIconCollapsed(IMAGE_URL);
+        attributes.set(iconCollapsed, IMAGE_URL);
 
         assertTrue(selenium.isElementPresent(iconImage));
         assertTrue(selenium.isAttributePresent(imageSrc));
@@ -147,7 +149,7 @@
         assertTrue(selenium.isElementPresent(iconImage));
         assertFalse(selenium.isAttributePresent(imageSrc));
 
-        attributes.setIconExpanded(IMAGE_URL);
+        attributes.set(iconExpanded, IMAGE_URL);
 
         assertTrue(selenium.isElementPresent(iconImage));
         assertFalse(selenium.isAttributePresent(imageSrc));
@@ -172,7 +174,7 @@
         assertTrue(selenium.isElementPresent(leafIcon));
         assertFalse(selenium.isAttributePresent(leafIconImageSrc));
 
-        attributesLeaf.setIconLeaf(IMAGE_URL);
+        attributesLeaf.set(iconLeaf, IMAGE_URL);
 
         assertTrue(selenium.isElementPresent(leafIcon));
         assertTrue(selenium.isAttributePresent(leafIconImageSrc));
@@ -185,14 +187,14 @@
     @Use(field = "toggleType", value = "toggleTypes")
     public void testImmediate() {
         tree.setToggleType(toggleType);
-        attributesTree.setToggleType(toggleType);
+        attributesTree.set(TreeAttributes.toggleType, toggleType);
 
         treeNode.expand();
 
         phaseInfo.assertPhases(PhaseId.ANY_PHASE);
         phaseInfo.assertListener(PhaseId.PROCESS_VALIDATIONS, "tree toggle listener invoked");
 
-        attributes.setImmediate(true);
+        attributes.set(immediate, true);
 
         treeNode.expand();
 
@@ -204,7 +206,7 @@
     public void testLabelClass() {
         assertEquals(selenium.getCount(not(tree.getAnyNode().getLabel(), JQ_SAMPLE_CLASS)), 4);
 
-        attributes.setLabelClass(SAMPLE_CLASS);
+        attributes.set(labelClass, SAMPLE_CLASS);
 
         assertEquals(selenium.getCount(append(tree.getAnyNode().getLabel(), JQ_SAMPLE_CLASS)), 0);
         assertEquals(selenium.getCount(not(tree.getAnyNode().getLabel(), JQ_SAMPLE_CLASS)), 4);
@@ -214,7 +216,7 @@
     public void testLang() {
         assertEquals(selenium.getCount(not(tree.getAnyNode(), "[lang=cs]")), 4);
 
-        attributes.setLang("cs");
+        attributes.set(lang, "cs");
 
         assertEquals(selenium.getCount(append(tree.getAnyNode(), "[lang=cs]")), 0);
         assertEquals(selenium.getCount(not(tree.getAnyNode(), "[lang=cs]")), 4);
@@ -251,7 +253,7 @@
 
         assertTrue(selenium.isElementPresent(leaf));
 
-        attributesLeaf.setRendered(false);
+        attributesLeaf.set(rendered, false);
 
         assertFalse(selenium.isElementPresent(leaf));
         assertTrue(selenium.isElementPresent(subTreeNode));
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TreeNodeAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TreeNodeAttributes.java	2011-09-23 13:30:37 UTC (rev 22752)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTreeNode/TreeNodeAttributes.java	2011-09-23 13:31:18 UTC (rev 22753)
@@ -21,80 +21,28 @@
  *******************************************************************************/
 package org.richfaces.tests.metamer.ftest.richTreeNode;
 
-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.attributes.AttributeEnum;
 
 /**
  * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
  * @version $Revision$
  */
-public class TreeNodeAttributes extends AbstractComponentAttributes {
+public enum TreeNodeAttributes implements AttributeEnum {
 
-    public TreeNodeAttributes() {
-    }
-
-    public <T extends ExtendedLocator<JQueryLocator>> TreeNodeAttributes(T root) {
-        super(root);
-    }
-
-    public void setDir(String dir) {
-        setProperty("dir", dir);
-    }
-
-    public void setHandleClass(String handleClass) {
-        setProperty("handleClass", handleClass);
-    }
-
-    public void setIconClass(String iconClass) {
-        setProperty("iconClass", iconClass);
-    }
-
-    public void setIconCollapsed(String iconCollapsed) {
-        setProperty("iconCollapsed", iconCollapsed);
-    }
-
-    public void setIconExpanded(String iconExpanded) {
-        setProperty("iconExpanded", iconExpanded);
-    }
-
-    public void setIconLeaf(String iconLeaf) {
-        setProperty("iconLeaf", iconLeaf);
-    }
-
-    public void setImmediate(Boolean immediate) {
-        setProperty("immediate", immediate);
-    }
-
-    public void setLabelClass(String labelClass) {
-        setProperty("labelClass", labelClass);
-    }
-
-    public void setLang(String lang) {
-        setProperty("lang", lang);
-    }
-
-    public void setOnbeforetoggle(String onbeforetoggle) {
-        setProperty("onbeforetoggle", onbeforetoggle);
-    }
-
-    public void setOntoggle(String ontoggle) {
-        setProperty("ontoggle", ontoggle);
-    }
-
-    public void setRendered(Boolean rendered) {
-        setProperty("rendered", rendered);
-    }
-
-    public void setStyle(String style) {
-        setProperty("style", style);
-    }
-
-    public void setStyleClass(String styleClass) {
-        setProperty("styleClass", styleClass);
-    }
-
-    public void setTitle(String title) {
-        setProperty("title", title);
-    }
+        dir,
+        handleClass,
+        iconClass,
+        iconCollapsed,
+        iconExpanded,
+        iconLeaf,
+        immediate,
+        labelClass,
+        lang,
+        onbeforetoggle,
+        ontoggle,
+        rendered,
+        style,
+        styleClass,
+        title,
+    
 }
                                
                         
                        
                                
                                14 years, 1 month
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r22752 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richPickList and 1 other directory.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: jjamrich
Date: 2011-09-23 09:30:37 -0400 (Fri, 23 Sep 2011)
New Revision: 22752
Added:
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/PickListAttributes.java
Removed:
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/RichPickListComponentAttribute.java
Modified:
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java
Log:
RFPL-1439: Update pickList compoenent tests to use unified way to setting attributes
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java	2011-09-23 13:30:07 UTC (rev 22751)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java	2011-09-23 13:30:37 UTC (rev 22752)
@@ -28,6 +28,7 @@
 import org.richfaces.tests.metamer.ftest.richPanelMenu.PanelMenuAttributes;
 import org.richfaces.tests.metamer.ftest.richPanelMenuGroup.PanelMenuGroupAttributes;
 import org.richfaces.tests.metamer.ftest.richPanelMenuItem.PanelMenuItemAttributes;
+import org.richfaces.tests.metamer.ftest.richPickList.PickListAttributes;
 import org.richfaces.tests.metamer.ftest.richTooltip.TooltipAttributes;
 
 public class AttributeList {
@@ -59,5 +60,6 @@
     public static Attributes<PanelMenuAttributes> panelMenuAttributes = new Attributes<PanelMenuAttributes>();
     public static Attributes<PanelMenuGroupAttributes> panelMenuGroupAttributes = new Attributes<PanelMenuGroupAttributes>();
     public static Attributes<PanelMenuItemAttributes> panelMenuItemAttributes = new Attributes<PanelMenuItemAttributes>();
+    public static Attributes<PickListAttributes> pickListAttributes = new Attributes<PickListAttributes>();
     
 }
Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/PickListAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/PickListAttributes.java	                        (rev 0)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/PickListAttributes.java	2011-09-23 13:30:37 UTC (rev 22752)
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * 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.richPickList;
+
+import org.richfaces.tests.metamer.ftest.attributes.AttributeEnum;
+
+/**
+ * Rich Pick List component attributes
+ * 
+ * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
+ * 
+ * @version $Revision$
+ */
+public enum PickListAttributes implements AttributeEnum {
+
+        addAllText,
+        addText,
+        columnClasses,
+        columnVar, 
+        defaultLabel,
+        disabled, 
+        disabledClass, 
+        downBottomText,
+        downText, 
+        headerClass, 
+        immediate, 
+        itemClass, 
+        listHeight, 
+        listWidth, 
+        maxListHeight, 
+        minListHeight, 
+        onadditems, 
+        onblur,  
+        onchange,  
+        onclick,  
+        ondblclick, 
+        onfocus,  
+        onkeydown, 
+        onkeypress,  
+        onkeyup,  
+        onlistclick,  
+        onlistdblclick,  
+        onlistkeydown,  
+        onlistkeypress,
+        onlistkeyup,  
+        onlistmousedown, 
+        onlistmousemove,  
+        onlistmouseout,  
+        onlistmouseover,  
+        onlistmouseup,  
+        onmousedown, 
+        onmousemove, 
+        onmouseout,  
+        onmouseover, 
+        onmouseup,  
+        onremoveitems, 
+        onsourceclick,  
+        onsourcedblclick,  
+        onsourcekeydown,  
+        onsourcekeypress, 
+        onsourcekeyup, 
+        onsourcemousedown,  
+        onsourcemousemove,  
+        onsourcemouseout, 
+        onsourcemouseover, 
+        onsourcemouseup,  
+        ontargetclick,  
+        ontargetdblclick,  
+        ontargetkeydown,  
+        ontargetkeypress,  
+        ontargetkeyup,  
+        ontargetmousedown,  
+        ontargetmousemove,  
+        ontargetmouseout,
+        ontargetmouseover,  
+        ontargetmouseup, 
+        orderable, 
+        removeAllText, 
+        removeText, 
+        rendered, 
+        required, 
+        requiredMessage, 
+        selectItemClass, 
+        showButton, 
+        sourceCaption, 
+        style,  
+        styleClass,  
+        targetCaption, 
+        upText, 
+        upTopText, 
+        validator, 
+        validatorMessage, 
+        value, 
+        valueChangeListener,  
+
+}
Deleted: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/RichPickListComponentAttribute.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/RichPickListComponentAttribute.java	2011-09-23 13:30:07 UTC (rev 22751)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/RichPickListComponentAttribute.java	2011-09-23 13:30:37 UTC (rev 22752)
@@ -1,351 +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.richPickList;
-
-import org.richfaces.tests.metamer.ftest.AbstractComponentAttributes;
-
-/**
- * Rich Pick List component attributes bean
- * 
- * @author <a href="mailto:jjamrich@redhat.com">Jan Jamrich</a>
- * 
- * @version $Revision$
- */
-public class RichPickListComponentAttribute extends AbstractComponentAttributes {
-
-    public void setAddAllText(String addAllText) {
-        setProperty("addAllText", addAllText);
-    }
-
-    public void setAddText(String addText) {
-        setProperty("addText", addText);
-    }
-
-    public void setColumnClasses(String columnClasses) {
-        setProperty("columnClasses", columnClasses);
-    }
-
-    public void setColumnVar(String columnVar) {
-        setProperty("columnVar", columnVar);
-    }
-
-    public void setDefaultLabel(String defaultLabel) {
-        setProperty("defaultLabel", defaultLabel);
-    }
-
-    public void setDisabled(Boolean disabled) {
-        setProperty("disabled", disabled);
-    }
-
-    public void setDisabledClass(String disabledClass) {
-        setProperty("disabledClass", disabledClass);
-    }
-
-    public void setDownBottomText(String downBottomText) {
-        setProperty("downBottomText", downBottomText);
-    }
-
-    public void setDownText(String downText) {
-        setProperty("downText", downText);
-    }
-
-    public void setHeaderClass(String headerClass) {
-        setProperty("headerClass", headerClass);
-    }
-
-    public void setImmediate(Boolean immediate) {
-        setProperty("immediate", immediate);
-    }
-
-    public void setItemClass(String itemClass) {
-        setProperty("itemClass", itemClass);
-    }
-
-    public void setListHeight(String listHeight) {
-        setProperty("listHeight", listHeight);
-    }
-
-    public void setListWidth(String listWidth) {
-        setProperty("listWidth", listWidth);
-    }
-
-    public void setMaxListHeight(String maxListHeight) {
-        setProperty("maxListHeight", maxListHeight);
-    }
-
-    public void setMinListHeight(String minListHeight) {
-        setProperty("minListHeight", minListHeight);
-    }
-
-    public void setOnadditems(String onadditems) {
-        setProperty("onadditems", onadditems);
-    }
-
-    public void setOnblur(String onblur) {
-        setProperty("onblur", onblur);
-    }
-
-    public void setOnchange(String onchange) {
-        setProperty("onchange", onchange);
-    }
-
-    public void setOnclick(String onclick) {
-        setProperty("onclick", onclick);
-    }
-
-    public void setOndblclick(String ondblclick) {
-        setProperty("ondblclick", ondblclick);
-    }
-
-    public void setOnfocus(String onfocus) {
-        setProperty("onfocus", onfocus);
-    }
-
-    public void setOnkeydown(String onkeydown) {
-        setProperty("onkeydown", onkeydown);
-    }
-
-    public void setOnkeypress(String onkeypress) {
-        setProperty("onkeypress", onkeypress);
-    }
-
-    public void setOnkeyup(String onkeyup) {
-        setProperty("onkeyup", onkeyup);
-    }
-
-    public void setOnlistclick(String onlistclick) {
-        setProperty("onlistclick", onlistclick);
-    }
-
-    public void setOnlistdblclick(String onlistdblclick) {
-        setProperty("onlistdblclick", onlistdblclick);
-    }
-
-    public void setOnlistkeydown(String onlistkeydown) {
-        setProperty("onlistkeydown", onlistkeydown);
-    }
-
-    public void setOnlistkeypress(String onlistkeypress) {
-        setProperty("onlistkeypress", onlistkeypress);
-    }
-
-    public void setOnlistkeyup(String onlistkeyup) {
-        setProperty("onlistkeyup", onlistkeyup);
-    }
-
-    public void setOnlistmousedown(String onlistmousedown) {
-        setProperty("onlistmousedown", onlistmousedown);
-    }
-
-    public void setOnlistmousemove(String onlistmousemove) {
-        setProperty("onlistmousemove", onlistmousemove);
-    }
-
-    public void setOnlistmouseout(String onlistmouseout) {
-        setProperty("onlistmouseout", onlistmouseout);
-    }
-
-    public void setOnlistmouseover(String onlistmouseover) {
-        setProperty("onlistmouseover", onlistmouseover);
-    }
-
-    public void setOnlistmouseup(String onlistmouseup) {
-        setProperty("onlistmouseup", onlistmouseup);
-    }
-
-    public void setOnmousedown(String onmousedown) {
-        setProperty("onmousedown", onmousedown);
-    }
-
-    public void setOnmousemove(String onmousemove) {
-        setProperty("onmousemove", onmousemove);
-    }
-
-    public void setOnmouseout(String onmouseout) {
-        setProperty("onmouseout", onmouseout);
-    }
-
-    public void setOnmouseover(String onmouseover) {
-        setProperty("onmouseover", onmouseover);
-    }
-
-    public void setOnmouseup(String onmouseup) {
-        setProperty("onmouseup", onmouseup);
-    }
-
-    public void setOnremoveitems(String onremoveitems) {
-        setProperty("onremoveitems", onremoveitems);
-    }
-
-    public void setOnsourceclick(String onsourceclick) {
-        setProperty("onsourceclick", onsourceclick);
-    }
-
-    public void setOnsourcedblclick(String onsourcedblclick) {
-        setProperty("onsourcedblclick", onsourcedblclick);
-    }
-
-    public void setOnsourcekeydown(String onsourcekeydown) {
-        setProperty("onsourcekeydown", onsourcekeydown);
-    }
-
-    public void setOnsourcekeypress(String onsourcekeypress) {
-        setProperty("onsourcekeypress", onsourcekeypress);
-    }
-
-    public void setOnsourcekeyup(String onsourcekeyup) {
-        setProperty("onsourcekeyup", onsourcekeyup);
-    }
-
-    public void setOnsourcemousedown(String onsourcemousedown) {
-        setProperty("onsourcemousedown", onsourcemousedown);
-    }
-
-    public void setOnsourcemousemove(String onsourcemousemove) {
-        setProperty("onsourcemousemove", onsourcemousemove);
-    }
-
-    public void setOnsourcemouseout(String onsourcemouseout) {
-        setProperty("onsourcemouseout", onsourcemouseout);
-    }
-
-    public void setOnsourcemouseover(String onsourcemouseover) {
-        setProperty("onsourcemouseover", onsourcemouseover);
-    }
-
-    public void setOnsourcemouseup(String onsourcemouseup) {
-        setProperty("onsourcemouseup", onsourcemouseup);
-    }
-
-    public void setOntargetclick(String ontargetclick) {
-        setProperty("ontargetclick", ontargetclick);
-    }
-
-    public void setOntargetdblclick(String ontargetdblclick) {
-        setProperty("ontargetdblclick", ontargetdblclick);
-    }
-
-    public void setOntargetkeydown(String ontargetkeydown) {
-        setProperty("ontargetkeydown", ontargetkeydown);
-    }
-
-    public void setOntargetkeypress(String ontargetkeypress) {
-        setProperty("ontargetkeypress", ontargetkeypress);
-    }
-
-    public void setOntargetkeyup(String ontargetkeyup) {
-        setProperty("ontargetkeyup", ontargetkeyup);
-    }
-
-    public void setOntargetmousedown(String ontargetmousedown) {
-        setProperty("ontargetmousedown", ontargetmousedown);
-    }
-
-    public void setOntargetmousemove(String ontargetmousemove) {
-        setProperty("ontargetmousemove", ontargetmousemove);
-    }
-
-    public void setOntargetmouseout(String ontargetmouseout) {
-        setProperty("ontargetmouseout", ontargetmouseout);
-    }
-
-    public void setOntargetmouseover(String ontargetmouseover) {
-        setProperty("ontargetmouseover", ontargetmouseover);
-    }
-
-    public void setOntargetmouseup(String ontargetmouseup) {
-        setProperty("ontargetmouseup", ontargetmouseup);
-    }
-
-    public void setOrderable(Boolean orderable) {
-        setProperty("orderable", orderable);
-    }
-
-    public void setRemoveAllText(String removeAllText) {
-        setProperty("removeAllText", removeAllText);
-    }
-
-    public void setRemoveText(String removeText) {
-        setProperty("removeText", removeText);
-    }
-
-    public void setRendered(Boolean rendered) {
-        setProperty("rendered", rendered);
-    }
-
-    public void setRequired(Boolean required) {
-        setProperty("required", required);
-    }
-
-    public void setRequiredMessage(String requiredMessage) {
-        setProperty("requiredMessage", requiredMessage);
-    }
-
-    public void setSelectItemClass(String selectItemClass) {
-        setProperty("selectItemClass", selectItemClass);
-    }
-
-    public void setShowButton(String showButton) {
-        setProperty("showButton", showButton);
-    }
-
-    public void setSourceCaption(String sourceCaption) {
-        setProperty("sourceCaption", sourceCaption);
-    }
-
-    public void setStyle(String style) {
-        setProperty("style", style);
-    }
-
-    public void setStyleClass(String styleClass) {
-        setProperty("styleClass", styleClass);
-    }
-
-    public void setTargetCaption(String targetCaption) {
-        setProperty("targetCaption", targetCaption);
-    }
-
-    public void setUpText(String upText) {
-        setProperty("upText", upText);
-    }
-
-    public void setUpTopText(String upTopText) {
-        setProperty("upTopText", upTopText);
-    }
-
-    public void setValidator(String validator) {
-        setProperty("validator", validator);
-    }
-
-    public void setValidatorMessage(String validatorMessage) {
-        setProperty("validatorMessage", validatorMessage);
-    }
-
-    public void setValue(String value) {
-        setProperty("value", value);
-    }
-
-    public void setValueChangeListener(String valueChangeListener) {
-        setProperty("valueChangeListener", valueChangeListener);
-    }
-
-}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java	2011-09-23 13:30:07 UTC (rev 22751)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPickList/TestPickList.java	2011-09-23 13:30:37 UTC (rev 22752)
@@ -26,6 +26,8 @@
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertTrue;
+import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.pickListAttributes;
+import static org.richfaces.tests.metamer.ftest.richPickList.PickListAttributes.*;
 
 import java.net.URL;
 
@@ -47,8 +49,6 @@
  */
 public class TestPickList extends AbstractMetamerTest {
 
-    private RichPickListComponentAttribute attributes = new RichPickListComponentAttribute();
-
     private JQueryLocator phaseListenerFormat = jq("div#phasesPanel li:eq({0})");
 
     private JQueryLocator hSubmit = pjq("input[id$=hButton]");
@@ -145,14 +145,14 @@
     @Test
     public void testAddAllText() {
         String label = "xxx";
-        attributes.setAddAllText(label);
+        pickListAttributes.set(addAllText, label);
         assertTrue(label.equals(selenium.getText(addAllBtn)));
     }
 
     @Test
     public void testAddText() {
         String label = "xxx";
-        attributes.setAddText(label);
+        pickListAttributes.set(addText, label);
         assertTrue(label.equals(selenium.getText(addBtn)));
     }
 
@@ -174,7 +174,7 @@
         waitGui.until(elementPresent.locator(pickListTargetItem.format(0)));
         selenium.click(hSubmit);
 
-        attributes.setDisabled(Boolean.TRUE);
+        pickListAttributes.set(disabled, Boolean.TRUE);
 
         // check if source items are disabled (check second - first item after 0 item added)
         String pickListSourceItemClass = selenium.getAttribute(pickListSrcItem.format(1).getAttribute(classAttr));
@@ -202,8 +202,8 @@
     @Test
     public void testDisabledClass() {
         String disabledClass = "my-cool-disabled-class";
-        attributes.setDisabledClass(disabledClass);
-        attributes.setDisabled(Boolean.TRUE);
+        pickListAttributes.set(PickListAttributes.disabledClass, disabledClass);
+        pickListAttributes.set(disabled, Boolean.TRUE);
 
         String found = selenium.getAttribute(pickListTop.getAttribute(classAttr));
         assertTrue(found != null);
@@ -212,16 +212,16 @@
 
     @Test
     public void testDownBottomText() {
-        attributes.setDownBottomText("xxx");
-        attributes.setOrderable(Boolean.TRUE);
+        pickListAttributes.set(downBottomText, "xxx");
+        pickListAttributes.set(orderable, Boolean.TRUE);
         assertEquals(selenium.getText(pickListOrderingControlsContainer.getDescendant(jq("button:eq(3)"))), "xxx",
             "Button's text did not change.");
     }
 
     @Test
     public void testDownText() {
-        attributes.setDownText("xxx");
-        attributes.setOrderable(Boolean.TRUE);
+        pickListAttributes.set(downText, "xxx");
+        pickListAttributes.set(orderable, Boolean.TRUE);
         assertEquals(selenium.getText(pickListOrderingControlsContainer.getDescendant(jq("button:eq(2)"))), "xxx",
             "Button's text did not change.");
     }
@@ -233,7 +233,7 @@
     public void testHeaderClass() {
         // move to columns layout test
         /*
-         * String headerClass = "my-cool-header-class"; attributes.setHeaderClass(headerClass);
+         * String headerClass = "my-cool-header-class"; pickListAttributes.setHeaderClass(headerClass);
          * 
          * String found = selenium.getAttribute(pickListTop.getAttribute(classAttr)); assertTrue(found != null);
          * assertTrue(found.contains(headerClass));
@@ -242,7 +242,7 @@
 
     @Test
     public void testImmediate() {
-        attributes.setImmediate(Boolean.TRUE);
+        pickListAttributes.set(immediate, Boolean.TRUE);
         addItem("richfaces");
         selenium.click(a4jSubmit);
 
@@ -254,61 +254,61 @@
 
     @Test
     public void testItemClass() {
-        String itemClass = "xxx";
-        attributes.setItemClass(itemClass);
+        String value = "xxx";
+        pickListAttributes.set(itemClass, value);
 
         String classVal = selenium.getAttribute(pickListSrcItemByText.format("richfaces").getAttribute(classAttr));
         assertTrue(classVal != null);
-        assertTrue(classVal.contains(itemClass));
+        assertTrue(classVal.contains(value));
     }
 
     @Test
     public void testListHeight() {
-        String listHeight = "333";
-        attributes.setListHeight(listHeight);
+        String value = "333";
+        pickListAttributes.set(listHeight, value);
 
         String found = selenium.getAttribute(pickListCtrl.getAttribute(styleAttr));
 
         assertTrue(found != null);
-        assertTrue(found.contains(listHeight));
+        assertTrue(found.contains(value));
     }
 
     @Test
     public void testListWidth() {
-        String listWidth = "222";
-        attributes.setListWidth(listWidth);
+        String value = "222";
+        pickListAttributes.set(listWidth, value);
 
         String found = selenium.getAttribute(pickListCtrl.getAttribute(styleAttr));
 
         assertTrue(found != null);
-        assertTrue(found.contains(listWidth));
+        assertTrue(found.contains(value));
     }
 
     @Test
     public void testMaxListHeight() {
-        String maxListHeight = "345";
-        attributes.setMaxListHeight(maxListHeight);
+        String value = "345";
+        pickListAttributes.set(maxListHeight, value);
 
         String found = selenium.getAttribute(pickListCtrl.getAttribute(styleAttr));
 
         assertTrue(found != null);
-        assertTrue(found.contains(maxListHeight));
+        assertTrue(found.contains(value));
     }
 
     @Test
     public void testMinListHeight() {
-        String minListHeight = "234";
-        attributes.setMinListHeight(minListHeight);
+        String value = "234";
+        pickListAttributes.set(minListHeight, value);
 
         String found = selenium.getAttribute(pickListCtrl.getAttribute(styleAttr));
 
         assertTrue(found != null);
-        assertTrue(found.contains(minListHeight));
+        assertTrue(found.contains(value));
     }
 
     @Test
     public void testOnadditems() {
-        attributes.setOnadditems("metamerEvents += \"additems \"");
+        pickListAttributes.set(onadditems, "metamerEvents += \"additems \"");
         addItem("North Carolina");
         waitGui.failWith("Attribute onadditems does not work correctly").until(
             new EventFiredCondition(new Event("additems")));
@@ -383,7 +383,7 @@
 
     @Test
     public void testOnremoveitems() {
-        attributes.setOnremoveitems("metamerEvents += \"removeitems \"");
+        pickListAttributes.set(onremoveitems, "metamerEvents += \"removeitems \"");
         addItem("North Carolina");
         addItem("Hawaii");
         addItem("Arizona");
@@ -527,11 +527,11 @@
     public void testOrderable() {
 
         // firstly check ordering controls doesn't appear near pickList if not "orderable"
-        attributes.setOrderable(Boolean.FALSE);
+        pickListAttributes.set(orderable, Boolean.FALSE);
         assertFalse(selenium.isElementPresent(pickListOrderingControlsContainer));
 
         // then make sure that controls appear near pickList when allow ordering behavior
-        attributes.setOrderable(Boolean.TRUE);
+        pickListAttributes.set(orderable, Boolean.TRUE);
         assertTrue(selenium.isElementPresent(pickListOrderingControlsContainer));
 
         // then add some items to target list
@@ -590,26 +590,26 @@
     @Test
     public void testRemoveAllText() {
         String label = "xxx";
-        attributes.setRemoveAllText(label);
+        pickListAttributes.set(removeAllText, label);
         assertTrue(label.equals(selenium.getText(removeAllBtn)));
     }
 
     @Test
     public void testRemoveText() {
         String label = "xxx";
-        attributes.setRemoveText(label);
+        pickListAttributes.set(removeText, label);
         assertTrue(label.equals(selenium.getText(removeBtn)));
     }
 
     @Test
     public void testRendered() {
-        attributes.setRendered(Boolean.FALSE);
+        pickListAttributes.set(rendered, Boolean.FALSE);
         assertFalse(selenium.isElementPresent(pickListTop));
     }
 
     @Test
     public void testRequired() {
-        attributes.setRequired(Boolean.TRUE);
+        pickListAttributes.set(required, Boolean.TRUE);
         addItem("richfaces");
         selenium.click(a4jSubmit);
 
@@ -624,32 +624,32 @@
 
     @Test
     public void testRequiredMessage() {
-        String requiredMessage = "Test validation message";
-        attributes.setRequiredMessage(requiredMessage);
+        String value = "Test validation message";
+        pickListAttributes.set(requiredMessage, value);
 
-        attributes.setRequired(Boolean.TRUE);
+        pickListAttributes.set(required, Boolean.TRUE);
         selenium.click(a4jSubmit);
 
-        assertEquals(selenium.getText(pickListMsgBox), requiredMessage);
+        assertEquals(selenium.getText(pickListMsgBox), value);
     }
 
     @Test
     public void testSelectItemClass() {
-        String selectItemClass = "my-select-item-class";
-        attributes.setSelectItemClass(selectItemClass);
+        String value = "my-select-item-class";
+        pickListAttributes.set(selectItemClass, value);
 
         selenium.click(pickListSrcItemByText.format("richfaces"));
 
         String classVal = selenium.getAttribute(pickListSrcItemByText.format("richfaces").getAttribute(classAttr));
-        assertTrue(classVal.contains(selectItemClass));
+        assertTrue(classVal.contains(value));
     }
 
     @Test
     public void testSourceCaption() {
-        String sourceCaption = "This is source";
-        attributes.setSourceCaption(sourceCaption);
+        String caption = "This is source";
+        pickListAttributes.set(sourceCaption, caption);
 
-        waitModel.until(textEquals.locator(sourceCaptionLocator).text(sourceCaption));
+        waitModel.until(textEquals.locator(sourceCaptionLocator).text(caption));
     }
 
     @Test
@@ -664,25 +664,25 @@
 
     @Test
     public void testTargetCaption() {
-        String targetCaption = "This is target";
-        attributes.setTargetCaption(targetCaption);
+        String caption = "This is target";
+        pickListAttributes.set(targetCaption, caption);
 
         waitModel.until(elementPresent.locator(targetCaptionLocator));
-        assertTrue(targetCaption.equals(selenium.getText(targetCaptionLocator)));
+        assertTrue(caption.equals(selenium.getText(targetCaptionLocator)));
     }
 
     @Test
     public void testUpText() {
-        attributes.setUpText("xxx");
-        attributes.setOrderable(Boolean.TRUE);
+        pickListAttributes.set(upText, "xxx");
+        pickListAttributes.set(orderable, Boolean.TRUE);
         assertEquals(selenium.getText(pickListOrderingControlsContainer.getDescendant(jq("button:eq(1)"))), "xxx",
             "Button's text did not change.");
     }
 
     @Test
     public void testUpTopText() {
-        attributes.setUpTopText("xxx");
-        attributes.setOrderable(Boolean.TRUE);
+        pickListAttributes.set(upTopText, "xxx");
+        pickListAttributes.set(orderable, Boolean.TRUE);
         assertEquals(selenium.getText(pickListOrderingControlsContainer.getDescendant(jq("button:eq(0)"))), "xxx",
             "Button's text did not change.");
     }
@@ -698,13 +698,13 @@
 
     @Test
     public void testValidatorMessage() {
-        String validationMessage = "We are sorry, but @ is not allowed to join us! Custom validatorMessage.";
-        attributes.setValidatorMessage(validationMessage);
+        String message = "We are sorry, but @ is not allowed to join us! Custom validatorMessage.";
+        pickListAttributes.set(validatorMessage, message);
         addAllItems();
         selenium.click(a4jSubmit);
 
         // verify our own validation message
-        waitModel.until(textEquals.locator(pickListMsgBox).text(validationMessage));
+        waitModel.until(textEquals.locator(pickListMsgBox).text(message));
     }
 
     @Test
                                
                         
                        
                                
                                14 years, 1 month
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        JBoss Rich Faces SVN: r22751 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richPanelMenuItem and 1 other directory.
                                
                                
                                
                                    
                                        by richfaces-svn-commits@lists.jboss.org
                                    
                                
                                
                                        Author: jjamrich
Date: 2011-09-23 09:30:07 -0400 (Fri, 23 Sep 2011)
New Revision: 22751
Modified:
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/PanelMenuItemAttributes.java
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemClientSideHandlers.java
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemDOMEventHandlers.java
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemMode.java
   modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemSimple.java
Log:
RFPL-1439: Update PanelMenuItem tests to use inified way to setting attributes
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java	2011-09-23 13:29:35 UTC (rev 22750)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/attributes/AttributeList.java	2011-09-23 13:30:07 UTC (rev 22751)
@@ -27,6 +27,7 @@
 import org.richfaces.tests.metamer.ftest.richMessage.MessageAttributes;
 import org.richfaces.tests.metamer.ftest.richPanelMenu.PanelMenuAttributes;
 import org.richfaces.tests.metamer.ftest.richPanelMenuGroup.PanelMenuGroupAttributes;
+import org.richfaces.tests.metamer.ftest.richPanelMenuItem.PanelMenuItemAttributes;
 import org.richfaces.tests.metamer.ftest.richTooltip.TooltipAttributes;
 
 public class AttributeList {
@@ -57,5 +58,6 @@
     public static Attributes<MessageAttributes> messageAttributes = new Attributes<MessageAttributes>();
     public static Attributes<PanelMenuAttributes> panelMenuAttributes = new Attributes<PanelMenuAttributes>();
     public static Attributes<PanelMenuGroupAttributes> panelMenuGroupAttributes = new Attributes<PanelMenuGroupAttributes>();
+    public static Attributes<PanelMenuItemAttributes> panelMenuItemAttributes = new Attributes<PanelMenuItemAttributes>();
     
 }
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/PanelMenuItemAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/PanelMenuItemAttributes.java	2011-09-23 13:29:35 UTC (rev 22750)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/PanelMenuItemAttributes.java	2011-09-23 13:30:07 UTC (rev 22751)
@@ -21,95 +21,34 @@
  *******************************************************************************/
 package org.richfaces.tests.metamer.ftest.richPanelMenuItem;
 
-import org.richfaces.PanelMenuMode;
-import org.richfaces.tests.metamer.ftest.AbstractComponentAttributes;
+import org.richfaces.tests.metamer.ftest.attributes.AttributeEnum;
 
 /**
  * @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
  * @version $Revision$
  */
-public class PanelMenuItemAttributes extends AbstractComponentAttributes {
-    public void setBypassUpdates(Boolean bypassUpdates) {
-        setProperty("bypassUpdates", bypassUpdates);
-    }
-
-    public void setData(String data) {
-        setProperty("data", data);
-    }
-
-    public void setDisabled(Boolean disabled) {
-        setProperty("disabled", disabled);
-    }
-
-    public void setDisabledClass(String disabledClass) {
-        setProperty("disabledClass", disabledClass);
-    }
-
-    public void setExecute(String execute) {
-        setProperty("execute", execute);
-    }
-
-    public void setImmediate(Boolean immediate) {
-        setProperty("immediate", immediate);
-    }
-
-    public void setLeftDisabledIcon(String leftDisabledIcon) {
-        setProperty("leftDisabledIcon", leftDisabledIcon);
-    }
-
-    public void setLeftIcon(String leftIcon) {
-        setProperty("leftIcon", leftIcon);
-    }
-
-    public void setLeftIconClass(String leftIconClass) {
-        setProperty("leftIconClass", leftIconClass);
-    }
-
-    public void setLimitRender(Boolean limitRender) {
-        setProperty("limitRender", limitRender);
-    }
-
-    public void setMode(PanelMenuMode mode) {
-        setProperty("mode", mode);
-    }
-
-    public PanelMenuMode getMode() {
-        return PanelMenuMode.valueOf(getProperty("mode"));
-    }
-
-    public void setRender(String render) {
-        setProperty("render", render);
-    }
-
-    public void setRendered(Boolean rendered) {
-        setProperty("rendered", rendered);
-    }
-
-    public void setRightDisabledIcon(String rightDisabledIcon) {
-        setProperty("rightDisabledIcon", rightDisabledIcon);
-    }
-
-    public void setRightIcon(String rightIcon) {
-        setProperty("rightIcon", rightIcon);
-    }
-
-    public void setRightIconClass(String rightIconClass) {
-        setProperty("rightIconClass", rightIconClass);
-    }
-
-    public void setSelectable(Boolean selectable) {
-        setProperty("selectable", selectable);
-    }
-
-    public void setStatus(String status) {
-        setProperty("status", status);
-    }
-
-    public void setStyle(String style) {
-        setProperty("style", style);
-    }
-
-    public void setStyleClass(String styleClass) {
-        setProperty("styleClass", styleClass);
-    }
+public enum PanelMenuItemAttributes implements AttributeEnum {
+    
+    bypassUpdates,
+    data,
+    disabled,
+    disabledClass,
+    execute,
+    immediate,
+    leftDisabledIcon,
+    leftIcon,
+    leftIconClass,
+    limitRender,
+    mode,
+    oncomplete,
+    render,
+    rendered,
+    rightDisabledIcon,
+    rightIcon,
+    rightIconClass,
+    selectable,
+    status,
+    style,
+    styleClass,
+    
 }
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemClientSideHandlers.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemClientSideHandlers.java	2011-09-23 13:29:35 UTC (rev 22750)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemClientSideHandlers.java	2011-09-23 13:30:07 UTC (rev 22751)
@@ -25,6 +25,8 @@
 import static org.richfaces.PanelMenuMode.ajax;
 import static org.richfaces.PanelMenuMode.client;
 import static org.richfaces.PanelMenuMode.server;
+import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.panelMenuItemAttributes;
+import static org.richfaces.tests.metamer.ftest.richPanelMenuItem.PanelMenuItemAttributes.mode;
 
 import java.net.URL;
 
@@ -43,7 +45,6 @@
 @RegressionTest("https://issues.jboss.org/browse/RF-10486")
 public class TestPanelMenuItemClientSideHandlers extends AbstractMetamerTest {
 
-    PanelMenuItemAttributes attributes = new PanelMenuItemAttributes();
     PanelMenu menu = new PanelMenu(pjq("div.rf-pm[id$=panelMenu]"));
     PanelMenu.Item item = menu.getGroup(1).getItem(2);
 
@@ -62,7 +63,7 @@
     @Test
     @Use(field = "event", value = "ajaxEvents")
     public void testClientSideEvent() {
-        attributes.setMode(ajax);
+        panelMenuItemAttributes.set(mode, ajax);
         menu.setItemMode(ajax);
         super.testRequestEventsBefore(event);
         item.select();
@@ -71,7 +72,7 @@
 
     @Test
     public void testClientSideEventsOrderClient() {
-        attributes.setMode(client);
+        panelMenuItemAttributes.set(mode, client);
         menu.setItemMode(client);
         super.testRequestEventsBefore(clientEvents);
         item.select();
@@ -80,7 +81,7 @@
 
     @Test
     public void testClientSideEventsOrderAjax() {
-        attributes.setMode(ajax);
+        panelMenuItemAttributes.set(mode, ajax);
         menu.setItemMode(ajax);
         super.testRequestEventsBefore(ajaxEvents);
         item.select();
@@ -90,7 +91,7 @@
     @Test
     @IssueTracking("https://issues.jboss.org/browse/RF-10844")
     public void testClientSideEventsOrderServer() {
-        attributes.setMode(server);
+        panelMenuItemAttributes.set(mode, server);
         menu.setItemMode(server);
         super.testRequestEventsBefore(serverEvents);
         item.select();
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemDOMEventHandlers.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemDOMEventHandlers.java	2011-09-23 13:29:35 UTC (rev 22750)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemDOMEventHandlers.java	2011-09-23 13:30:07 UTC (rev 22751)
@@ -21,8 +21,16 @@
  *******************************************************************************/
 package org.richfaces.tests.metamer.ftest.richPanelMenuItem;
 
+import static org.jboss.test.selenium.dom.Event.CLICK;
+import static org.jboss.test.selenium.dom.Event.DBLCLICK;
+import static org.jboss.test.selenium.dom.Event.MOUSEDOWN;
+import static org.jboss.test.selenium.dom.Event.MOUSEMOVE;
+import static org.jboss.test.selenium.dom.Event.MOUSEOUT;
+import static org.jboss.test.selenium.dom.Event.MOUSEOVER;
+import static org.jboss.test.selenium.dom.Event.MOUSEUP;
 import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
-import static org.jboss.test.selenium.dom.Event.*;
+import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.panelMenuItemAttributes;
+import static org.richfaces.tests.metamer.ftest.richPanelMenuItem.PanelMenuItemAttributes.mode;
 
 import java.net.URL;
 
@@ -40,7 +48,6 @@
  */
 public class TestPanelMenuItemDOMEventHandlers extends AbstractMetamerTest {
 
-    PanelMenuItemAttributes attributes = new PanelMenuItemAttributes();
     PanelMenu menu = new PanelMenu(pjq("div.rf-pm[id$=panelMenu]"));
     PanelMenu.Item item = menu.getGroup(1).getItem(2);
 
@@ -56,7 +63,7 @@
 
     @Test
     public void testDOMEventHandler() {
-        attributes.setMode(PanelMenuMode.client);
+        panelMenuItemAttributes.set(mode, PanelMenuMode.client);
         super.testFireEvent(event, item);
     }
 }
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemMode.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemMode.java	2011-09-23 13:29:35 UTC (rev 22750)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemMode.java	2011-09-23 13:30:07 UTC (rev 22751)
@@ -28,6 +28,7 @@
 import static javax.faces.event.PhaseId.RESTORE_VIEW;
 import static javax.faces.event.PhaseId.UPDATE_MODEL_VALUES;
 import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
+import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.panelMenuItemAttributes;
 
 import java.net.URL;
 import java.util.LinkedList;
@@ -47,7 +48,6 @@
  */
 public class TestPanelMenuItemMode extends AbstractMetamerTest {
 
-    PanelMenuItemAttributes attributes = new PanelMenuItemAttributes();
     PanelMenu menu = new PanelMenu(pjq("div.rf-pm[id$=panelMenu]"));
     PanelMenu.Item item = menu.getGroup(1).getItem(2);
 
@@ -76,12 +76,12 @@
 
     @Test
     public void testMode() {
-        attributes.setImmediate(immediate);
-        attributes.setBypassUpdates(bypassUpdates);
-        attributes.setMode(mode);
+        panelMenuItemAttributes.set(PanelMenuItemAttributes.immediate, immediate);
+        panelMenuItemAttributes.set(PanelMenuItemAttributes.bypassUpdates, bypassUpdates);
+        panelMenuItemAttributes.set(PanelMenuItemAttributes.mode, mode);
         menu.setItemMode(mode);
 
-        attributes.setExecute("@this executeChecker");
+        panelMenuItemAttributes.set(PanelMenuItemAttributes.execute, "@this executeChecker");
 
         item.select();
 
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemSimple.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemSimple.java	2011-09-23 13:29:35 UTC (rev 22750)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemSimple.java	2011-09-23 13:30:07 UTC (rev 22751)
@@ -5,6 +5,16 @@
 import static org.richfaces.tests.metamer.ftest.BasicAttributes.disabledClass;
 import static org.richfaces.tests.metamer.ftest.BasicAttributes.leftIconClass;
 import static org.richfaces.tests.metamer.ftest.BasicAttributes.rightIconClass;
+import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.panelMenuItemAttributes;
+import static org.richfaces.tests.metamer.ftest.richPanelMenuItem.PanelMenuItemAttributes.data;
+import static org.richfaces.tests.metamer.ftest.richPanelMenuItem.PanelMenuItemAttributes.disabled;
+import static org.richfaces.tests.metamer.ftest.richPanelMenuItem.PanelMenuItemAttributes.limitRender;
+import static org.richfaces.tests.metamer.ftest.richPanelMenuItem.PanelMenuItemAttributes.mode;
+import static org.richfaces.tests.metamer.ftest.richPanelMenuItem.PanelMenuItemAttributes.oncomplete;
+import static org.richfaces.tests.metamer.ftest.richPanelMenuItem.PanelMenuItemAttributes.render;
+import static org.richfaces.tests.metamer.ftest.richPanelMenuItem.PanelMenuItemAttributes.rendered;
+import static org.richfaces.tests.metamer.ftest.richPanelMenuItem.PanelMenuItemAttributes.selectable;
+import static org.richfaces.tests.metamer.ftest.richPanelMenuItem.PanelMenuItemAttributes.status;
 import static org.testng.Assert.assertEquals;
 import static org.testng.Assert.assertFalse;
 import static org.testng.Assert.assertTrue;
@@ -33,7 +43,6 @@
     private static String chevronDown = "chevronDown";
     private static String chevronDownClass = "rf-ico-chevron-down";
 
-    PanelMenuItemAttributes attributes = new PanelMenuItemAttributes();
     PanelMenu menu = new PanelMenu(pjq("div.rf-pm[id$=panelMenu]"));
     PanelMenu.Item item = menu.getGroup(1).getItemContains("Item 1.2");
     PanelMenu.Icon leftIcon = item.getLeftIcon();
@@ -46,14 +55,14 @@
 
     @BeforeMethod
     public void setupMode() {
-        attributes.setMode(PanelMenuMode.ajax);
+        panelMenuItemAttributes.set(mode, PanelMenuMode.ajax);
         menu.setItemMode(PanelMenuMode.ajax);
     }
 
     @Test
     public void testData() {
-        attributes.setData("RichFaces 4");
-        attributes.setOncomplete("data = event.data");
+        panelMenuItemAttributes.set(data, "RichFaces 4");
+        panelMenuItemAttributes.set(oncomplete, "data = event.data");
 
         retrieveRequestTime.initializeValue();
         item.select();
@@ -67,7 +76,7 @@
         menu.setItemMode(null);
         assertFalse(item.isDisabled());
 
-        attributes.setDisabled(true);
+        panelMenuItemAttributes.set(disabled, true);
 
         assertFalse(item.isSelected());
         assertTrue(item.isDisabled());
@@ -84,13 +93,13 @@
 
     @Test
     public void testDisabledClass() {
-        attributes.setDisabled(true);
+        panelMenuItemAttributes.set(disabled, true);
         super.testStyleClass(item, disabledClass);
     }
 
     @Test
     public void testLeftDisabledIcon() {
-        attributes.setDisabled(true);
+        panelMenuItemAttributes.set(disabled, true);
         JQueryLocator input = pjq("select[id$=leftDisabledIcon]");
         ElementLocator<JQueryLocator> icon = leftIcon.getIcon();
         ElementLocator<JQueryLocator> image = jq(leftIcon.getIcon().getRawLocator()).getChild(jq("img"));
@@ -104,7 +113,7 @@
         ElementLocator<JQueryLocator> image = jq(leftIcon.getIcon().getRawLocator()).getChild(jq("img"));
         verifyStandardIcons(input, icon, image, ""); 
 
-        attributes.setDisabled(true);
+        panelMenuItemAttributes.set(disabled, true);
         assertTrue(leftIcon.isTransparent());
     }
 
@@ -115,8 +124,8 @@
 
     @Test
     public void testLimitRender() {
-        attributes.setRender("renderChecker");
-        attributes.setLimitRender(true);
+        panelMenuItemAttributes.set(render, "renderChecker");
+        panelMenuItemAttributes.set(limitRender, true);
 
         retrieveRequestTime.initializeValue();
         retrieveRenderChecker.initializeValue();
@@ -129,14 +138,14 @@
     public void testRendered() {
         assertTrue(item.isVisible());
 
-        attributes.setRendered(false);
+        panelMenuItemAttributes.set(rendered, false);
 
         assertFalse(item.isVisible());
     }
 
     @Test
     public void testRightDisabledIcon() {
-        attributes.setDisabled(true);
+        panelMenuItemAttributes.set(disabled, true);
         JQueryLocator input = pjq("select[id$=rightDisabledIcon]");
         ElementLocator<JQueryLocator> icon = rightIcon.getIcon();
         ElementLocator<JQueryLocator> image = jq(rightIcon.getIcon().getRawLocator()).getChild(jq("img"));
@@ -151,7 +160,7 @@
         ElementLocator<JQueryLocator> image = jq(rightIcon.getIcon().getRawLocator()).getChild(jq("img"));
         verifyStandardIcons(input, icon, image, ""); 
 
-        attributes.setDisabled(true);
+        panelMenuItemAttributes.set(disabled, true);
         assertTrue(rightIcon.isTransparent());
     }
 
@@ -164,7 +173,7 @@
     @Test
     public void testSelectable() {
         menu.setItemMode(null);
-        attributes.setSelectable(false);
+        panelMenuItemAttributes.set(selectable, false);
 
         new GuardRequest(RequestType.NONE) {
             public void command() {
@@ -174,7 +183,7 @@
 
         assertFalse(item.isSelected());
 
-        attributes.setSelectable(true);
+        panelMenuItemAttributes.set(selectable, true);
 
         new GuardRequest(RequestType.XHR) {
             public void command() {
@@ -187,7 +196,7 @@
 
     @Test
     public void testStatus() {
-        attributes.setStatus("statusChecker");
+        panelMenuItemAttributes.set(status, "statusChecker");
 
         retrieveStatusChecker.initializeValue();
         item.select();
                                
                         
                        
                                
                                14 years, 1 month