[richfaces-svn-commits] JBoss Rich Faces SVN: r12366 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/dropDownMenu and 1 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Jan 22 05:45:54 EST 2009


Author: andrei_exadel
Date: 2009-01-22 05:45:54 -0500 (Thu, 22 Jan 2009)
New Revision: 12366

Modified:
   trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DropDownMenuTestBean.java
   trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/dropDownMenuAutoTest.xhtml
   trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/dropDownMenuTest.xhtml
   trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DropDownMenuTest.java
Log:
RF-5807, RF-5808

Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DropDownMenuTestBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DropDownMenuTestBean.java	2009-01-22 10:15:36 UTC (rev 12365)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DropDownMenuTestBean.java	2009-01-22 10:45:54 UTC (rev 12366)
@@ -95,6 +95,20 @@
 	public void setImmediate(boolean immediate) {
 		this.immediate = immediate;
 	}
+
+	/**
+	 * @return the input
+	 */
+	public String getInput() {
+		return "Text";
+	}
+
+	/**
+	 * @param input the input to set
+	 */
+	public void setInput(String input) {
+		
+	}
     
     
 

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-22 10:15:36 UTC (rev 12365)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/dropDownMenuAutoTest.xhtml	2009-01-22 10:45:54 UTC (rev 12366)
@@ -14,10 +14,13 @@
 							   >
   			    <rich:menuItem id="new" 
   			    	submitMode="ajax"
-  			    	immediate="#{autoTestBean.immediate}" 
+  			    	immediate="#{autoTestBean.immediate}"
+  			    	ajaxSingle="#{autoTestBean.ajaxSingle}" 
   			    	value="New" 
   			    	action="#{ddmenuBean.doNew}" 
-  			    	actionListener="#{autoTestBean.actionListener}"/>
+  			    	actionListener="#{autoTestBean.actionListener}">
+  			    	<h:inputText id="inputRequired" value="#{ddmenuBean.input}" style="display: none" required="true"></h:inputText>
+  			    </rich:menuItem>
 				<f:param name="parameter1" value="value1" />
 			</rich:dropDownMenu>
 	</ui:define>

Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dropDownMenu/dropDownMenuTest.xhtml
===================================================================
(Binary files differ)

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-22 10:15:36 UTC (rev 12365)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DropDownMenuTest.java	2009-01-22 10:45:54 UTC (rev 12366)
@@ -20,6 +20,7 @@
  */ 
 package org.richfaces.testng;
 
+import org.ajax4jsf.autotest.bean.AutoTestBean;
 import org.ajax4jsf.template.Template;
 import org.richfaces.AutoTester;
 import org.richfaces.SeleniumTestBase;
@@ -66,12 +67,35 @@
     	clickCommandAndWait(submitId);
     	AssertNotPresent(messageId, "Validation message should be displayed for external component in case of dropdown menu immediate=true");
     }
+    
+    @Test
+    public void testAjaxSingle(Template template) {
+    	AutoTester autoTester = getAutoTester(this);
+    	autoTester.renderPage(template, RESET_METHOD);
+    	
+    	autoTester.testAjaxSingle();
+    }
+    
+    @Test
+    public void testAjaxSingleWithExternalValidationFailed(Template template) {
+    	AutoTester autoTester = getAutoTester(this);
+    	autoTester.renderPage(template, RESET_METHOD);
+    	
+    	autoTester.testAjaxSingleWithInternalValidationFailed();
+    }
 
+
     public String getTestUrl() {
         return "pages/dropDownMenu/dropDownMenuTest.xhtml";
     }
     
     @Override
+    public void setInternalValidationFailed() {
+    	String inputId = getAutoTester(this).getClientId("inputRequired");
+    	setValueById(inputId, "");
+    }
+    
+    @Override
     public String getAutoTestUrl() {
     	return "pages/dropDownMenu/dropDownMenuAutoTest.xhtml";
     }




More information about the richfaces-svn-commits mailing list