Author: dsvyatobatsko
Date: 2008-08-13 08:41:21 -0400 (Wed, 13 Aug 2008)
New Revision: 10066
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/pages/contextMenu/contextMenu.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ContextMenuTest.java
Log:
ContextMenuTest fix: due to problems with FF antifast added
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/pages/contextMenu/contextMenu.xhtml
===================================================================
---
trunk/test-applications/seleniumTest/src/main/webapp/pages/contextMenu/contextMenu.xhtml 2008-08-13
12:14:43 UTC (rev 10065)
+++
trunk/test-applications/seleniumTest/src/main/webapp/pages/contextMenu/contextMenu.xhtml 2008-08-13
12:41:21 UTC (rev 10066)
@@ -12,19 +12,19 @@
<h:inputText id="input" value="#{contextMenuBean.value}" >
<rich:contextMenu submitMode="server" id="menu_input"
attached="true" event="onclick" >
<rich:menuItem action="#{contextMenuBean.action}"
- value="One" submitMode="ajax"
+ value="Menu1:One" submitMode="ajax"
actionListener="#{contextMenuBean.actionListener}"
id="menu1_item1"
reRender="input,_value2" >
</rich:menuItem>
<rich:menuSeparator />
<rich:menuItem action="#{contextMenuBean.action}"
- value="Two"
+ value="Menu1:Two"
actionListener="#{contextMenuBean.actionListener}"
id="menu1_item2" >
</rich:menuItem>
<rich:menuItem action="#{contextMenuBean.action}"
- value="Three"
+ value="Menu1:Three"
actionListener="#{contextMenuBean.actionListener}" >
</rich:menuItem>
</rich:contextMenu>
@@ -33,19 +33,19 @@
<h:inputText id="input2" >
<rich:contextMenu submitMode="server" id="menu_input2"
event="onclick" >
<rich:menuItem action="#{contextMenuBean.action}"
- value="One" submitMode="ajax"
+ value="Menu2:One" submitMode="ajax"
actionListener="#{contextMenuBean.actionListener}"
id="menu2_item1"
reRender="input,_value2" >
</rich:menuItem>
<rich:menuSeparator />
<rich:menuItem action="#{contextMenuBean.action}"
- value="Two"
+ value="Menu2:Two"
actionListener="#{contextMenuBean.actionListener}"
id="menu2_item2" >
</rich:menuItem>
<rich:menuItem action="#{contextMenuBean.action}"
- value="Three"
+ value="Menu2:Three"
actionListener="#{contextMenuBean.actionListener}" >
</rich:menuItem>
</rich:contextMenu>
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ContextMenuTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ContextMenuTest.java 2008-08-13
12:14:43 UTC (rev 10065)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ContextMenuTest.java 2008-08-13
12:41:21 UTC (rev 10066)
@@ -46,21 +46,23 @@
writeStatus("Click on first input");
clickById(inputId);
+ antifast(menuId);
Assert.assertTrue(isVisibleById(menuId));
writeStatus("Click on second input");
clickById(input2Id);
+ antifast(menu2Id);
Assert.assertFalse(isVisibleById(menuId));
Assert.assertTrue(isVisibleById(menu2Id));
writeStatus("Click on first input again");
clickById(inputId);
+ antifast(menuId);
Assert.assertTrue(isVisibleById(menuId));
Assert.assertFalse(isVisibleById(menu2Id));
writeStatus("Click on ajax item in first menu");
- clickById(menu1_item_ajax);
- waitForAjaxCompletion();
+ clickAjaxCommandAndWait(menu1_item_ajax);
AssertValueEquals(inputId, "menu1_item1");
AssertTextEquals(outputId, "1");
@@ -71,11 +73,11 @@
writeStatus("Click on second input again");
clickById(input2Id);
+ antifast(menu2Id);
Assert.assertTrue(isVisibleById(menu2Id));
writeStatus("Click on ajax item in first menu");
- clickById(menu2_item_ajax);
- waitForAjaxCompletion();
+ clickAjaxCommandAndWait(menu2_item_ajax);
AssertValueEquals(inputId, "menu2_item1");
AssertTextEquals(outputId, "3");
@@ -89,4 +91,8 @@
return "pages/contextMenu/contextMenu.xhtml";
}
+ private void antifast(String id) {
+ waiteForCondition("document.getElementById('" + id + "')
!= undefined", 500);
+ }
+
}
Show replies by date