Author: estherbin
Date: 2008-09-08 14:13:58 -0400 (Mon, 08 Sep 2008)
New Revision: 10149
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dropDownMenu/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dropDownMenu/jbide1606.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1606Test.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
Log:
Junit for JBIDE-1606
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dropDownMenu/jbide1606.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dropDownMenu/jbide1606.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dropDownMenu/jbide1606.xhtml 2008-09-08
18:13:58 UTC (rev 10149)
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:rich="http://richfaces.org/rich">
+<head>
+ <title>jbide1606</title>
+</head>
+<body>
+<f:loadBundle basename="demo.resources" var="msg" />
+<rich:dropDownMenu value="#{msg['greeting']}">
+ <rich:menuItem value="#{msg['greeting']}"
action="#{sprache.englisch}" />
+ <rich:menuItem value="#{i18n['menu.sprache.deutsch']}"
+ action="#{sprache.deutsch}">/>
+
+</rich:dropDownMenu>
+</body>
+
+</html>
\ No newline at end of file
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dropDownMenu/jbide1606.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-09-08
17:07:34 UTC (rev 10148)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-09-08
18:13:58 UTC (rev 10149)
@@ -17,6 +17,8 @@
import junit.framework.TestSuite;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1579Test;
+import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1605Test;
+import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1606Test;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1613Test;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1713Test;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.Jbide1548Test;
@@ -56,6 +58,8 @@
suite.addTestSuite(RichFacesFileUploadTemplateTestCase.class);
suite.addTestSuite(RichFacesColumnsTemplateTestCase.class);
suite.addTestSuite(RichFacesPickListTemplateTestCase.class);
+ suite.addTestSuite(JBIDE1605Test.class);
+ suite.addTestSuite(JBIDE1606Test.class);
// $JUnit-END$
List<ImportBean> projectToImport = new ArrayList<ImportBean>();
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1606Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1606Test.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1606Test.java 2008-09-08
18:13:58 UTC (rev 10149)
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+
+package org.jboss.tools.jsf.vpe.richfaces.test.jbide;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.jboss.tools.jsf.vpe.richfaces.test.RichFacesComponentTest;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.jboss.tools.vpe.xulrunner.browser.util.DOMTreeDumper;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+
+
+/**
+ * The Class JBIDE1606Test.
+ *
+ * @author Evgenij Stherbin
+ */
+public class JBIDE1606Test extends VpeTest {
+
+ /** The Constant HELLO. */
+ private static final String HELLO = "Hello"; //$NON-NLS-1$
+
+ /** The Constant PAGE. */
+ private static final String PAGE =
"components/dropDownMenu/jbide1606.xhtml"; //$NON-NLS-1$
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public JBIDE1606Test(String name) {
+ super(name);
+ }
+
+ /**
+ * Test JBID e1606.
+ *
+ * @throws Throwable the throwable
+ */
+ public void testSimpleJBIDE1606() throws Throwable {
+ performTestForVpeComponent((IFile) TestUtil.getComponentPath(PAGE,
RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ }
+
+ /**
+ * Test JBID e1606.
+ *
+ * @throws Throwable the throwable
+ */
+ public void testJBIDE1606() throws Throwable {
+ final nsIDOMElement rst = TestUtil.performTestForRichFacesComponent((IFile)
TestUtil.getComponentPath(PAGE,
+ RichFacesComponentTest.IMPORT_PROJECT_NAME));
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ // DOMTreeDumper dumper = new DOMTreeDumper();
+ // dumper.dumpToStream(System.err, rst);
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_SPAN);
+
+ assertTrue("Size of span's should be gt that 0", elements.size()
> 0); //$NON-NLS-1$
+
+ nsIDOMElement element = (nsIDOMElement)
elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Test should be equals
"+HELLO,HELLO,element.getFirstChild().getNodeValue()); //$NON-NLS-1$
+
+
+ }
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1606Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native