Author: dsvyatobatsko
Date: 2009-03-25 12:43:18 -0400 (Wed, 25 Mar 2009)
New Revision: 13187
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tooltip/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tooltip/tooltipAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TooltipTest.java
Log:
https://jira.jboss.org/jira/browse/RF-6381 started
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tooltip/tooltipAutoTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/tooltip/tooltipAutoTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TooltipTest.java
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TooltipTest.java
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TooltipTest.java 2009-03-25
16:43:18 UTC (rev 13187)
@@ -0,0 +1,104 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * 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-1301 USA
+ */
+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.annotations.Test;
+
+public class TooltipTest extends SeleniumTestBase {
+
+ private static Map<String, String> params = new HashMap<String,
String>();
+
+ static {
+ params.put("parameter1", "value1");
+ params.put("parameter2", "value2");
+ params.put("parameter3", "value3");
+ }
+
+ @Test
+ public void testNestedParams(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test component encodes nested f:param tags and their values are
present as request parameters");
+ tester.testRequestParameters(params);
+ }
+
+ @Test
+ public void testRenderedAttribute(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test component with rendered = false is not present on the
page");
+ tester.testRendered();
+ }
+
+ @Test
+ public void testImmediate(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test immediate attribute");
+ tester.testImmediate();
+ }
+
+ @Test
+ public void testImmediateWithExternalValidationFailed(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test immediate attribute with external validation
failed");
+ tester.testImmediateWithExternalValidationFailed();
+ }
+
+ @Test
+ public void testAjaxSingle(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Test ajaxSingle attribute");
+ tester.testAjaxSingle();
+ }
+
+ @Test
+ public void testWithExternalValidationFailure(Template template) {
+ AutoTester autoTester = getAutoTester(this);
+ autoTester.renderPage(template, null);
+ writeStatus("Check that listeners are not invoked in case of external
validation failure");
+ autoTester.testExtrenalValidationFailure();
+ }
+
+ @Override
+ public void sendAjax() {
+ selenium.clickAt(getAutoTester(this).getClientId("tooltipArea"),
"1,1");
+ waitForAjaxCompletion();
+ }
+
+ @Override
+ public String getAutoTestUrl() {
+ return "pages/tooltip/tooltipAutoTest.xhtml";
+ }
+
+ @Override
+ public String getTestUrl() {
+ throw new UnsupportedOperationException();
+ }
+}
Property changes on:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/TooltipTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native