Author: dsvyatobatsko
Date: 2009-01-28 05:31:17 -0500 (Wed, 28 Jan 2009)
New Revision: 12449
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/rf4140.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/inputNumberSpinnerTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5889
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/inputNumberSpinnerTest.xhtml
===================================================================
(Binary files differ)
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/rf4140.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/rf4140.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java 2009-01-28
09:47:07 UTC (rev 12448)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java 2009-01-28
10:31:17 UTC (rev 12449)
@@ -17,7 +17,7 @@
* 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;
@@ -26,26 +26,20 @@
import org.testng.Assert;
import org.testng.annotations.Test;
-
public class InputNumberSpinnerTest extends SeleniumTestBase {
+ private final static String RF4140 =
"/pages/inputNumberSpinner/rf4140.xhtml";
+
private final static String RESET_METHOD = "#{spinnerBean.reset}";
private final static String FORM_ID = "autoTestForm:";
@Test
- public void testInputNumberSpinnerComponent(Template template) {
- renderPage(template);
+ public void testCycleMode(Template template) {
+ renderPage(template, RESET_METHOD);
+ writeStatus("Check cycled attribute");
- writeStatus("check whether the spinner is invariant with respect to pair of
sequential opposite operations");
-
- //start value = 20
- String before = getSpinnerValue();
- clickUp();
- clickDown();
- String after = getSpinnerValue();
- Assert.assertEquals(before, after);
- Assert.assertEquals(after, "20");
+ Assert.assertEquals(getSpinnerValue(), "20");
writeStatus("check upper bound and cycling");
@@ -64,9 +58,32 @@
Assert.assertEquals(getSpinnerValue(), "50");
clickDown(); //-10
Assert.assertEquals(getSpinnerValue(), "40");
+
}
@Test
+ public void
testSpinnerIsInvariantWithRespectToPairOfSequentialOppositeOperations(Template template)
{
+ renderPage(template, RESET_METHOD);
+ writeStatus("check whether the spinner is invariant with respect to pair of
sequential opposite operations");
+
+ //start value = 20
+ String before = getSpinnerValue();
+ clickUp();
+ clickDown();
+ String after = getSpinnerValue();
+ Assert.assertEquals(before, after);
+ Assert.assertEquals(after, "20");
+ }
+
+ @Test
+ public void testRF4140(Template template) {
+ renderPage(RF4140, template, null);
+ // see
https://jira.jboss.org/jira/browse/RF-4140)
+ writeStatus("Check a spinner works properly when its value is numeric
literal");
+ Assert.assertEquals(getSpinnerValue(), "20");
+ }
+
+ @Test
public void testRenderedAttribute(Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);