Author: ppitonak(a)redhat.com
Date: 2009-09-14 12:27:22 -0400 (Mon, 14 Sep 2009)
New Revision: 15564
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/calendar/CalendarTestCase.java
Log:
* modified waiting condition
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/calendar/CalendarTestCase.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/calendar/CalendarTestCase.java 2009-09-14
16:00:44 UTC (rev 15563)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/calendar/CalendarTestCase.java 2009-09-14
16:27:22 UTC (rev 15564)
@@ -30,6 +30,8 @@
import java.util.Locale;
import org.jboss.richfaces.integrationTest.AbstractSeleniumRichfacesTestCase;
+import org.jboss.test.selenium.waiting.Condition;
+import org.jboss.test.selenium.waiting.Wait;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -240,8 +242,11 @@
String date = selenium.getText(LOC_RANDOM_DAY);
selenium.click(LOC_RANDOM_DAY);
- assertTrue(belongsClass("rich-calendar-select", LOC_RANDOM_DAY),
format("The date {0} should be selected.",
- date));
+ Wait.timeout(15000).failWith(format("The date {0} should be selected.",
date)).until(new Condition() {
+ public boolean isTrue() {
+ return belongsClass("rich-calendar-select", LOC_RANDOM_DAY);
+ }
+ });
String dateTime = selenium.getValue(LOC_DATE_INPUT);
StringBuilder expected = new StringBuilder(date);
Show replies by date