Author: amarkhel
Date: 2010-02-22 08:17:31 -0500 (Mon, 22 Feb 2010)
New Revision: 16483
Modified:
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
Log:
Fix broken tests on Hudson
Modified:
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
---
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2010-02-22
07:40:39 UTC (rev 16482)
+++
branches/community/3.3.X/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2010-02-22
13:17:31 UTC (rev 16483)
@@ -348,27 +348,26 @@
}
void _testModelDataAppliedToClient(Calendar c) {
- String currentDate = selenium.getText(dateSelectionXpath);
-
selenium.click("//table[@id='"+calendarId+"']/tbody/tr/td[text() =
'13']");
-
- if (!selenium.getText(dateSelectionXpath).equals(currentDate)) {
- Assert.fail("Enabled attribute of data model was not applied for client
data. 13th day should disabled and should force date change after click.");
- }
-
- int currentMonth = c.get(Calendar.MONTH);
-
- String cellDay7StyleClass =
selenium.getAttribute("//table[@id='"+calendarId+"']/tbody/tr/td[text()
= '7']/@class");
- String cellDay7ModelClass = "styleClass"+currentMonth+"7";
- if (cellDay7StyleClass == null || cellDay7StyleClass.indexOf(cellDay7ModelClass)
== -1) {
- Assert.fail("Style class was not applied from data model to cell days.
Style class for 7th day should contain [" + cellDay7ModelClass + "]. But has
only + [" + cellDay7StyleClass +"]");
- }
-
- String cellDay5StyleClass =
selenium.getAttribute("//table[@id='"+calendarId+"']/tbody/tr/td[text()
= '5']/@class");
- String cellDay5ModelClass = "styleClass"+currentMonth+"5";
- if (cellDay5StyleClass == null || cellDay5StyleClass.indexOf(cellDay5ModelClass)
== -1) {
- Assert.fail("Style class was not applied from data model to cell days.
Style class for 5th day should contain [" + cellDay5ModelClass + "]. But has
only + [" + cellDay5StyleClass +"]");
- }
- }
+ String currentDate = selenium.getText(dateSelectionXpath);
+
selenium.click("//table[@id='"+calendarId+"']/tbody/tr/td[text() =
'13']");
+
+ if (!selenium.getText(dateSelectionXpath).equals(currentDate)) {
+ Assert.fail("Enabled attribute of data model was not applied for client
data. 13th day should disabled and should force date change after click.");
+ }
+
+ int currentMonth = c.get(Calendar.MONTH);
+
+ String cellDay8StyleClass =
selenium.getAttribute("//table[@id='"+calendarId+"']/tbody/tr/td[text()
= '8']/@class");
+ String cellDay8ModelClass = "styleClass"+currentMonth+"8";
+ if (cellDay8StyleClass == null || cellDay8StyleClass.indexOf(cellDay8ModelClass)
== -1) {
+ Assert.fail("Style class was not applied from data model to cell days.
Style class for 8th day should contain [" + cellDay8ModelClass + "]. But has
only + [" + cellDay8StyleClass +"]");
+ }
+ String cellDay5StyleClass =
selenium.getAttribute("//table[@id='"+calendarId+"']/tbody/tr/td[text()
= '5']/@class");
+ String cellDay5ModelClass = "styleClass"+currentMonth+"5";
+ if (cellDay5StyleClass == null || cellDay5StyleClass.indexOf(cellDay5ModelClass)
== -1) {
+ Assert.fail("Style class was not applied from data model to cell days.
Style class for 5th day should contain [" + cellDay5ModelClass + "]. But has
only + [" + cellDay5StyleClass +"]");
+ }
+ }
void testInternatialization(String prefix) {
String label = selenium.getText(todayControlXpath);
Show replies by date