shale-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject svn commit: r476998 - in /shale/framework/trunk: shale-apps/shale-usecases/src/main/resources/org/apache/shale/usecases/view/ shale-apps/shale-usecases/src/test/java/org/apache/shale/usecases/systest/ shale-core/src/main/resources/org/apache/shale/reso...
Date Mon, 20 Nov 2006 00:39:05 GMT
Author: craigmcc
Date: Sun Nov 19 16:39:02 2006
New Revision: 476998

URL: http://svn.apache.org/viewvc?view=rev&rev=476998
Log:
Fix up the lookup of validation error messages for the token component,
so that the integration test for shale-usecases works again.

Modified:
    shale/framework/trunk/shale-apps/shale-usecases/src/main/resources/org/apache/shale/usecases/view/Bundle.properties
    shale/framework/trunk/shale-apps/shale-usecases/src/test/java/org/apache/shale/usecases/systest/TokenTestCase.java
    shale/framework/trunk/shale-core/src/main/resources/org/apache/shale/resources/Bundle.properties
    shale/framework/trunk/shale-core/src/test/java/org/apache/shale/util/TokenProcessorTestCase.java

Modified: shale/framework/trunk/shale-apps/shale-usecases/src/main/resources/org/apache/shale/usecases/view/Bundle.properties
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-usecases/src/main/resources/org/apache/shale/usecases/view/Bundle.properties?view=diff&rev=476998&r1=476997&r2=476998
==============================================================================
--- shale/framework/trunk/shale-apps/shale-usecases/src/main/resources/org/apache/shale/usecases/view/Bundle.properties
(original)
+++ shale/framework/trunk/shale-apps/shale-usecases/src/main/resources/org/apache/shale/usecases/view/Bundle.properties
Sun Nov 19 16:39:02 2006
@@ -130,8 +130,11 @@
 token.test.title=Shale Token Test
 token.test.description=This test includes the Token component.  It should allow exactly one
submit of the form once you satisfy the "required" constraint on the text field.
 token.test.heading=Simple Form With One Required Field
-token.test.label=Required Field:
+token.test.message=Required Field:
 
+# org.apache.shale.component.Token (Override default messages)
+token.summary.invalid=Invalid resubmit (summary)
+token.detail.invalid=Invalid resubmit (detail)
 
 # Use Cases Menu Messages
 usecases.categories=List Categories (Remoting)

Modified: shale/framework/trunk/shale-apps/shale-usecases/src/test/java/org/apache/shale/usecases/systest/TokenTestCase.java
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-apps/shale-usecases/src/test/java/org/apache/shale/usecases/systest/TokenTestCase.java?view=diff&rev=476998&r1=476997&r2=476998
==============================================================================
--- shale/framework/trunk/shale-apps/shale-usecases/src/test/java/org/apache/shale/usecases/systest/TokenTestCase.java
(original)
+++ shale/framework/trunk/shale-apps/shale-usecases/src/test/java/org/apache/shale/usecases/systest/TokenTestCase.java
Sun Nov 19 16:39:02 2006
@@ -107,13 +107,12 @@
         HtmlElement messages = element("form:messages");
         assertNotNull(messages);
         text = messages.asText();
-        assertTrue(text.contains("Invalid resubmit of the same form"));
+        assertTrue(text.contains("Invalid resubmit (summary)"));
         message = element("form:valueMessage");
         assertNull(message);
         message = element("form:tokenMessage");
         assertNotNull(message);
-// FIXME - for some reason the text is not displayed???  MyFaces issue???
-//        assertTrue(message.asText().contains("Invalid resubmit of the same form"));
+        assertTrue(message.asText().contains("Invalid resubmit (detail)"));
 
     }
 
@@ -236,13 +235,12 @@
         HtmlElement messages = element("form:messages");
         assertNotNull(messages);
         String text = messages.asText();
-        assertTrue(text.contains("Invalid resubmit of the same form"));
+        assertTrue(text.contains("Invalid resubmit (summary)"));
         HtmlElement message = element("form:valueMessage");
         assertNull(message);
         message = element("form:tokenMessage");
         assertNotNull(message);
-// FIXME - for some reason the text is not displayed???  MyFaces issue???
-//        assertTrue(message.asText().contains("Invalid resubmit of the same form"));
+        assertTrue(message.asText().contains("Invalid resubmit (detail)"));
 
     }
 

Modified: shale/framework/trunk/shale-core/src/main/resources/org/apache/shale/resources/Bundle.properties
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-core/src/main/resources/org/apache/shale/resources/Bundle.properties?view=diff&rev=476998&r1=476997&r2=476998
==============================================================================
--- shale/framework/trunk/shale-core/src/main/resources/org/apache/shale/resources/Bundle.properties
(original)
+++ shale/framework/trunk/shale-core/src/main/resources/org/apache/shale/resources/Bundle.properties
Sun Nov 19 16:39:02 2006
@@ -31,7 +31,7 @@
 
 # org.apache.shale.component.Token
 token.summary.invalid=Invalid resubmit of the same form
-token.detail.invalid=
+token.detail.invalid=Invalid resubmit of the same form
 
 # org.apache.shale.dialog.faces.DialogNavigationHandler
 dialog.noDialog=You have requested a dialog named "{0}" but no such dialog definition can
be found.  Double check the spelling of the dialog name.

Modified: shale/framework/trunk/shale-core/src/test/java/org/apache/shale/util/TokenProcessorTestCase.java
URL: http://svn.apache.org/viewvc/shale/framework/trunk/shale-core/src/test/java/org/apache/shale/util/TokenProcessorTestCase.java?view=diff&rev=476998&r1=476997&r2=476998
==============================================================================
--- shale/framework/trunk/shale-core/src/test/java/org/apache/shale/util/TokenProcessorTestCase.java
(original)
+++ shale/framework/trunk/shale-core/src/test/java/org/apache/shale/util/TokenProcessorTestCase.java
Sun Nov 19 16:39:02 2006
@@ -248,7 +248,7 @@
         
         //value of the "token.invalid" key in the "org.apache.shale.resources.Bundle"
         final String SUMMARY_MESSAGE = "Invalid resubmit of the same form"; 
-        final String DETAIL_MESSAGE = "";  // none by detault
+        final String DETAIL_MESSAGE = "Invalid resubmit of the same form";
                 
         Token token = (Token) facesContext.getApplication().createComponent("org.apache.shale.Token");
         assertNotNull(token);



Mime
View raw message