tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thiag...@apache.org
Subject git commit: TAP5-2158: Client-side validation of @Size is not working when only min or max is set. Added another test. Code that fixes this for jQuery is actually in tapestry-core itself.
Date Fri, 01 Nov 2013 20:17:41 GMT
Updated Branches:
  refs/heads/master 05710cd2f -> 9c574e7a5


TAP5-2158: Client-side validation of @Size is not working when only min
or max is set. Added another test. Code that fixes this for jQuery is
actually in tapestry-core itself.

Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/9c574e7a
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/9c574e7a
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/9c574e7a

Branch: refs/heads/master
Commit: 9c574e7a5f9e3b4ba7e99e63d89cc2b3cc3900c0
Parents: 05710cd
Author: Thiago H. de Paula Figueiredo <thiagohp@apache.org>
Authored: Fri Nov 1 18:17:29 2013 -0200
Committer: Thiago H. de Paula Figueiredo <thiagohp@apache.org>
Committed: Fri Nov 1 18:17:29 2013 -0200

----------------------------------------------------------------------
 .../TapestryBeanValidationIntegrationTests.java | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9c574e7a/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java
----------------------------------------------------------------------
diff --git a/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java
b/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java
index 264702b..a83dafa 100644
--- a/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java
+++ b/tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java
@@ -152,14 +152,30 @@ public class TapestryBeanValidationIntegrationTests extends SeleniumTestCase
 
         click(SUBMIT);
 
-        assertTextPresent("String Min Length size must be between 3 and " + Integer.MAX_VALUE);
+        final String stringMinLengthErrorMessage = "String Min Length size must be between
3 and " + Integer.MAX_VALUE;
+        
+		assertTextPresent(stringMinLengthErrorMessage);
+        
+        type("stringMinLength", "aaaaaa");
+
+        click(SUBMIT);
+        
+        assertFalse(isTextPresent(stringMinLengthErrorMessage));
         
         //@Size(max) TAP5-2158
         type("stringMaxLength", "aaaaaaaaaaaaaaaaaaaaaaaaaa");
 
         click(SUBMIT);
 
-        assertTextPresent("String Max Length size must be between 0 and 6");
+        final String stringMaxLengthErrorMessage = "String Max Length size must be between
0 and 6";
+        
+		assertTextPresent(stringMaxLengthErrorMessage);
+
+        type("stringMaxLength", "aaaaa");
+
+        click(SUBMIT);
+
+        assertFalse(isTextPresent(stringMaxLengthErrorMessage));
 
         click(SUBMIT);
 


Mime
View raw message