[richfaces-svn-commits] JBoss Rich Faces SVN: r11785 - 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
Mon Dec 15 12:12:33 EST 2008


Author: dsvyatobatsko
Date: 2008-12-15 12:12:32 -0500 (Mon, 15 Dec 2008)
New Revision: 11785

Modified:
   trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/calendar/layoutTests.xhtml
   trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5350

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

Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java	2008-12-15 16:26:35 UTC (rev 11784)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java	2008-12-15 17:12:32 UTC (rev 11785)
@@ -1316,11 +1316,37 @@
         initIds(getParentId());
 
         writeStatus("Check 'inputSize' attribute");
-        String inputSizeCalendarInputId = calendarId + "InputSizeInputDate";
-        String size = selenium.getAttribute(inputSizeCalendarInputId + "@size");
+        check(showPopupId, true);
+
+        String size = selenium.getAttribute(inputDateId + "@size");
         Assert.assertEquals(size, "15", "Input size attribute is not applied");
     }
 
+    @Test
+    public void testCellWidthAndCellHeightAttributes(Template template) {
+        renderPage(LAYOUT_TESTS_URL, template, null);
+        initIds(getParentId());
+
+        int expectedCellWidth = 31;
+        int expectedCellHeight = 33;
+
+        writeStatus("Check 'cellWidth' and 'cellHeight' attributes.");
+
+        writeStatus("Non-popup mode");
+        check(showPopupId, false);
+
+        writeStatus("Check size of arbitrary cell. Width must be 31px, height must be 33px");
+        Assert.assertEquals(selenium.getElementHeight(calendarId + "DayCell5").intValue(), expectedCellHeight);
+        Assert.assertEquals(selenium.getElementWidth(calendarId + "DayCell5").intValue(), expectedCellWidth);
+
+        writeStatus("Check the same for popup mode");
+        check(showPopupId, true);
+        showPopup();
+
+        Assert.assertEquals(selenium.getElementHeight(calendarId + "DayCell5").intValue(), expectedCellHeight);
+        Assert.assertEquals(selenium.getElementWidth(calendarId + "DayCell5").intValue(), expectedCellWidth);
+    }
+
     private void setPopup(boolean isPopup) {
         runScript("$('" + isPopupId + "').checked=" + isPopup);
     }




More information about the richfaces-svn-commits mailing list