Author: vmolotkov
Date: 2008-11-10 05:47:59 -0500 (Mon, 10 Nov 2008)
New Revision: 11065
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceInput/testProcessingInvalidValue.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java
Log:
tests for inplaceinput
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceInput/testProcessingInvalidValue.xhtml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceInput/testProcessingInvalidValue.xhtml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inplaceInput/testProcessingInvalidValue.xhtml 2008-11-10
10:47:59 UTC (rev 11065)
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:rich="http://richfaces.org/rich"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+ template="../../template/caseTemplate.xhtml">
+ <ui:define name="caseName">testValidator</ui:define>
+ <ui:define name="caseBody">
+ <h:form id="_form">
+ <h:panelGroup id="group_tpiv">
+ <table cellpadding="5" >
+ <tr>
+ <td></td>
+ <td>
+ <rich:inplaceInput id="ii_tpiv" value="999">
+ <f:convertNumber integerOnly="true"/>
+ </rich:inplaceInput>
+ <a4j:commandButton id="bn_tpiv" reRender="group_tpiv"
value="Submit"/>
+ </td>
+ <td><span id="text_tpiv"><h:message
for="ii_tpiv"/></span></td>
+ </tr>
+ </table>
+ </h:panelGroup>
+ </h:form>
+ </ui:define>
+</ui:composition>
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java 2008-11-10
10:07:50 UTC (rev 11064)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InplaceInputTest.java 2008-11-10
10:47:59 UTC (rev 11065)
@@ -77,6 +77,10 @@
private static final String VALUE_CHANGE_LISTENER_ID_PREFIX = "_tvcl";
+ private static final String PROCESSING_INVALID_VALUE_PAGE =
"testProcessingInvalidValue.xhtml";
+
+ private static final String PROCESSING_INVALID_VALUE_ID_PREFIX = "_tpiv";
+
private String testUrl;
private String formId;
@@ -454,6 +458,28 @@
assertEvents(iid, events);
}
+ /**
+ * Component displays submitted value after
+ * submission of invalid value
+ *
+ * @param template - current template
+ */
+ @Test
+ public void testProcessingInvalidValue(Template template) {
+ setTestUrl(PROCESSING_INVALID_VALUE_PAGE);
+ init(template);
+
+ String iid = inplaceInputId + PROCESSING_INVALID_VALUE_ID_PREFIX;
+ String newVlaue = "ddd";
+ setValueById(iid + "value", newVlaue);
+ clickById(buttonId + PROCESSING_INVALID_VALUE_ID_PREFIX);
+ waitForAjaxCompletion();
+ String value = getTextById(iid);
+ check(newVlaue.equals(value),
+ CommonUtils.getSuccessfulTestMessage(iid),
+ CommonUtils.getFailedTestMessage(iid));
+ }
+
private void typeAndCheck(String iid, String word, String expectedWord) {
typeWord(iid, word);
checkMessage(iid, expectedWord,