Author: dsvyatobatsko
Date: 2009-02-27 05:27:25 -0500 (Fri, 27 Feb 2009)
New Revision: 12766
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxForm/ajaxFormAutoTest.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxFormTest.java
Log:
RF-6124, RF-6125, RF-6126, RF-6127
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxForm/ajaxFormAutoTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/ajaxForm/ajaxFormAutoTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxFormTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxFormTest.java 2009-02-27
10:23:36 UTC (rev 12765)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxFormTest.java 2009-02-27
10:27:25 UTC (rev 12766)
@@ -17,18 +17,17 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
+ */
package org.richfaces.testng;
import org.ajax4jsf.template.Template;
+import org.richfaces.AutoTester;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
import org.testng.annotations.Test;
public class AjaxFormTest extends SeleniumTestBase {
- private final static String TEST_URL =
"pages/ajaxForm/ajaxFormTest.xhtml";
-
private final static String FORM_ID = "a4j_form";
private static final String STANDART_FORM = "staticForm";
@@ -105,6 +104,38 @@
resetTestData();
}
+ @Test
+ public void testRenderedAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test component with rendered = false is not present on the
page");
+ tester.testRendered();
+ }
+
+ @Test
+ public void testReRenderAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test component re-renders another components");
+ tester.testReRender();
+ }
+
+ @Test
+ public void testLimitToListAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test component with limitToList = true skips ajaxRendered areas
update");
+ tester.testLimitToList();
+ }
+
+ @Test
+ public void testBypassUpdatesAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test component with bypassUpdates = true skips update model
values phase");
+ tester.testBypassUpdate();
+ }
+
private String getFullComponentId(String componentId, String index) {
return getParentId() + FORM_ID + index + ":" + componentId + index;
}
@@ -137,7 +168,7 @@
private void clickOnCheckbox(String checkId, String bottonId, String index) {
clickById(getParentId() + checkId + index);
- clickById(getParentId() + bottonId +index);
+ clickById(getParentId() + bottonId + index);
waitForAjaxCompletion();
}
@@ -145,7 +176,18 @@
clickAjaxCommandAndWait(getParentId() + "_form:reset");
}
+ @Override
+ public void sendAjax() {
+ clickAjaxCommandAndWait(getParentId() + AutoTester.COMPONENT_ID +
":submit");
+ }
+
+ @Override
+ public String getAutoTestUrl() {
+ return "pages/ajaxForm/ajaxFormAutoTest.xhtml";
+ }
+
+ @Override
public String getTestUrl() {
- return TEST_URL;
+ return "pages/ajaxForm/ajaxFormTest.xhtml";
}
}
Show replies by date