Author: dmaliarevich
Date: 2008-01-16 06:51:18 -0500 (Wed, 16 Jan 2008)
New Revision: 5734
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1613Test.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1613
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-01-16
11:34:04 UTC (rev 5733)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-01-16
11:51:18 UTC (rev 5734)
@@ -16,6 +16,7 @@
import junit.framework.Test;
import junit.framework.TestSuite;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1579Test;
+import org.jboss.tools.jsf.vpe.richfaces.test.jbide.JBIDE1613Test;
import org.jboss.tools.jsf.vpe.richfaces.test.jbide.Jbide1580Test;
import org.jboss.tools.vpe.ui.test.VpeTestSetup;
import org.jboss.tools.vpe.ui.test.beans.ImportBean;
@@ -37,6 +38,8 @@
suite.addTestSuite(RichFacesComponentTest.class);
suite.addTestSuite(JBIDE1579Test.class);
suite.addTestSuite(Jbide1580Test.class);
+ suite.addTestSuite(JBIDE1613Test.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/JBIDE1613Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1613Test.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1613Test.java 2008-01-16
11:51:18 UTC (rev 5734)
@@ -0,0 +1,65 @@
+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.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+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.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+
+public class JBIDE1613Test extends VpeTest {
+
+ public static final String IMPORT_PROJECT_NAME = "richFacesTest";
+
+ private static final String TEST_PAGE_NAME = "JBIDE/1613/JBIDE-1613.xhtml";
+
+ public JBIDE1613Test(String name) {
+ super(name);
+ }
+
+ public void testJBIDE_1613() throws Throwable{
+ // wait
+ TestUtil.waitForJobs();
+ // set exception
+ setException(null);
+
+ // get test page path
+ IFile file = (IFile) TestUtil.getComponentPath(
+ TEST_PAGE_NAME, IMPORT_PROJECT_NAME);
+
+ assertNotNull("Could not open specified file " + file.getFullPath(),
+ file);
+
+ IEditorInput input = new FileEditorInput(file);
+
+ assertNotNull("Editor input is null", input);
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
+
+ // get dom document
+ nsIDOMDocument document = getVpeVisualDocument(part);
+ nsIDOMElement element = document.getDocumentElement();
+
+ //check that element is not null
+ assertNotNull(element);
+
+ // get root node
+ nsIDOMNode node = (nsIDOMNode) element
+ .queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ // find "li" elements
+ TestUtil.findElementsByName(node, elements, HTML.TAG_LI);
+ assertEquals(1, elements.size());
+
+ }
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/jbide/JBIDE1613Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native