Author: andrei_exadel
Date: 2008-05-22 04:55:29 -0400 (Thu, 22 May 2008)
New Revision: 8682
Removed:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandButtonTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxPollTest.java
Modified:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/A4JPollTestBean.java
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/TestListener.java
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxPoll/ajaxPollTest.xhtml
Log:
restore failed tests
Modified:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/A4JPollTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/A4JPollTestBean.java 2008-05-21
17:38:32 UTC (rev 8681)
+++
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/A4JPollTestBean.java 2008-05-22
08:55:29 UTC (rev 8682)
@@ -8,11 +8,15 @@
private static final String POLLING = "Polling";
- private boolean enabled = true;
+ private boolean enabled = false;
+ public void start(ActionEvent event) {
+ enabled = true;
+ }
+
public void listener(ActionEvent event) {
i++;
- if (i == 7) {
+ if (i == 8) {
enabled = false;
}
}
Modified:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/TestListener.java
===================================================================
---
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/TestListener.java 2008-05-21
17:38:32 UTC (rev 8681)
+++
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/TestListener.java 2008-05-22
08:55:29 UTC (rev 8682)
@@ -22,6 +22,7 @@
UIInput i = (UIInput)component;
String v = (String)i.getValue();
i.setValue(v + "5");
+ i.setSubmittedValue(null);
}
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxPoll/ajaxPollTest.xhtml
===================================================================
---
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxPoll/ajaxPollTest.xhtml 2008-05-21
17:38:32 UTC (rev 8681)
+++
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxPoll/ajaxPollTest.xhtml 2008-05-22
08:55:29 UTC (rev 8682)
@@ -9,9 +9,12 @@
<ui:composition template="#{templateBean.template}">
<ui:define name="component">
<h:form id="_form">
+ <h:selectBooleanCheckbox id="_enabled"
value="#{pollBean.enabled}">
+ <a4j:support event="onchange" ajaxSingle="true"
reRender="_form"></a4j:support>
+ </h:selectBooleanCheckbox>
<a4j:poll interval="700" id="poll"
enabled="#{pollBean.enabled}" actionListener="#{pollBean.listener}"
reRender="_value, _text"></a4j:poll><br/>
<h:inputHidden id="_value" value="#{pollBean.i}"/>
- <h:outputText id="_text" value="#{pollBean.text}" />
+ <h:outputText id="_text" value="#{pollBean.text}"
rendered="#{pollBean.enabled}"/>
</h:form>
</ui:define>
</ui:composition>
Deleted:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandButtonTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandButtonTest.java 2008-05-21
17:38:32 UTC (rev 8681)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandButtonTest.java 2008-05-22
08:55:29 UTC (rev 8682)
@@ -1,94 +0,0 @@
-package org.richfaces;
-
-import org.ajax4jsf.test.base.RichSeleniumTest;
-import org.ajax4jsf.test.base.SeleniumTestBase;
-import org.ajax4jsf.test.base.Templates;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Parameters;
-import org.testng.annotations.Test;
-
-
-public class AjaxCommandButtonTest extends SeleniumTestBase implements RichSeleniumTest
{
-
- public AjaxCommandButtonTest() {
- super("http", "localhost", "8080");
- }
-
- /**
- * This method are invoking before selenium tests started
- */
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
- }
-
- /**
- * This method are invoking after selenium tests completed
- */
- @AfterTest
- public void stopSelenium() {
- super.stopSelenium();
- }
-
- @Test
- public void testAjaxCommandButtonComponent() throws Exception {
- _testAjaxCommandButtonComponent(Templates.SIMPLE);
- _testAjaxCommandButtonComponent(Templates.DATATABLE);
- _testAjaxCommandButtonComponent(Templates.MODALPANEL);
- }
-
- private void _testAjaxCommandButtonComponent(Templates template) {
- renderPage(getTestUrl(), template);
-
- String parentId = getParentId() + "_form:";
-
- String buttonId = parentId + "b1";
- String inputId = parentId + "_value";
-
- writeStatus("Click button 1 : ");
- clickById(buttonId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "12345");
-
- writeStatus("Click button 1 again: ");
- clickById(buttonId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "123452345");
-
- buttonId = parentId + "b2";
-
- writeStatus("Click button 2: ");
- clickById(buttonId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "123452345");
-
- buttonId = parentId + "b3";
-
- writeStatus("Click button 3: ");
- clickById(buttonId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "123452345");
-
- buttonId = parentId + "b4";
-
- writeStatus("Click button 4: ");
- clickById(buttonId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "12345234555");
-
- buttonId = parentId + "b5";
-
- writeStatus("Click button 5: ");
- clickById(buttonId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "12345234555");
-
- }
-
- public String getTestUrl() {
- return "/faces/pages/ajaxCommandButton/ajaxButtonTest.xhtml";
- }
-
-}
Deleted:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java 2008-05-21
17:38:32 UTC (rev 8681)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java 2008-05-22
08:55:29 UTC (rev 8682)
@@ -1,93 +0,0 @@
-package org.richfaces;
-
-import org.ajax4jsf.test.base.RichSeleniumTest;
-import org.ajax4jsf.test.base.SeleniumTestBase;
-import org.ajax4jsf.test.base.Templates;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Parameters;
-import org.testng.annotations.Test;
-
-public class AjaxCommandLinkTest extends SeleniumTestBase implements RichSeleniumTest {
-
- public AjaxCommandLinkTest() {
- super("http", "localhost", "8080");
- }
-
- /**
- * This method are invoking before selenium tests started
- */
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
- }
-
- /**
- * This method are invoking after selenium tests completed
- */
- @AfterTest
- public void stopSelenium() {
- super.stopSelenium();
- }
-
- @Test
- public void testAjaxCommandLinkComponent() throws Exception {
- _testAjaxCommandLinkComponent(Templates.SIMPLE);
- _testAjaxCommandLinkComponent(Templates.DATATABLE);
- _testAjaxCommandLinkComponent(Templates.MODALPANEL);
- }
-
- private void _testAjaxCommandLinkComponent(Templates template) {
- renderPage(getTestUrl(), template);
-
- String parentId = getParentId() + "_form:";
-
- String LinkId = parentId + "l1";
- String inputId = parentId + "_value";
-
- writeStatus("Click link 1 : ");
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "12345");
-
- writeStatus("Click link 1 again: ");
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "123452345");
-
- LinkId = parentId + "l2";
-
- writeStatus("Click link 2 : ");
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "123452345");
-
- LinkId = parentId + "l3";
-
- writeStatus("Click link 3 : ");
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "123452345");
-
- LinkId = parentId + "l4";
-
- writeStatus("Click link 4 : ");
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "12345234555");
-
- LinkId = parentId + "l5";
-
- writeStatus("Click link 5 : ");
- clickById(LinkId);
- waitForAjaxCompletion();
- AssertValueEquals(inputId, "12345234555");
-
- }
-
- public String getTestUrl() {
- return "/faces/pages/ajaxCommandLink/ajaxLinkTest.xhtml";
- }
-
-}
Deleted:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxPollTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxPollTest.java 2008-05-21
17:38:32 UTC (rev 8681)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxPollTest.java 2008-05-22
08:55:29 UTC (rev 8682)
@@ -1,76 +0,0 @@
-/**
- *
- */
-package org.richfaces;
-
-import org.ajax4jsf.test.base.RichSeleniumTest;
-import org.ajax4jsf.test.base.SeleniumTestBase;
-import org.ajax4jsf.test.base.Templates;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
-import org.testng.annotations.Parameters;
-import org.testng.annotations.Test;
-
-/**
- * @author Andrey Markavstov
- *
- */
-public class AjaxPollTest extends SeleniumTestBase implements RichSeleniumTest {
-
- public AjaxPollTest() {
- super("http", "localhost", "8080");
- }
-
- /**
- * This method are invoking before selenium tests started
- */
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
- }
-
- /**
- * This method are invoking after selenium tests completed
- */
- @AfterTest
- public void stopSelenium() {
- super.stopSelenium();
- }
-
- @Test
- public void testAjaxPollComponent() {
- _testAjaxPollComponent(Templates.SIMPLE);
- _testAjaxPollComponent(Templates.DATATABLE);
- _testAjaxPollComponent(Templates.MODALPANEL);
- }
-
- private void _testAjaxPollComponent(Templates template) {
- renderPage(getTestUrl(), template);
- String parentId = getParentId() + "_form:";
- String pollId = parentId + "poll";
- String inputId = parentId + "_value";
-
- writeStatus("Polling in progress...");
- AssertValueEquals(inputId, "1");
- pause(1500, pollId);
- AssertValueNotEquals(inputId, "1");
- waiteForCondition("document.getElementById('"+inputId+"').value
== 7", 7000);
-
- pause(1500, pollId);
- writeStatus("Polling should be stopped...");
- AssertValueEquals(inputId, "7");
- AssertTextEquals(parentId + "_text", "Polling");
-
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.ajax4jsf.test.base.RichSeleniumTest#getTestUrl()
- */
- public String getTestUrl() {
- return "/faces/pages/ajaxPoll/ajaxPollTest.xhtml";
- }
-
-}
Show replies by date