Author: yradtsevich
Date: 2009-02-02 11:44:23 -0500 (Mon, 02 Feb 2009)
New Revision: 13426
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/queue.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp.xml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTldVersionCheck.java
Log:
RESOLVED - issue JBIDE-3682: Move JUnit tests of VPE to RichFaces 3.3.0
https://jira.jboss.org/jira/browse/JBIDE-3682
- Now if a TLD-file is not found, the last version of the library is assumed
- JUnit tests for rich:editor and a4j:queue have been added
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/queue.jsp
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/queue.jsp
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/resources/ajax4jsfTests/WebContent/pages/components/queue.jsp 2009-02-02
16:44:23 UTC (rev 13426)
@@ -0,0 +1,16 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<%@ taglib
uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
+
+<html>
+<head>
+</head>
+<body>
+<f:view>
+<h:form>
+ <a4j:queue id="a4jQueue"/>
+</h:form>
+</f:view>
+</body>
+</html>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java 2009-02-02
14:54:33 UTC (rev 13425)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.ajax4jsf.test/src/org/jboss/tools/jsf/vpe/ajax4jsf/test/Ajax4JsfComponentContentTest.java 2009-02-02
16:44:23 UTC (rev 13426)
@@ -86,6 +86,11 @@
performInvisibleTagTest("components/push.xhtml", "push");
//$NON-NLS-1$ //$NON-NLS-2$
}
+ public void testQueue() throws Throwable {
+ performInvisibleTagTest(
+ "components/queue.jsp", "a4jQueue"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
public void _testRegion() throws Throwable {
performContentTest("components/region.xhtml");//$NON-NLS-1$
}
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp 2009-02-02
16:44:23 UTC (rev 13426)
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib
uri="http://richfaces.org/rich" prefix="rich" %>
+
+<html>
+<head>
+</head>
+<body>
+<f:view>
+<h:form>
+ <rich:editor id="richEditor"/>
+</h:form>
+</f:view>
+
+</body>
+</html>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/editor.jsp.xml 2009-02-02
16:44:23 UTC (rev 13426)
@@ -0,0 +1,33 @@
+<tests>
+ <test id="richEditor">
+ <SPAN CLASS="richfacesSimpleSkin" STYLE="display: table;">
+ <TABLE CELLSPACING="0" CELLPADDING="0"
CLASS="mceLayout"
+ STYLE="width: 400px; height: 300px;">
+ <TR STYLE="height: 100%;">
+ <TD>
+ <DIV CLASS="mceIframeContainer" STYLE="height: 100%;">
+ <TABLE BORDER="0" STYLE="width: 100%; height: 100%;">
+ <TR>
+ <TD>
+ </TD>
+ </TR>
+ </TABLE>
+ </DIV>
+ </TD>
+ </TR>
+ <TR>
+ <TD CLASS="mceToolbar">
+ <TABLE CELLSPACING="0" CELLPADDING="0"
CLASS="mceToolbarTable">
+ <TR>
+ <TD>
+ <DIV CLASS="mce_panel">
+ </DIV>
+ </TD>
+ </TR>
+ </TABLE>
+ </TD>
+ </TR>
+ </TABLE>
+ </SPAN>
+ </test>
+</tests>
\ No newline at end of file
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2009-02-02
14:54:33 UTC (rev 13425)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentContentTest.java 2009-02-02
16:44:23 UTC (rev 13426)
@@ -251,6 +251,10 @@
performContentTest("components/progressBar.xhtml");//$NON-NLS-1$
}
+ public void testEditor() throws Throwable {
+ performContentTest("components/editor.jsp"); //$NON-NLS-1$
+ }
+
public void testScrollableDataTable() throws Throwable {
performContentTest("components/scrollableDataTable.xhtml");//$NON-NLS-1$
}
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTldVersionCheck.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTldVersionCheck.java 2009-02-02
14:54:33 UTC (rev 13425)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/expression/VpeFunctionTldVersionCheck.java 2009-02-02
16:44:23 UTC (rev 13426)
@@ -90,7 +90,7 @@
String tldVersion = TLDVersionHelper.getTldVersion(sourceNodeTaglib.getUri(),
sourceNodeTaglib.getPrefix(),
pageContext.getSourceBuilder().getStructuredTextViewer().getDocument());
- double tldVersionNumber =0;
+ double tldVersionNumber;
if(tldVersion!=null) {
tldVersionNumber = stringVersionToDouble(tldVersion);
@@ -116,7 +116,9 @@
tldVersionNumber = stringVersionToDouble(tldVersion);
} else {
- tldVersionNumber = 0;
+ // if the version of the TLD-file is not specified or the file is not found
+ // then assume it is the last version
+ tldVersionNumber = Double.MAX_VALUE;
}
}
if((startValue<=tldVersionNumber)&&