From richfaces-svn-commits at lists.jboss.org Fri Jan 7 05:58:03 2011 Content-Type: multipart/mixed; boundary="===============2123270494452187156==" 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: r20915 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richMenuSeparator and 1 other directory. Date: Fri, 07 Jan 2011 05:58:03 -0500 Message-ID: <201101071058.p07Aw3oF024084@svn01.web.mwc.hst.phx2.redhat.com> --===============2123270494452187156== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: ppitonak(a)redhat.com Date: 2011-01-07 05:58:02 -0500 (Fri, 07 Jan 2011) New Revision: 20915 Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tes= ts/metamer/ftest/richMenuSeparator/ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tes= ts/metamer/ftest/richMenuSeparator/TestRichMenuSeparator.java Log: https://issues.jboss.org/browse/RFPL-960 * adde one test for rich:menuSeparator Added: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces= /tests/metamer/ftest/richMenuSeparator/TestRichMenuSeparator.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/richMenuSeparator/TestRichMenuSeparator.java = (rev 0) +++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/te= sts/metamer/ftest/richMenuSeparator/TestRichMenuSeparator.java 2011-01-07 1= 0:58:02 UTC (rev 20915) @@ -0,0 +1,61 @@ +/*************************************************************************= ****** + * 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.richMenuSeparator; + +import static org.jboss.test.selenium.utils.URLUtils.buildUrl; +import static org.testng.Assert.assertEquals; +import java.net.URL; +import org.jboss.test.selenium.locator.JQueryLocator; +import org.richfaces.tests.metamer.ftest.AbstractMetamerTest; +import org.testng.annotations.Test; + +/** + * Test case for page faces/components/richMenuSeparator/simple.xhtml. + * + * @author Pavol Pitonak + * @version $Revision$ + */ +public class TestRichMenuSeparator extends AbstractMetamerTest { + + private JQueryLocator separators =3D pjq("div.rf-ddm-sep"); + + @Override + public URL getTestUrl() { + return buildUrl(contextPath, "faces/components/richMenuSeparator/s= imple.xhtml"); + } + + @Test + public void testRendered() { + int count =3D selenium.getCount(separators); + assertEquals(count, 2, "There should be two separators on the page= - after 'Open Recent' and after 'Close'."); + + selenium.click(pjq("input[type=3Dradio][name$=3DrenderedInput][val= ue=3Dfalse]")); + selenium.waitForPageToLoad(); + count =3D selenium.getCount(separators); + assertEquals(count, 1, "There should be only one separator on the = page - after 'Close'."); + + selenium.click(pjq("input[type=3Dradio][name$=3DrenderedInput][val= ue=3Dtrue]")); + selenium.waitForPageToLoad(); + count =3D selenium.getCount(separators); + assertEquals(count, 2, "There should be two separators on the page= - after 'Open Recent' and after 'Close'."); + } +} Property changes on: modules/tests/metamer/trunk/ftest-source/src/main/java= /org/richfaces/tests/metamer/ftest/richMenuSeparator/TestRichMenuSeparator.= java ___________________________________________________________________ Name: svn:keywords + Revision --===============2123270494452187156==--