[richfaces-svn-commits] JBoss Rich Faces SVN: r11956 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Sun Dec 21 10:42:03 EST 2008
Author: andrei_exadel
Date: 2008-12-21 10:42:02 -0500 (Sun, 21 Dec 2008)
New Revision: 11956
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
RF-5238
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-20 23:52:37 UTC (rev 11955)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2008-12-21 15:42:02 UTC (rev 11956)
@@ -68,6 +68,8 @@
static final String IMMEDIATE_TEST_URL = "pages/calendar/testImmediate.xhtml";
static final String EVENTS_TEST_URL = "pages/calendar/testEventsAttributes.xhtml";
+
+ static final String STYLES_AND_CLASSES_TEST_URL = "pages/calendar/styleAndClassesTest.xhtml";
static final String JOINTPOINT_DIRECTION_TEST_URL = "pages/calendar/jointPointAndDirectionAttributesTest.xhtml";
@@ -432,6 +434,23 @@
Assert.fail("Calendar displays invalid date. It should contain ["+expected+"]. But was ["+headerDate+"]");
}
}
+
+ @Test
+ public void testStylesAndClasses(Template template) {
+ renderPage(STYLES_AND_CLASSES_TEST_URL, template, RESET_METHOD);
+ initIds(getParentId());
+
+ showPopup();
+
+ AssertTextEquals(popupButtonId, "Click", "Text for popup button has not been applied");
+ assertStyleAttributeContains(inputDateId, "color: green", "Style for input has bot been applied");
+ assertClassNames(inputDateId, new String [] {"inputClass"}, "Css class for input has not been applied", true);
+
+ assertClassNames(calendarId, new String [] {"rich-calendar-exterior","rich-calendar-popup","styleClass"}, "Css classes for component were rendered incorrectly", true);
+ assertStyleAttributeContains(calendarId, "font-weight: bold", "Style was not applied for component");
+
+ assertClassNames(calendarHeaderId, new String [] { "rich-calendar-header" }, "", true);
+ }
@Test
public void testEventsAttributes(Template template) {
@@ -1275,7 +1294,7 @@
AssertTextEquals(firstWeekDayCellId, weekDayShortName, "It looks as if 'firstWeekDay' attribute doesn't work");
}
- @Test
+ @Test
public void testDisabledAttribute(Template template) {
renderPage(SHOW_ATTRIBURES_TEST_URL, template, INIT_SHOW_ATTRIBUTES_TEST);
initIds(getParentId());
More information about the richfaces-svn-commits
mailing list