Author: andrei_exadel
Date: 2009-01-15 14:32:31 -0500 (Thu, 15 Jan 2009)
New Revision: 12301
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dnd/dndTestAjaxSingleWithInternalValidation.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DnDTest.java
Log:
Fix DnD failed methods
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dnd/dndTestAjaxSingleWithInternalValidation.xhtml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dnd/dndTestAjaxSingleWithInternalValidation.xhtml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dnd/dndTestAjaxSingleWithInternalValidation.xhtml 2009-01-15
19:32:31 UTC (rev 12301)
@@ -0,0 +1,33 @@
+<!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.autoTestTemplate}">
+ <ui:define name="component">
+ <h:outputLink id="drag">
+ <h:outputText value="Draggable" />
+ <rich:dragSupport
+ dragType="#{dndBean.frameworks[0].family}"
+ dragValue="#{dndBean.frameworks[0]}">
+
+ <rich:dndParam name="label" value="Draggable" />
+ </rich:dragSupport>
+ </h:outputLink>
+ <rich:panel id="PHP">
+ <rich:dropSupport id="componentId" acceptedTypes="PHP"
dropValue="PHP"
+ dropListener="#{autoTestBean.actionListener}"
+ ajaxSingle="#{autoTestBean.ajaxSingle}"
+ reRender="#{autoTestBean.reRender}"
+ rendered="#{autoTestBean.rendered}"
+ oncomplete="#{autoTestBean.oncomplete}"
+ >
+ <h:inputText value=""
required="true"></h:inputText>
+ </rich:dropSupport>
+ </rich:panel>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2009-01-15
18:38:28 UTC (rev 12300)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2009-01-15
19:32:31 UTC (rev 12301)
@@ -76,6 +76,10 @@
public void renderPage(Template template, String resetMethodName) {
base.renderAutoTestPage(template, resetMethodName);
}
+
+ public void renderPage(String url, Template template, String resetMethodName) {
+ base.renderAutoTestPage(url, template, resetMethodName);
+ }
public void testAllAjaxAttributes() {
testRendered();
@@ -169,9 +173,10 @@
public void testAjaxSingleWithInternalValidationFailed() {
reset();
setupControl(TestSetupEntry.ajaxSingle, Boolean.TRUE);
+ setInternalValidation(true);
clickLoad();
- setInternalValidationFailed();
+ // setInternalValidation(true);
base.sendAjax();
checkActionListener(false);
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-01-15
18:38:28 UTC (rev 12300)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/SeleniumTestBase.java 2009-01-15
19:32:31 UTC (rev 12301)
@@ -323,7 +323,11 @@
* Renders page
*/
protected void renderAutoTestPage(Template template, String resetMethodName) {
- selenium.open(protocol + "://" + host + ":" + port +
"/" + APPLICATION_NAME + filterPrefix + getAutoTestUrl());
+ renderAutoTestPage(null, template, resetMethodName);
+ }
+
+ protected void renderAutoTestPage(String url, Template template, String
resetMethodName) {
+ selenium.open(protocol + "://" + host + ":" + port +
"/" + APPLICATION_NAME + filterPrefix + (url != null ? url :
getAutoTestUrl()));
selenium.waitForPageToLoad(String.valueOf(pageRenderTime));
setParentId(template.getPrefix());
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DnDTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DnDTest.java 2009-01-15
18:38:28 UTC (rev 12300)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DnDTest.java 2009-01-15
19:32:31 UTC (rev 12301)
@@ -37,6 +37,7 @@
public class DnDTest extends SeleniumTestBase {
+ static final String AJAX_SINGLE_WITH_I_FALIDATION_TEST =
"/pages/dnd/dndTestAjaxSingleWithInternalValidation.xhtml";
static final String RESET_METHOD = "#{dndBean.reset}";
static final String FORMID = "_form:";
@@ -105,7 +106,7 @@
@Test
public void testAjaxSingleWithInternalValidationFailed(Template template) {
AutoTester tester = getAutoTester(this);
- tester.renderPage(template, RESET_METHOD);
+ tester.renderPage(AJAX_SINGLE_WITH_I_FALIDATION_TEST, template, RESET_METHOD);
tester.testAjaxSingleWithInternalValidationFailed();
}