[richfaces-svn-commits] JBoss Rich Faces SVN: r11737 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/message and 1 other directories.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Fri Dec 12 09:36:33 EST 2008
Author: alevkovsky
Date: 2008-12-12 09:36:33 -0500 (Fri, 12 Dec 2008)
New Revision: 11737
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMessagesWithGlobalOnlyAttribute.xhtml
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/messagesBase.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5302
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java 2008-12-12 12:02:10 UTC (rev 11736)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/MessageBean2.java 2008-12-12 14:36:33 UTC (rev 11737)
@@ -11,6 +11,10 @@
private String string;
+ private String string2;
+
+ private String string3;
+
private Boolean rendered;
private Boolean showDetail;
@@ -25,12 +29,22 @@
public void init() {
string = "something";
+ string2 = "something2";
+ string3 = "something3";
rendered = true;
showDetail = true;
showSummary = false;
ajaxRendered = false;
}
+ public String addGlobalMessage() {
+ FacesContext.getCurrentInstance().addMessage(
+ null,
+ new FacesMessage(FacesMessage.SEVERITY_INFO, "globalMessageSummary",
+ "globalMessageDetail"));
+ return null;
+ }
+
public void validate(FacesContext context, UIComponent component,
Object value) throws ValidatorException {
Severity severity = null;
@@ -88,5 +102,33 @@
public Boolean getAjaxRendered() {
return ajaxRendered;
}
+
+ /**
+ * @return the string2
+ */
+ public String getString2() {
+ return string2;
+ }
+
+ /**
+ * @param string2 the string2 to set
+ */
+ public void setString2(String string2) {
+ this.string2 = string2;
+ }
+
+ /**
+ * @return the string3
+ */
+ public String getString3() {
+ return string3;
+ }
+
+ /**
+ * @param string3 the string3 to set
+ */
+ public void setString3(String string3) {
+ this.string3 = string3;
+ }
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/messagesBase.xhtml
===================================================================
(Binary files differ)
Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMessagesWithGlobalOnlyAttribute.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/message/testMessagesWithGlobalOnlyAttribute.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java 2008-12-12 12:02:10 UTC (rev 11736)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/MessagesTest.java 2008-12-12 14:36:33 UTC (rev 11737)
@@ -8,6 +8,7 @@
private static String TEST_MORE_THAN_ONE_MESSAGE = "pages/message/testMoreThanOneMessage.xhtml";
private static String TEST_MESSAGES_WITH_FOR_ATTRIBUTE = "pages/message/testMessagesWithForAttribute.xhtml";
+ private static String TEST_MESSAGES_GLOBAL_ONLY_ATTRIBUTE = "pages/message/testMessagesWithGlobalOnlyAttribute.xhtml";
@Override
protected void init(Template template) {
@@ -71,4 +72,33 @@
AssertNotPresent(mainForm + ":fatalMarker");
AssertNotPresent(mainForm + ":errorMarker");
}
+
+ @Test
+ public void testMessagesGlobalOnlyAttribute(Template template) {
+ init(template, TEST_MESSAGES_GLOBAL_ONLY_ATTRIBUTE);
+
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertNotPresent(mainForm + ":errorMarker");
+ AssertNotPresent(mainForm + ":warnMarker");
+ AssertNotPresent(mainForm + ":infoMarker");
+
+ clickAjaxCommandAndWait(mainForm + ":invalidate");
+
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertNotPresent(mainForm + ":errorMarker");
+ AssertNotPresent(mainForm + ":warnMarker");
+ AssertPresent(mainForm + ":infoMarker");
+ Assert.assertEquals("globalMessageSummary", selenium.getText("xpath=id('" + message + "')/dt[1]/span[2]"));
+
+ selenium.type(inputText, "fatal");
+ selenium.type(inputText + "2", "");
+ selenium.type(inputText + "3", "");
+
+ clickAjaxCommandAndWait(mainForm + ":submitWithoutReRender");
+
+ AssertNotPresent(mainForm + ":fatalMarker");
+ AssertNotPresent(mainForm + ":errorMarker");
+ AssertNotPresent(mainForm + ":warnMarker");
+ AssertNotPresent(mainForm + ":infoMarker");
+ }
}
More information about the richfaces-svn-commits
mailing list