Author: ppitonak(a)redhat.com
Date: 2009-09-14 11:26:58 -0400 (Mon, 14 Sep 2009)
New Revision: 15561
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/contextMenu/ContextMenuTableTestCase.java
Log:
* fixed a waiting condition
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/contextMenu/ContextMenuTableTestCase.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/contextMenu/ContextMenuTableTestCase.java 2009-09-14
15:07:45 UTC (rev 15560)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/contextMenu/ContextMenuTableTestCase.java 2009-09-14
15:26:58 UTC (rev 15561)
@@ -28,6 +28,8 @@
import static org.testng.Assert.fail;
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;
@@ -172,14 +174,16 @@
assertTrue(isDisplayed(LOC_SECOND_CONTEXT_MENU),
"Context menu should be visible after clicking on first
column.");
- // click 'Actions'
- selenium.click(LOC_SECOND_ACTIONS);
- waitFor(400);
-
// click "Put <car> To Basket", "Read Comments" or
// "Go to <producer> site"
selenium.click(format(LOC_SECOND_ACTION_PREFORMATTED, index));
- waitFor(400);
+
+ Wait.timeout(15000).failWith("Action was not performed.").until(new
Condition() {
+ public boolean isTrue() {
+ return
!selenium.getText(LOC_SECOND_LAST_MENU_ACTION).equals("");
+ }
+ });
+
String text = selenium.getText(LOC_SECOND_LAST_MENU_ACTION);
switch (index) {
Show replies by date