Author: mvitenkov
Date: 2009-05-27 06:57:48 -0400 (Wed, 27 May 2009)
New Revision: 14363
Added:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf5830/
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf5830/Bean.java
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5830/
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5830/Test.java
branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf5830.xhtml
Log:
RF-5830 selenium test was added.
Added:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf5830/Bean.java
===================================================================
---
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf5830/Bean.java
(rev 0)
+++
branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf5830/Bean.java 2009-05-27
10:57:48 UTC (rev 14363)
@@ -0,0 +1,20 @@
+package org.richfaces.regressionarea.issues.rf5830;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+@Name("rf5830")
+(a)Scope(ScopeType.SESSION)
+public class Bean {
+
+ public Bean(){
+
+ }
+ public void addMessage(){
+ FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage("message"));
+ }
+}
Added:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5830/Test.java
===================================================================
---
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5830/Test.java
(rev 0)
+++
branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf5830/Test.java 2009-05-27
10:57:48 UTC (rev 14363)
@@ -0,0 +1,27 @@
+package org.richfaces.testng.rf5830;
+
+import org.richfaces.SeleniumTestBase;
+
+/**
+ * @author Mikhail Vitenkov
+ * @since 3.3.2
+ */
+public class Test extends SeleniumTestBase {
+
+ @org.testng.annotations.Test
+ public void testExecute() throws Exception {
+ renderPage();
+ clickAjaxCommandAndWait("form:link");
+
+ AssertTextEquals("//form[@id='form']//span[@class='rich-messages-label']",
"message");
+
+ }
+
+
+ @Override
+ public String getTestUrl() {
+ return "pages/rf5830.xhtml";
+ }
+
+
+}
Added:
branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf5830.xhtml
===================================================================
---
branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf5830.xhtml
(rev 0)
+++
branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf5830.xhtml 2009-05-27
10:57:48 UTC (rev 14363)
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<ui:composition template="/layout/layout.xhtml">
+
+ <ui:define name="template">
+ <h:form id="form">
+ <rich:messages globalOnly="true"/>
+
+ <a4j:commandLink value="ReRender" action="#{rf5830.addMessage}"
id="link"/>
+ </h:form>
+ </ui:define>
+</ui:composition>
+</html>
\ No newline at end of file