Author: dsvyatobatsko
Date: 2008-10-28 12:08:55 -0400 (Tue, 28 Oct 2008)
New Revision: 10951
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JPollTestBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPoll/ajaxPollAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java
Log:
https://jira.jboss.org/jira/browse/RF-4736
https://jira.jboss.org/jira/browse/RF-4737
https://jira.jboss.org/jira/browse/RF-4738
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JPollTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JPollTestBean.java 2008-10-28
15:57:28 UTC (rev 10950)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/A4JPollTestBean.java 2008-10-28
16:08:55 UTC (rev 10951)
@@ -3,56 +3,74 @@
import javax.faces.event.ActionEvent;
public class A4JPollTestBean {
-
- private Integer i = 1;
-
- private static final String POLLING = "Polling";
-
- private boolean enabled = false;
-
- public void start(ActionEvent event) {
- enabled = true;
- }
-
- public void listener(ActionEvent event) {
- i++;
- if (i == 8) {
- enabled = false;
- }
- }
-
- public String getText() {
- return POLLING.substring(0, i);
- }
- /**
- * @return the i
- */
- public Integer getI() {
- return i;
- }
+ private Integer i = 1;
- /**
- * @param i the i to set
- */
- public void setI(Integer i) {
- this.i = i;
- }
+ private static final String POLLING = "Polling";
- /**
- * @return the enabled
- */
- public boolean isEnabled() {
- return enabled;
- }
+ private boolean enabled = false;
- /**
- * @param enabled the enabled to set
- */
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
- }
-
-
+ private String content = "content";
+ /**
+ * Gets value of content field.
+ * @return value of content field
+ */
+ public String getContent() {
+ return content;
+ }
+
+ /**
+ * Set a new value for content field.
+ * @param content a new value for content field
+ */
+ public void setContent(String content) {
+ this.content = content;
+ }
+
+ public void start(ActionEvent event) {
+ enabled = true;
+ }
+
+ public void listener(ActionEvent event) {
+ i++;
+ if (i == 8) {
+ enabled = false;
+ }
+ }
+
+ public String getText() {
+ return POLLING.substring(0, i);
+ }
+
+ /**
+ * @return the i
+ */
+ public Integer getI() {
+ return i;
+ }
+
+ /**
+ * @param i
+ * the i to set
+ */
+ public void setI(Integer i) {
+ this.i = i;
+ }
+
+ /**
+ * @return the enabled
+ */
+ public boolean isEnabled() {
+ return enabled;
+ }
+
+ /**
+ * @param enabled
+ * the enabled to set
+ */
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
+ }
+
}
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxPoll/ajaxPollAutoTest.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java 2008-10-28
15:57:28 UTC (rev 10950)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxPollTest.java 2008-10-28
16:08:55 UTC (rev 10951)
@@ -100,11 +100,33 @@
tester.testExtrenalValidationFailure();
}
+ @Test
+ public void testAjaxSingle(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test ajaxSingle attribute");
+ tester.testAjaxSingle();
+ }
+
+ @Test
+ public void testAjaxSingleWithInternalValidationFailed(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test ajaxSingle attribute in case of invalid children
state");
+ tester.testAjaxSingleWithInternalValidationFailed();
+ }
+
@Override
public void sendAjax() {
delay(2000);
}
+ @Override
+ public void setInternalValidationFailed() {
+ String childCompId = getAutoTester(this).getClientId("") +
"child";
+ setValueById(childCompId, "");
+ }
+
private void enablePoll(String id) {
writeStatus("Enable polling...");
try {