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

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Dec 2 10:07:57 EST 2008


Author: dsvyatobatsko
Date: 2008-12-02 10:07:57 -0500 (Tue, 02 Dec 2008)
New Revision: 11487

Modified:
   trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tree/treeTest.xhtml
   trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java
Log:
https://jira.jboss.org/jira/browse/RF-4836

Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tree/treeTest.xhtml
===================================================================
(Binary files differ)

Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java	2008-12-02 14:26:19 UTC (rev 11486)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TreeTest.java	2008-12-02 15:07:57 UTC (rev 11487)
@@ -27,10 +27,15 @@
     private final static String INIT_DRAG_AND_DROP_TEST = "#{treeBean.initDragAndDropTest}";
     private final static String DRAG_AND_DROP_TEST_URL = "pages/tree/dragAndDropTest.xhtml";
 
+    static final Map<String, String> styles = new HashMap<String, String>();
+
     static {
         params.put("parameter1", "value1");
         params.put("parameter2", "value2");
         params.put("parameter3", "value3");
+
+        styles.put("font-size", "13px");
+        styles.put("font-weight", "bold");
     }
 
     @Test
@@ -503,6 +508,22 @@
         assertChildNodesCount(--aguileraSongs, "//*[@id='"+ compId + ":childs']/div[2]/div", "Song is not dropped back");
     }
 
+    @Test
+    public void testStyleAndClassesAreOutputToClient(Template template) {
+        renderPage(template, TEAR_DOWN_METHOD);
+
+        writeStatus("Check style and classes are output to client");
+        String compId = getParentId() + "_form:tree";
+
+        assertClassNames(compId, new String[] { "noclass" }, "Class attribute was not output to client", true);
+        assertStyleAttributes(compId, styles);
+
+        writeStatus("Check css class of highlighted tree node");
+        String aNodeXpath = "//*[@id='"+ compId + ":childs']/table[1]/tbody/tr/td[3]";
+        selenium.mouseOver(aNodeXpath);
+        assertClassAttributeContains(aNodeXpath, "highlighted-class", "highlightedClass attribute was not output to client");
+    }
+
     @Override
     public void sendAjax() {
         AutoTester tester = getAutoTester(this);




More information about the richfaces-svn-commits mailing list