From richfaces-svn-commits at lists.jboss.org Thu Feb 26 08:40:12 2009 Content-Type: multipart/mixed; boundary="===============3397148588505956545==" 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: r12757 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/separator and 1 other directories. Date: Thu, 26 Feb 2009 08:40:12 -0500 Message-ID: --===============3397148588505956545== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: konstantin.mishin Date: 2009-02-26 08:40:12 -0500 (Thu, 26 Feb 2009) New Revision: 12757 Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/sep= arator/ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/sep= arator/separatorAutoTest.xhtml trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfac= es/testng/SeparatorTest.java Log: RF-6187 Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages= /separator/separatorAutoTest.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 --- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/se= parator/separatorAutoTest.xhtml (rev 0) +++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/se= parator/separatorAutoTest.xhtml 2009-02-26 13:40:12 UTC (rev 12757) @@ -0,0 +1,24 @@ + + + = + + + + + + \ No newline at end of file Added: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/ric= hfaces/testng/SeparatorTest.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 --- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfa= ces/testng/SeparatorTest.java (rev 0) +++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfa= ces/testng/SeparatorTest.java 2009-02-26 13:40:12 UTC (rev 12757) @@ -0,0 +1,44 @@ +package org.richfaces.testng; + +import java.util.HashMap; +import java.util.Map; + +import org.ajax4jsf.template.Template; +import org.richfaces.AutoTester; +import org.richfaces.SeleniumTestBase; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class SeparatorTest extends SeleniumTestBase { + + /** + * component with rendered =3D false is not present on the page, + * style and classes, standard HTML attributes are output to client + */ + @Test + public void testStandardAttributes(Template template) { + AutoTester autoTester =3D getAutoTester(this); + autoTester.renderPage(template, null); + autoTester.testRendered(); + Map styleAttributes =3D new HashMap(); + styleAttributes.put("width", "100%"); + styleAttributes.put("color", "yellow"); + autoTester.testHTMLEvents(); + Assert.assertTrue(selenium.getAttribute("xpath=3Did('" + + autoTester.getClientId(AutoTester.COMPONENT_ID) + "')/div(a)class= ") + .indexOf("noname") !=3D -1); + Assert.assertTrue(selenium.getAttribute("xpath=3Did('" + + autoTester.getClientId(AutoTester.COMPONENT_ID) + "')/div(a)style= ").toLowerCase() + .indexOf("color: yellow") !=3D -1); + } + + @Override + public String getTestUrl() { + throw new UnsupportedOperationException(); + } + + @Override + public String getAutoTestUrl() { + return "pages/separator/separatorAutoTest.xhtml"; + } +} --===============3397148588505956545==--