From richfaces-svn-commits at lists.jboss.org Fri May 22 18:43:55 2009 Content-Type: multipart/mixed; boundary="===============2820911858089324799==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r14287 - in branches/community/3.3.X/test-applications/regressionArea: regressionArea-ejb/src/main/java/org/richfaces/regressionarea/issues/rf5773 and 4 other directories. Date: Fri, 22 May 2009 18:37:17 -0400 Message-ID: --===============2820911858089324799== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: nbelaevski Date: 2009-05-22 18:37:17 -0400 (Fri, 22 May 2009) New Revision: 14287 Added: branches/community/3.3.X/test-applications/regressionArea/regressionArea= -ejb/src/main/java/org/richfaces/regressionarea/issues/rf5773/ branches/community/3.3.X/test-applications/regressionArea/regressionArea= -ejb/src/main/java/org/richfaces/regressionarea/issues/rf5773/Bean.java branches/community/3.3.X/test-applications/regressionArea/regressionArea= -ejb/src/main/java/org/richfaces/regressionarea/issues/rf5773/Item.java branches/community/3.3.X/test-applications/regressionArea/regressionArea= -tests/src/test/java/org/richfaces/testng/rf5773/ branches/community/3.3.X/test-applications/regressionArea/regressionArea= -tests/src/test/java/org/richfaces/testng/rf5773/Test.java branches/community/3.3.X/test-applications/regressionArea/regressionArea= -web/src/main/webapp/pages/rf5773.xhtml Modified: branches/community/3.3.X/test-applications/regressionArea/regressionArea= -tests/src/test/resources/testng.xml Log: https://jira.jboss.org/jira/browse/RF-5773 Added: branches/community/3.3.X/test-applications/regressionArea/regression= Area-ejb/src/main/java/org/richfaces/regressionarea/issues/rf5773/Bean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/community/3.3.X/test-applications/regressionArea/regressionAre= a-ejb/src/main/java/org/richfaces/regressionarea/issues/rf5773/Bean.java = (rev 0) +++ branches/community/3.3.X/test-applications/regressionArea/regressionAre= a-ejb/src/main/java/org/richfaces/regressionarea/issues/rf5773/Bean.java 20= 09-05-22 22:37:17 UTC (rev 14287) @@ -0,0 +1,57 @@ +/** + * 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-130= 1 USA + */ + + +package org.richfaces.regressionarea.issues.rf5773; + +import java.util.ArrayList; +import java.util.List; + +import org.jboss.seam.ScopeType; +import org.jboss.seam.annotations.Name; +import org.jboss.seam.annotations.Scope; + +/** + * This test case for: RF-5773 - = + * Forms not working within DataTable + * = + * @author Nick Belaevski + * @since 3.3.2 + */ + +(a)Name("rf5773") +(a)Scope(ScopeType.SESSION) +public class Bean { + + private List items; + + public Bean() { + items =3D new ArrayList(); + for (int i =3D 0; i < 3; i++) { + items.add(new Item("Item " + i)); + } + } + = + public List getItems() { + return items; + } + +} Added: branches/community/3.3.X/test-applications/regressionArea/regression= Area-ejb/src/main/java/org/richfaces/regressionarea/issues/rf5773/Item.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/community/3.3.X/test-applications/regressionArea/regressionAre= a-ejb/src/main/java/org/richfaces/regressionarea/issues/rf5773/Item.java = (rev 0) +++ branches/community/3.3.X/test-applications/regressionArea/regressionAre= a-ejb/src/main/java/org/richfaces/regressionarea/issues/rf5773/Item.java 20= 09-05-22 22:37:17 UTC (rev 14287) @@ -0,0 +1,63 @@ +/** + * 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-130= 1 USA + */ + +package org.richfaces.regressionarea.issues.rf5773; + +import javax.faces.application.FacesMessage; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; + +/** + * @author Nick Belaevski + * @since 3.3.2 + */ +public class Item { + + private String value; + + private int counter =3D 0; + = + public Item(String value) { + super(); + this.value =3D value; + } + = + public String getValue() { + return value; + } + = + public void setValue(String value) { + this.value =3D value; + } + = + public void incCounter() { + counter++; + } + = + public void validate(FacesContext context, UIComponent component, Object = value) { + String messageText =3D value.toString(); + context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, me= ssageText, messageText)); + } + = + public int getCounter() { + return counter; + } +} Added: branches/community/3.3.X/test-applications/regressionArea/regression= Area-tests/src/test/java/org/richfaces/testng/rf5773/Test.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/community/3.3.X/test-applications/regressionArea/regressionAre= a-tests/src/test/java/org/richfaces/testng/rf5773/Test.java = (rev 0) +++ branches/community/3.3.X/test-applications/regressionArea/regressionAre= a-tests/src/test/java/org/richfaces/testng/rf5773/Test.java 2009-05-22 22:3= 7:17 UTC (rev 14287) @@ -0,0 +1,81 @@ +/** + * 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-130= 1 USA + */ + + +package org.richfaces.testng.rf5773; + +import junit.framework.Assert; + +import org.richfaces.SeleniumTestBase; + +/** + * @author Nick Belaevski + * @since 3.3.2 + */ +public class Test extends SeleniumTestBase { + + private void checkStep(String[] text, int[] counter) { + for (int i =3D 0; i < text.length; i++) { + String s =3D getTextById("outputRepeat:" + i + ":valuePanel"); + = + Assert.assertEquals( + String.format("Value check failed for step: [%d]; expected '%s' was '%= s'", i, text[i], s), + text[i], s); + } + + for (int i =3D 0; i < counter.length; i++) { + String s =3D getTextById("outputRepeat:" + i + ":counterPanel"); + Assert.assertEquals( + String.format("Counter check failed for step: [%d]; expected '%s' was = '%s'", i, counter[i], s), + String.valueOf(counter[i]), s); + } + } + = + @org.testng.annotations.Test + public void testExecute() throws Exception { + renderPage(); + + String[] text =3D {"Item 0", "Item 1", "Item 2"}; + int[] counter =3D new int[text.length]; + + //check initial setup + checkStep(text, counter); + AssertTextEquals("messages", ""); + //initial setup ok + + for (int i =3D 0; i < text.length; i++) { + text[i] =3D "Val:" + String.valueOf(i) ; + counter[i]++; + type("formsRepeat:" + i + ":form:input", text[i]); + clickAjaxCommandAndWait("formsRepeat:" + i + ":form:link"); + = + checkStep(text, counter); + AssertTextEquals("messages", text[i]); + } + = + } + = + = + @Override + public String getTestUrl() { + return "pages/rf5773.xhtml"; + } +} Modified: branches/community/3.3.X/test-applications/regressionArea/regress= ionArea-tests/src/test/resources/testng.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/community/3.3.X/test-applications/regressionArea/regressionAre= a-tests/src/test/resources/testng.xml 2009-05-22 16:36:40 UTC (rev 14286) +++ branches/community/3.3.X/test-applications/regressionArea/regressionAre= a-tests/src/test/resources/testng.xml 2009-05-22 22:37:17 UTC (rev 14287) @@ -31,6 +31,7 @@ + Added: branches/community/3.3.X/test-applications/regressionArea/regression= Area-web/src/main/webapp/pages/rf5773.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- branches/community/3.3.X/test-applications/regressionArea/regressionAre= a-web/src/main/webapp/pages/rf5773.xhtml (rev 0) +++ branches/community/3.3.X/test-applications/regressionArea/regressionAre= a-web/src/main/webapp/pages/rf5773.xhtml 2009-05-22 22:37:17 UTC (rev 14287) @@ -0,0 +1,36 @@ + + + = + + + + + + + + + + + + + + + + #{item.value} + = + + + #{item.counter} + = +
= +
+
+ +
+
+ --===============2820911858089324799==--