Author: dsvyatobatsko
Date: 2008-04-14 13:21:46 -0400 (Mon, 14 Apr 2008)
New Revision: 7825
Added:
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandLink/
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandLink/ajaxLinkDescription.xhtml
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandLink/ajaxLinkTest.xhtml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandButtonTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java
Removed:
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommands/
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandsTest.java
Log:
test for ajax command link
Added:
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandLink/ajaxLinkDescription.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandLink/ajaxLinkDescription.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandLink/ajaxLinkTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommandLink/ajaxLinkTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Copied:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandButtonTest.java
(from rev 7804,
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandsTest.java)
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandButtonTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandButtonTest.java 2008-04-14
17:21:46 UTC (rev 7825)
@@ -0,0 +1,70 @@
+package org.richfaces;
+
+import org.ajax4jsf.test.base.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+public class AjaxCommandButtonTest extends SeleniumTestBase {
+
+ public AjaxCommandButtonTest() {
+ super("http", "localhost", "8080");
+ }
+
+ @Test
+ public void testAjaxCommandButtonComponent() throws Exception {
+ renderPage("/faces/pages/ajaxCommandButton/ajaxButtonTest.xhtml");
+
+ _testAjaxCommandButtonComponent(COMPONENT_PREFIX_INSIDE_TABLE);
+ _testAjaxCommandButtonComponent(COMPONENT_PREFIX_INSIDE_PANEL);
+ }
+
+ private void _testAjaxCommandButtonComponent(String parentId) {
+ // test inside DataTable
+ String buttonId = parentId + "b1";
+ String inputId = parentId + "_value";
+
+ clickById(buttonId);
+ waitForAjaxCompletion(3000);
+ AssertValueEquals(inputId, "3");
+
+ clickById(buttonId);
+ waitForAjaxCompletion(1000);
+ AssertValueEquals(inputId, "6");
+
+ buttonId = parentId + "b2";
+
+ clickById(buttonId);
+ waitForAjaxCompletion(1000);
+ AssertValueEquals(inputId, "6");
+
+ buttonId = parentId + "b3";
+
+ clickById(buttonId);
+ waitForAjaxCompletion(1000);
+ AssertValueEquals(inputId, "6");
+
+ buttonId = parentId + "b4";
+
+ clickById(buttonId);
+ waitForAjaxCompletion(1000);
+ AssertValueEquals(inputId, "1");
+
+ buttonId = parentId + "b5";
+
+ clickById(buttonId);
+ waitForAjaxCompletion(1000);
+ AssertValueEquals(inputId, "2");
+
+ buttonId = parentId + "b1";
+
+ clickById(buttonId);
+ waitForAjaxCompletion(1000);
+ AssertValueEquals(inputId, "5");
+
+ buttonId = parentId + "b3";
+
+ clickById(buttonId);
+ waitForAjaxCompletion(1000);
+ AssertValueEquals(inputId, "5");
+ }
+
+}
Added:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java 2008-04-14
17:21:46 UTC (rev 7825)
@@ -0,0 +1,70 @@
+package org.richfaces;
+
+import org.ajax4jsf.test.base.SeleniumTestBase;
+import org.testng.annotations.Test;
+
+public class AjaxCommandLinkTest extends SeleniumTestBase {
+
+ public AjaxCommandLinkTest() {
+ super("http", "localhost", "8080");
+ }
+
+ @Test
+ public void testAjaxCommandLinkComponent() throws Exception {
+ renderPage("/faces/pages/ajaxCommandLink/ajaxLinkTest.xhtml");
+
+ _testAjaxCommandButtonComponent(COMPONENT_PREFIX_INSIDE_TABLE);
+ _testAjaxCommandButtonComponent(COMPONENT_PREFIX_INSIDE_PANEL);
+ }
+
+ private void _testAjaxCommandButtonComponent(String parentId) {
+ // test inside DataTable
+ String LinkId = parentId + "l1";
+ String inputId = parentId + "_value";
+
+ clickById(LinkId);
+ waitForAjaxCompletion(3000);
+ AssertValueEquals(inputId, "3");
+
+ clickById(LinkId);
+ waitForAjaxCompletion(1000);
+ AssertValueEquals(inputId, "6");
+
+ LinkId = parentId + "l2";
+
+ clickById(LinkId);
+ waitForAjaxCompletion(1000);
+ AssertValueEquals(inputId, "6");
+
+ LinkId = parentId + "l3";
+
+ clickById(LinkId);
+ waitForAjaxCompletion(1000);
+ AssertValueEquals(inputId, "6");
+
+ LinkId = parentId + "l4";
+
+ clickById(LinkId);
+ waitForAjaxCompletion(1000);
+ AssertValueEquals(inputId, "1");
+
+ LinkId = parentId + "l5";
+
+ clickById(LinkId);
+ waitForAjaxCompletion(1000);
+ AssertValueEquals(inputId, "2");
+
+ LinkId = parentId + "l1";
+
+ clickById(LinkId);
+ waitForAjaxCompletion(1000);
+ AssertValueEquals(inputId, "5");
+
+ LinkId = parentId + "l3";
+
+ clickById(LinkId);
+ waitForAjaxCompletion(1000);
+ AssertValueEquals(inputId, "5");
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandLinkTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Deleted:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandsTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandsTest.java 2008-04-14
17:17:27 UTC (rev 7824)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/AjaxCommandsTest.java 2008-04-14
17:21:46 UTC (rev 7825)
@@ -1,71 +0,0 @@
-package org.richfaces;
-
-import org.ajax4jsf.test.base.SeleniumTestBase;
-import org.testng.annotations.Test;
-
-
-public class AjaxCommandsTest extends SeleniumTestBase {
-
- public AjaxCommandsTest() {
- super("http", "localhost", "8080");
- }
-
- @Test
- public void testAjaxCommandsComponents() throws Exception {
- renderPage("/faces/pages/ajaxCommands/ajaxButtonTest.xhtml");
-
- _testAjaxCommandsComponents(COMPONENT_PREFIX_INSIDE_TABLE);
- _testAjaxCommandsComponents(COMPONENT_PREFIX_INSIDE_PANEL);
- }
-
- private void _testAjaxCommandsComponents (String parentId) {
- // test inside DataTable
- String buttonId = parentId + "b1";
- String inputId = parentId + "_value";
-
- clickById(buttonId);
- waitForAjaxCompletion(3000);
- AssertValueEquals(inputId, "3");
-
- clickById(buttonId);
- waitForAjaxCompletion(1000);
- AssertValueEquals(inputId, "6");
-
- buttonId = parentId + "b2";
-
- clickById(buttonId);
- waitForAjaxCompletion(1000);
- AssertValueEquals(inputId, "6");
-
- buttonId = parentId + "b3";
-
- clickById(buttonId);
- waitForAjaxCompletion(1000);
- AssertValueEquals(inputId, "6");
-
- buttonId = parentId + "b4";
-
- clickById(buttonId);
- waitForAjaxCompletion(1000);
- AssertValueEquals(inputId, "1");
-
- buttonId = parentId + "b5";
-
- clickById(buttonId);
- waitForAjaxCompletion(1000);
- AssertValueEquals(inputId, "2");
-
- buttonId = parentId + "b1";
-
- clickById(buttonId);
- waitForAjaxCompletion(1000);
- AssertValueEquals(inputId, "5");
-
- buttonId = parentId + "b3";
-
- clickById(buttonId);
- waitForAjaxCompletion(1000);
- AssertValueEquals(inputId, "5");
- }
-
-}
Show replies by date