Author: andrei_exadel
Date: 2009-01-22 05:15:36 -0500 (Thu, 22 Jan 2009)
New Revision: 12365
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/testImmediateWithExternalValidation.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/dropDownMenuAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DropDownMenuTest.java
Log:
RF-5805
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/dropDownMenuAutoTest.xhtml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/dropDownMenuAutoTest.xhtml 2009-01-21
19:39:59 UTC (rev 12364)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/dropDownMenuAutoTest.xhtml 2009-01-22
10:15:36 UTC (rev 12365)
@@ -9,16 +9,15 @@
<ui:composition template="#{templateBean.autoTestTemplate}">
<ui:define name="component">
<rich:dropDownMenu id="componentId"
- actionListener="#{autoTestBean.actionListener}"
- immediate="#{autoTestBean.immediate}"
- ajaxSingle="#{autoTestBean.ajaxSingle}"
- reRender="#{autoTestBean.reRender}"
- limitToList="#{autoTestBean.limitToList}"
- bypassUpdates="#{autoTestBean.bypassUpdate}"
rendered="#{autoTestBean.rendered}"
- oncomplete="#{autoTestBean.oncomplete}"
+ value="test"
- <rich:menuItem id="new"
submitMode="ajax" value="New" action="#{ddmenuBean.doNew}"
actionListener="#{autoTestBean.actionListener}"/>
+ <rich:menuItem id="new"
+ submitMode="ajax"
+ immediate="#{autoTestBean.immediate}"
+ value="New"
+ action="#{ddmenuBean.doNew}"
+ actionListener="#{autoTestBean.actionListener}"/>
<f:param name="parameter1" value="value1" />
</rich:dropDownMenu>
</ui:define>
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/testImmediateWithExternalValidation.xhtml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/testImmediateWithExternalValidation.xhtml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/testImmediateWithExternalValidation.xhtml 2009-01-22
10:15:36 UTC (rev 12365)
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition template="#{templateBean.template}">
+ <ui:define name="component">
+ <h:form id="form">
+ <h:message id="ii_m" for="ii"></h:message>
+ <h:inputText id="ii" value=""
required="true"></h:inputText>
+ <rich:dropDownMenu id="componentId"
+ value="test">
+ <rich:menuItem id="new"
+ immediate="#{ddmenuBean.immediate}"
+ submitMode="server"
+ value="New">
+ <h:inputText value="" required="true"
style="display: none;"></h:inputText>
+ </rich:menuItem>
+ </rich:dropDownMenu>
+ <br/>
+ <h:commandButton value="submit"></h:commandButton>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DropDownMenuTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DropDownMenuTest.java 2009-01-21
19:39:59 UTC (rev 12364)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DropDownMenuTest.java 2009-01-22
10:15:36 UTC (rev 12365)
@@ -30,6 +30,8 @@
static final String RESET_METHOD = "#{ddmenuBean.reset}";
static final String INIT_IMMEDIATE_METHOD =
"#{ddmenuBean.initImmediateTest}";
+
+ static final String IMMEDIATE_WITH_EXTERNAL_VALIDATION_URL =
"/pages/dropDownMenu/testImmediateWithExternalValidation.xhtml";
@Test
public void testDropDownMenuComponent(Template template) {
@@ -52,6 +54,18 @@
testDropDownComponent();
}
+
+ @Test
+ public void testImmediateWithExternalValidation(Template template) {
+ renderPage(IMMEDIATE_WITH_EXTERNAL_VALIDATION_URL, template,
INIT_IMMEDIATE_METHOD);
+
+ String parentId = getParentId() + "form:";
+ String messageId = parentId + "ii_m";
+ String submitId = parentId + "new";
+
+ clickCommandAndWait(submitId);
+ AssertNotPresent(messageId, "Validation message should be displayed for
external component in case of dropdown menu immediate=true");
+ }
public String getTestUrl() {
return "pages/dropDownMenu/dropDownMenuTest.xhtml";