From richfaces-svn-commits at lists.jboss.org Wed Jan 19 12:56:39 2011 Content-Type: multipart/mixed; boundary="===============1771732303794253751==" 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: r21096 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richComponentControl. Date: Wed, 19 Jan 2011 12:56:38 -0500 Message-ID: <201101191756.p0JHucWw015595@svn01.web.mwc.hst.phx2.redhat.com> --===============1771732303794253751== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: lfryc(a)redhat.com Date: 2011-01-19 12:56:38 -0500 (Wed, 19 Jan 2011) New Revision: 21096 Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tes= ts/metamer/ftest/richComponentControl/ComponentControlAttributes.java Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tes= ts/metamer/ftest/richComponentControl/ComponentControlDataScroller.java Log: rich:componentControl - fixed the test after added select for attributes se= lection Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces= /tests/metamer/ftest/richComponentControl/ComponentControlAttributes.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 --- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/te= sts/metamer/ftest/richComponentControl/ComponentControlAttributes.java = (rev 0) +++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/te= sts/metamer/ftest/richComponentControl/ComponentControlAttributes.java 2011= -01-19 17:56:38 UTC (rev 21096) @@ -0,0 +1,42 @@ +/*************************************************************************= ****** + * JBoss, Home of Professional Open Source + * Copyright 2010, Red Hat, Inc. and individual contributors + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software 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 software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + *************************************************************************= ******/ +package org.richfaces.tests.metamer.ftest.richComponentControl; + +import org.richfaces.tests.metamer.ftest.AbstractComponentAttributes; + +/** + * @author Lukas Fryc + * @version $Revision$ + */ +public class ComponentControlAttributes extends AbstractComponentAttribute= s { + public void setOperation(String operation) { + setProperty("operation", operation); + } + = + public void setSelector(String selector) { + setProperty("selector", selector); + } + = + public void setTarget(String target) { + setProperty("target", target); + } +} = Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfa= ces/tests/metamer/ftest/richComponentControl/ComponentControlDataScroller.j= ava =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 --- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/te= sts/metamer/ftest/richComponentControl/ComponentControlDataScroller.java 20= 11-01-19 17:55:59 UTC (rev 21095) +++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/te= sts/metamer/ftest/richComponentControl/ComponentControlDataScroller.java 20= 11-01-19 17:56:38 UTC (rev 21096) @@ -21,14 +21,13 @@ *************************************************************************= ******/ package org.richfaces.tests.metamer.ftest.richComponentControl; = -import org.jboss.test.selenium.dom.Event; +import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactor= y.guardXhr; +import static org.jboss.test.selenium.locator.LocatorFactory.jq; +import static org.testng.Assert.assertEquals; + import org.jboss.test.selenium.locator.JQueryLocator; import org.richfaces.tests.metamer.ftest.model.AssertingDataScroller; = -import static org.jboss.test.selenium.locator.LocatorFactory.*; -import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactor= y.*; -import static org.testng.Assert.*; - /** * @author Lukas Fryc * @version $Revision$ @@ -36,8 +35,9 @@ public class ComponentControlDataScroller extends AssertingDataScroller { = JQueryLocator button =3D jq(":submit[id$=3Dbutton]"); - JQueryLocator selectOperation =3D jq(":radio[name$=3DoperationInput][v= alue=3D{0}]"); = + ComponentControlAttributes attributes =3D new ComponentControlAttribut= es(); + public ComponentControlDataScroller() { super(jq("span.rf-ds[id$=3Dscroller]")); } @@ -63,11 +63,7 @@ } = private void doOperation(String operation) { - JQueryLocator locator =3D selectOperation.format(operation); - if (!"on".equals(selenium.getValue(locator))) { - selenium.check(locator); - guardHttp(selenium).fireEvent(locator, Event.CHANGE); - } + attributes.setOperation(operation); guardXhr(selenium).click(button); } = --===============1771732303794253751==--