Author: maksimkaszynski
Date: 2008-03-25 12:17:35 -0400 (Tue, 25 Mar 2008)
New Revision: 7184
Modified:
trunk/ui/jQuery/src/test/java/org/richfaces/component/JQueryComponentTest.java
Log:
http://jira.jboss.com/jira/browse/RF-2726
Modified: trunk/ui/jQuery/src/test/java/org/richfaces/component/JQueryComponentTest.java
===================================================================
---
trunk/ui/jQuery/src/test/java/org/richfaces/component/JQueryComponentTest.java 2008-03-25
16:17:30 UTC (rev 7183)
+++
trunk/ui/jQuery/src/test/java/org/richfaces/component/JQueryComponentTest.java 2008-03-25
16:17:35 UTC (rev 7184)
@@ -30,6 +30,7 @@
import javax.faces.component.UIForm;
import javax.faces.component.html.HtmlForm;
+import org.ajax4jsf.renderkit.RendererUtils.HTML;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.apache.commons.lang.StringUtils;
@@ -42,7 +43,7 @@
*/
public class JQueryComponentTest extends AbstractAjax4JsfTestCase {
private UIForm form = null;
- private UIComponent jq = null;
+ private UIJQuery jq = null;
private static Set javaScripts = new HashSet();
@@ -66,8 +67,10 @@
form = new HtmlForm();
facesContext.getViewRoot().getChildren().add(form);
- jq = application.createComponent(UIJQuery.COMPONENT_TYPE);
+ jq = (UIJQuery) application.createComponent(UIJQuery.COMPONENT_TYPE);
jq.setId("jq");
+ jq.getAttributes().put("query", "form");
+ form.getChildren().add(jq);
}
public void tearDown() throws Exception {
@@ -78,9 +81,11 @@
public void testRendcerComponent() throws Exception {
HtmlPage renderedView = renderView();
+ List scripts =
renderedView.getDocumentHtmlElement().getHtmlElementsByTagName(HTML.SCRIPT_ELEM);
+ assertNotNull(scripts);
+ assertFalse(scripts.isEmpty());
+ //HtmlElement htmlGmap =
renderedView.getHtmlElementById(jq.getClientId(facesContext));
- HtmlElement htmlGmap =
renderedView.getHtmlElementById(jq.getClientId(facesContext));
-
}