[richfaces-svn-commits] JBoss Rich Faces SVN: r14475 - in branches/community/3.3.X/test-applications/regressionArea: regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf6951 and 3 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Jun 4 06:57:55 EDT 2009


Author: mvitenkov
Date: 2009-06-04 06:57:55 -0400 (Thu, 04 Jun 2009)
New Revision: 14475

Added:
   branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf6951/
   branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf6951/Bean.java
   branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf6951/
   branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf6951/Test.java
   branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf6951.xhtml
Log:
+RF-6951 selenium test.

Added: branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf6951/Bean.java
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf6951/Bean.java	                        (rev 0)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf6951/Bean.java	2009-06-04 10:57:55 UTC (rev 14475)
@@ -0,0 +1,82 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * 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.regressionarea.issues.rf6951;
+
+import java.util.Arrays;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+/**
+ * This test case for: <a href="https://jira.jboss.org/jira/browse/RF-6267">RF-6951 - 
+ *  List shuttle causes "invalid value expression" error.</a>
+ * 
+ * @author Mikhail Vitenkov
+ * @since 3.3.2
+ */
+ at Name("rf6951")
+ at Scope(ScopeType.SESSION)
+public class Bean {
+
+	private String[] availableLine = { "Line 1", "Line 2", "Line 3" };
+	private String[] selectedLine = {};
+	private String available;
+	private String selected;
+	
+	public Bean(){
+		
+	}
+
+	public String[] getAvailableLine() {
+		return availableLine;
+	}
+
+	public void setAvailableLine(String[] availableLine) {
+		this.availableLine = availableLine;
+		available = Arrays.toString(availableLine);
+	}
+
+	public String[] getSelectedLine() {
+		return selectedLine;
+	}
+
+	public void setSelectedLine(String[] selectedLine) {
+		this.selectedLine = selectedLine;
+		selected = Arrays.toString(selectedLine);
+	}
+
+	public String getAvailable() {
+		return available;
+	}
+
+	public void setAvailable(String available) {
+		this.available = available;
+	}
+
+	public String getSelected() {
+		return selected;
+	}
+
+	public void setSelected(String selected) {
+		this.selected = selected;
+	}
+}

Added: branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf6951/Test.java
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf6951/Test.java	                        (rev 0)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-tests/src/test/java/org/richfaces/testng/rf6951/Test.java	2009-06-04 10:57:55 UTC (rev 14475)
@@ -0,0 +1,47 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * 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.rf6951;
+
+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();
+		
+		selenium.doubleClick("//*[@id='form:LineConfigs:0']");
+		selenium.click("//form[@id='form']/input[@type='button' and @value='Submit']");
+		waitForAjaxCompletion();
+		
+		AssertTextEquals("//table[@id='form:panel']/tbody/tr[1]/td[2]", "[Line 2, Line 3]");
+		AssertTextEquals("//table[@id='form:panel']/tbody/tr[2]/td[2]", "[Line 1]");
+	}	
+	
+	@Override
+	public String getTestUrl() {
+		return "pages/rf6951.xhtml";
+	}
+}
\ No newline at end of file

Added: branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf6951.xhtml
===================================================================
--- branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf6951.xhtml	                        (rev 0)
+++ branches/community/3.3.X/test-applications/regressionArea/regressionArea-web/src/main/webapp/pages/rf6951.xhtml	2009-06-04 10:57:55 UTC (rev 14475)
@@ -0,0 +1,33 @@
+<!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:listShuttle id="LineConfigs"
+				sourceValue="#{rf6951.availableLine}"
+				targetValue="#{rf6951.selectedLine}" var="variable"
+				sourceListWidth="280" listsHeight="250" targetListWidth="280">
+
+				<rich:column>
+					<h:outputText value="#{variable}" />
+				</rich:column>
+
+			</rich:listShuttle>
+
+			<a4j:commandButton value="Submit" reRender="panel"/>
+			<h:panelGrid columns="2" id="panel">
+				<h:outputText value="Available:" />
+				<h:outputText value="#{rf6951.available}" />
+				<h:outputText value="Selected:" />
+				<h:outputText value="#{rf6951.selected}" />
+			</h:panelGrid>
+		</h:form>
+	</ui:define>
+</ui:composition>
+</html>
\ No newline at end of file




More information about the richfaces-svn-commits mailing list