From richfaces-svn-commits at lists.jboss.org Fri Oct 31 09:54:57 2008 Content-Type: multipart/mixed; boundary="===============5063690233022398081==" 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: r10989 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/inplaceInput/includes and 1 other directories. Date: Fri, 31 Oct 2008 09:54:57 -0400 Message-ID: --===============5063690233022398081== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: vmolotkov Date: 2008-10-31 09:54:57 -0400 (Fri, 31 Oct 2008) New Revision: 10989 Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inp= laceInput/testShowControlsAttribute1.xhtml trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inp= laceInput/testShowControlsAttribute2.xhtml Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inp= laceInput/includes/testBody.xhtml trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfac= es/testng/InplaceInputTest.java Log: tests for inplaceinput Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pa= ges/inplaceInput/includes/testBody.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/in= placeInput/includes/testBody.xhtml 2008-10-31 08:28:28 UTC (rev 10988) +++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/in= placeInput/includes/testBody.xhtml 2008-10-31 13:54:57 UTC (rev 10989) @@ -5,7 +5,7 @@ xmlns:f=3D"http://java.sun.com/jsf/core" xmlns:ui=3D"http://java.sun.com/jsf/facelets"> - +   value:   Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages= /inplaceInput/testShowControlsAttribute1.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/in= placeInput/testShowControlsAttribute1.xhtml (rev 0) +++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/in= placeInput/testShowControlsAttribute1.xhtml 2008-10-31 13:54:57 UTC (rev 10= 989) @@ -0,0 +1,20 @@ + + + testShowControlsAttribute + + + + + + + + + + + Added: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages= /inplaceInput/testShowControlsAttribute2.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/in= placeInput/testShowControlsAttribute2.xhtml (rev 0) +++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/in= placeInput/testShowControlsAttribute2.xhtml 2008-10-31 13:54:57 UTC (rev 10= 989) @@ -0,0 +1,20 @@ + + + testShowControlsAttribute2 + + + + + + + + + + + Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/= richfaces/testng/InplaceInputTest.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/InplaceInputTest.java 2008-10-31 08:28:28 UTC (rev 10988) +++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfa= ces/testng/InplaceInputTest.java 2008-10-31 13:54:57 UTC (rev 10989) @@ -47,6 +47,16 @@ = private static final String DEFAULTLABEL_AND_SPACES_PAGE_ID_PREFIX =3D= "_dfas"; = + private static final String SHOW_CONTROLS_ATTRIBUTE1_PAGE =3D "testSho= wControlsAttribute1.xhtml"; + = + private static final String SHOW_CONTROLS_ATTRIBUTE1_PAGE_ID_PREFIX = =3D "_tsca1"; + = + private static final String SHOW_CONTROLS_ATTRIBUTE2_PAGE =3D "testSho= wControlsAttribute2.xhtml"; + = + private static final String SHOW_CONTROLS_ATTRIBUTE2_PAGE_ID_PREFIX = =3D "_tsca2"; + = + private static final String SHOW_CONTROLS_ATTRIBUTE_BAR =3D "bar"; + = private String testUrl; = private String formId; @@ -246,6 +256,58 @@ typeAndCheck(iid, "test", "test"); } = + /** + * Verify component behaviour with showControls=3D"false" attribute = + * = + * @param template - current template + */ + @Test + public void testShowControlsAttribute1(Template template) { + setTestUrl(SHOW_CONTROLS_ATTRIBUTE1_PAGE); + init(template); + = + String iid =3D inplaceInputId + SHOW_CONTROLS_ATTRIBUTE1_PAGE_ID_PREF= IX; + = + clickById(iid); + check(!isVisibleById(iid + SHOW_CONTROLS_ATTRIBUTE_BAR), = + CommonUtils.getSuccessfulTestMessage(iid), = + CommonUtils.getFailedTestMessage(iid)); + = + Map expMap =3D new HashMap(); + expMap.put("clip", "rect(auto auto auto auto)"); + assertStyleAttributes(iid+ "tempValue", expMap); + selenium.fireEvent(iid + "tempValue", "blur"); + expMap.remove("clip"); + expMap.put("clip", "rect(0px 0px 0px 0px)"); + assertStyleAttributes(iid+ "tempValue", expMap); + } + = + /** + * The same as previous but with showControls=3D"true" attribute + * = + * @param template - current template + */ + @Test + public void testShowControlsAttribute2(Template template) { + setTestUrl(SHOW_CONTROLS_ATTRIBUTE2_PAGE); + init(template); + = + String iid =3D inplaceInputId + SHOW_CONTROLS_ATTRIBUTE2_PAGE_ID_PREF= IX; + = + clickById(iid); + check(isVisibleById(iid + SHOW_CONTROLS_ATTRIBUTE_BAR), = + CommonUtils.getSuccessfulTestMessage(iid), = + CommonUtils.getFailedTestMessage(iid)); + = + Map expMap =3D new HashMap(); + expMap.put("clip", "rect(auto auto auto auto)"); + assertStyleAttributes(iid+ "tempValue", expMap); + selenium.fireEvent(iid + "tempValue", "blur"); + expMap.remove("clip"); + expMap.put("clip", "rect(auto auto auto auto)"); + assertStyleAttributes(iid+ "tempValue", expMap); + } + = private void typeAndCheck(String iid, String word, String expectedWord= ) { typeWord(iid, word); checkMessage(iid, expectedWord, = --===============5063690233022398081==--