Author: estherbin
Date: 2008-05-29 08:54:21 -0400 (Thu, 29 May 2008)
New Revision: 8432
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columns.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columnsWithAttributes.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBox.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes2.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/fileUpload/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/fileUpload/fileUpload.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInput.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithStyleClassAttribute.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithValueAttribute.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceSelect/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceSelect/inplaceSelect.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList/pickList.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBar.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBarWithAttributes.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/CommonRichFacesTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesColumnsTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesFileUploadTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceSelectTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
Log:
Junits for
http://jira.jboss.com/jira/browse/JBIDE-2196
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF 2008-05-29
12:51:11 UTC (rev 8431)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF 2008-05-29
12:54:21 UTC (rev 8432)
@@ -4,7 +4,8 @@
Bundle-SymbolicName: org.jboss.tools.jsf.vpe.richfaces.test;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: org.jboss.tools.jsf.vpe.richfaces.test.RichFacesTestPlugin
-Require-Bundle: org.eclipse.ui,
+Require-Bundle: org.jboss.tools.jsf.vpe.richfaces,
+ org.eclipse.ui,
org.eclipse.core.runtime,
org.jboss.tools.vpe,
org.junit,
@@ -15,6 +16,7 @@
org.jboss.tools.common.text.ext,
org.jboss.tools.common.model,
org.jboss.tools.vpe.xulrunner,
+ org.jboss.tools.jsf.vpe.richfaces,
org.mozilla.xpcom,
org.jboss.tools.vpe.ui.test
Eclipse-LazyStart: true
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columns.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columns.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columns.xhtml 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,16 @@
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+ <!-- ComboBox -->
+ <rich:columns value="#{bean.value}">
+ </rich:columns>
+</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/columns/columns.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columnsWithAttributes.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columnsWithAttributes.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns/columnsWithAttributes.xhtml 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,17 @@
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+<!-- ComboBox -->
+<rich:columns value="#{bean.value}" width="52px"
+ style="text-align:center" styleClass="myClass"
var="myVar">
+</rich:columns>
+</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/columns/columnsWithAttributes.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBox.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBox.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBox.xhtml 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,15 @@
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+ <!-- ComboBox -->
+ <rich:comboBox/>
+</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/comboBox/comboBox.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes.xhtml 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,16 @@
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+ <!-- ComboBox -->
+ <rich:comboBox value="#{bean.value}" defaultLabel="Select Any
Value" style="width:250px"/>
+
+</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/comboBox/comboBoxWithAttributes.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes2.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes2.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/comboBox/comboBoxWithAttributes2.xhtml 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,16 @@
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+ <!-- ComboBox -->
+ <rich:comboBox value="#{bean.value}" style="width:255px"/>
+
+</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/comboBox/comboBoxWithAttributes2.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/fileUpload/fileUpload.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/fileUpload/fileUpload.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/fileUpload/fileUpload.xhtml 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,16 @@
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+ <!-- DataDefenitionList -->
+ <rich:fileUpload/>
+
+</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/fileUpload/fileUpload.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInput.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInput.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInput.xhtml 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,14 @@
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+ <rich:inplaceInput></rich:inplaceInput>
+</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/inplaceInput/inplaceInput.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithStyleClassAttribute.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithStyleClassAttribute.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithStyleClassAttribute.xhtml 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,15 @@
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+ <!-- ComboBox -->
+ <rich:inplaceInput value="#{person.name}"
styleClass="myStyleClass"/>
+</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/inplaceInput/inplaceInputWithStyleClassAttribute.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithValueAttribute.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithValueAttribute.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceInput/inplaceInputWithValueAttribute.xhtml 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,15 @@
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+ <!-- ComboBox -->
+ <rich:inplaceInput value="#{person.name}"/>
+</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/inplaceInput/inplaceInputWithValueAttribute.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceSelect/inplaceSelect.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceSelect/inplaceSelect.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/inplaceSelect/inplaceSelect.xhtml 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,15 @@
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+
+ <rich:inplaceSelect/>
+</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/inplaceSelect/inplaceSelect.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList/pickList.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList/pickList.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList/pickList.xhtml 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,15 @@
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+ <!-- PickList -->
+ <rich:pickList/>
+</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/pickList/pickList.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBar.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBar.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBar.xhtml 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,14 @@
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+ <rich:progressBar/>
+</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/progressBar/progressBar.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBarWithAttributes.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBarWithAttributes.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/progressBar/progressBarWithAttributes.xhtml 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,14 @@
+<!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:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+<head>
+</head>
+<body>
+ <rich:progressBar styleClass="myStyleClass" value="#{bean.value}"
style="width:250px;"/>
+</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/progressBar/progressBarWithAttributes.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/CommonRichFacesTestCase.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/CommonRichFacesTestCase.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/CommonRichFacesTestCase.java 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,104 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+
+package org.jboss.tools.jsf.vpe.richfaces.test;
+
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.VpeEditorPart;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.jboss.tools.vpe.xulrunner.editor.XulRunnerEditor;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+
+
+/**
+ * The Class CommonRichFacesTestCase.
+ *
+ * @author Eugene Stherbin
+ */
+public abstract class CommonRichFacesTestCase extends VpeTest {
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public CommonRichFacesTestCase(String name) {
+ super(name);
+ setCheckWarning(false);
+ }
+
+ /**
+ * get xulrunner source page.
+ *
+ * @param part - JSPMultiPageEditor
+ *
+ * @return nsIDOMDocument
+ */
+ protected nsIDOMDocument getVpeVisualDocument(JSPMultiPageEditor part) {
+
+ VpeEditorPart visualEditor = (VpeEditorPart) part.getVisualEditor();
+
+ VpeController vpeController = visualEditor.getController();
+
+ // get xulRunner editor
+ XulRunnerEditor xulRunnerEditor = vpeController.getXulRunnerEditor();
+
+ // get dom document
+ nsIDOMDocument document = xulRunnerEditor.getDOMDocument();
+
+ return document;
+ }
+
+ /**
+ * Perform test for rich faces component.
+ *
+ * @param componentPage the component page
+ *
+ * @return the ns IDOM element
+ *
+ * @throws Throwable the throwable
+ */
+ protected nsIDOMElement performTestForRichFacesComponent(IFile componentPage) throws
Throwable {
+ nsIDOMElement rst = null;
+ TestUtil.waitForJobs();
+
+ setException(null);
+
+ // IFile file = (IFile)
+ // TestUtil.getComponentPath(componentPage,getImportProjectName());
+ IEditorInput input = new FileEditorInput(componentPage);
+
+ TestUtil.waitForJobs();
+ //
+ JSPMultiPageEditor editor = (JSPMultiPageEditor)
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(
+ input, EDITOR_ID, true);
+
+ // get dom document
+ nsIDOMDocument document = getVpeVisualDocument(editor);
+ rst = document.getDocumentElement();
+ // check that element is not null
+ assertNotNull(rst);
+ return rst;
+ }
+
+ void fail(Throwable t){
+ fail("Test case was fail "+t.getMessage()+":"+t);
+ }
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/CommonRichFacesTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
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-05-29
12:51:11 UTC (rev 8431)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2008-05-29
12:54:21 UTC (rev 8432)
@@ -49,6 +49,14 @@
suite.addTestSuite(Jbide1682Test.class);
suite.addTestSuite(Jbide1548Test.class);
suite.addTestSuite(JBIDE1713Test.class);
+ //
+ suite.addTestSuite(RichFacesComboBoxTemplateTestCase.class);
+ suite.addTestSuite(RichFacesInplaceInputTemplateTestCase.class);
+ suite.addTestSuite(RichFacesInplaceSelectTemplateTestCase.class);
+ suite.addTestSuite(RichFacesProgressBarTemplateTestCase.class);
+ suite.addTestSuite(RichFacesFileUploadTemplateTestCase.class);
+ suite.addTestSuite(RichFacesColumnsTemplateTestCase.class);
+ suite.addTestSuite(RichFacesPickListTemplateTestCase.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/RichFacesColumnsTemplateTestCase.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesColumnsTemplateTestCase.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesColumnsTemplateTestCase.java 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,92 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+
+package org.jboss.tools.jsf.vpe.richfaces.test;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+
+
+/**
+ * Test case for testing <rich:columns>.
+ *
+ * @author Eugene Stherbin
+ */
+public class RichFacesColumnsTemplateTestCase extends CommonRichFacesTestCase {
+
+ /** The Constant COLUMNS_WITH_ATTRIBUTES. */
+ private static final String COLUMNS_WITH_ATTRIBUTES =
"components/columns/columnsWithAttributes.xhtml";
+
+ /** The Constant COMPONENTS_COLUMNS_COLUMNS_XHTML. */
+ private static final String COMPONENTS_COLUMNS_COLUMNS_XHTML =
"components/columns/columns.xhtml";
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public RichFacesColumnsTemplateTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Test columns with attributes.
+ */
+ public void testColumnsWithAttributes() {
+ try {
+ final nsIDOMElement rst = performTestForRichFacesComponent((IFile)
TestUtil.getComponentPath(COLUMNS_WITH_ATTRIBUTES,
+ RichFacesComponentTest.IMPORT_PROJECT_NAME));
+
+ final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_TD);
+
+ nsIDOMElement divOne = (nsIDOMElement)
elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Style class should be equals", "dr-table-cell
rich-table-cell myClass", divOne.getAttribute(HTML.ATTR_CLASS));
+ assertEquals("Style should be equals ", "text-align:
center;", divOne.getAttribute(HTML.ATTR_STYLE));
+ assertTrue("Style should contains of 52 value ",
divOne.getAttribute("width").contains("52"));
+ } catch (CoreException e) {
+ fail(e.getMessage() + ":" + e);
+ } catch (Throwable e) {
+ fail(e.getMessage() + ":" + e);
+ }
+ }
+
+ /**
+ * Test simple columns.
+ */
+ public void testSimpleColumns() {
+ try {
+ final nsIDOMElement rst = performTestForRichFacesComponent((IFile)
TestUtil.getComponentPath(COMPONENTS_COLUMNS_COLUMNS_XHTML,
+ RichFacesComponentTest.IMPORT_PROJECT_NAME));
+
+ final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_TD);
+
+ nsIDOMElement divOne = (nsIDOMElement)
elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Style class should be equals", "dr-table-cell
rich-table-cell", divOne.getAttribute(HTML.ATTR_CLASS));
+ } catch (CoreException e) {
+ fail(e.getMessage() + ":" + e);
+ } catch (Throwable e) {
+ fail(e.getMessage() + ":" + e);
+ }
+ }
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesColumnsTemplateTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,182 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+
+package org.jboss.tools.jsf.vpe.richfaces.test;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.PartInitException;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+
+
+/**
+ * Test case for testing {@link RichFacesComboBoxTemplateTestCase} class.
+ *
+ * @author Eugene Stherbin
+ */
+public class RichFacesComboBoxTemplateTestCase extends CommonRichFacesTestCase {
+
+ /** The Constant _150PX. */
+ private static final String _150PX = "150px";
+
+ /** The Constant _250PX. */
+ private static final String _250PX = "250px";
+
+ /** The Constant _255PX. */
+ private static final String _255PX = "255px";
+
+ /** The Constant COMPONENTS_COMBO_BOX_WITHOUT_ATTR. */
+ private static final String COMPONENTS_COMBO_BOX_WITHOUT_ATTR =
"components/comboBox/comboBox.xhtml";
+
+ /** The Constant COMPONENTS_COMBO_WITH_ATTR_TEMPLATE. */
+ private static final String COMPONENTS_COMBO_WITH_ATTR_TEMPLATE =
"components/comboBox/comboBoxWithAttributes.xhtml";
+
+ /** The Constant COMPONENTS_COMBO_WITH_ATTR_TEMPLATE2. */
+ private static final String COMPONENTS_COMBO_WITH_ATTR_TEMPLATE2 =
"components/comboBox/comboBoxWithAttributes2.xhtml";
+
+ /** DEFAULT_INPUT_STYLE. */
+ private static final String DEFAULT_INPUT_STYLE = "rich-combobox-font-disabled
rich-combobox-input-inactive";
+
+ /** The Constant DEFAULT_WIDTH. */
+ private static final String DEFAULT_WIDTH = "width: 150px;";
+
+ /** The Constant EL_VALUE. */
+ private static final String EL_VALUE = "#{bean.value}";
+
+ /** The Constant SELECT_ANY_VALUE. */
+ private static final String SELECT_ANY_VALUE = "Select Any Value";
+
+ /** The Constant ZERO. */
+ private static final int ZERO = 0;
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public RichFacesComboBoxTemplateTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Base table check.
+ *
+ * @param width the width
+ * @param page the page
+ *
+ * @return the ns IDOM element
+ *
+ * @throws Throwable the throwable
+ * @throws PartInitException the part init exception
+ */
+ private nsIDOMElement baseTableCheck(String page, String width) throws
PartInitException, Throwable {
+ final nsIDOMElement rst = performTestForRichFacesComponent((IFile)
TestUtil.getComponentPath(page,
+ RichFacesComponentTest.IMPORT_PROJECT_NAME));
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ // find "td" elements
+
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_DIV);
+ for(nsIDOMNode e:elements){
+ nsIDOMElement div = (nsIDOMElement)
e.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
System.err.println(div.getNodeName()+":"+div.getAttribute(HTML.ATTR_CLASS));
+ }
+
+// assertEquals("Size should be 5", 5, elements.size());
+
+ nsIDOMElement divOne = (nsIDOMElement)
elements.get(4).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ assertTrue("Style classes should be contains
",divOne.getAttribute(HTML.ATTR_CLASS).contains("rich-combobox-font
rich-combobox"));
+ assertTrue("Defaule style should be contains " + DEFAULT_WIDTH,
divOne.getAttribute(HTML.ATTR_STYLE).indexOf("150") > 1);
+ assertTrue("Defaule style should be contains " + DEFAULT_WIDTH,
divOne.getAttribute(HTML.ATTR_STYLE).startsWith("width"));
+ // Check input
+
+ return rst;
+ }
+
+ /**
+ * Check value in input.
+ *
+ * @param inputValue the input value
+ * @param rst the rst
+ */
+ private void checkValueInInput(final nsIDOMElement rst, String inputValue) {
+ final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_INPUT);
+
+ assertEquals("Size should be equals 2", 3, elements.size());
+ final nsIDOMElement input = (nsIDOMElement)
elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ assertEquals("Value should be equals " + inputValue, inputValue,
input.getAttribute(HTML.ATTR_VALUE));
+ }
+
+ /**
+ * Test combo box with attributes.
+ *
+ * @throws Throwable the throwable
+ * @throws PartInitException the part init exception
+ */
+ public void testComboBoxWithAttributes() throws PartInitException, Throwable {
+ final nsIDOMElement rst = baseTableCheck(COMPONENTS_COMBO_WITH_ATTR_TEMPLATE,
_250PX);
+
+ checkValueInInput(rst, SELECT_ANY_VALUE);
+
+ }
+
+ /**
+ * Test combo box with attributes2.
+ *
+ * @throws Throwable the throwable
+ * @throws PartInitException the part init exception
+ */
+ public void testComboBoxWithAttributes2() throws PartInitException, Throwable {
+ final nsIDOMElement rst = baseTableCheck(COMPONENTS_COMBO_WITH_ATTR_TEMPLATE2,
_255PX);
+
+ checkValueInInput(rst, EL_VALUE);
+
+ }
+
+ /**
+ * Test combo box.
+ *
+ * @throws PartInitException the part init exception
+ * @throws Throwable the throwable
+ */
+ public void testComboBoxWithoutAttributes() throws PartInitException, Throwable {
+
+ final nsIDOMElement rst = baseTableCheck(COMPONENTS_COMBO_BOX_WITHOUT_ATTR,
_150PX);
+ final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_INPUT);
+
+ assertEquals("Size should be equals 2", 3, elements.size());
+
+ final nsIDOMElement input = (nsIDOMElement)
elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Default input class should be equals " +
DEFAULT_INPUT_STYLE, input.getAttribute(HTML.ATTR_CLASS),
+ DEFAULT_INPUT_STYLE);
+// assertEquals("Input style style should be empty", "",
input.getAttribute(HTML.ATTR_STYLE));
+// assertEquals("Input type should be text", HTML.VALUE_TEXT_TYPE,
input.getAttribute(HTML.ATTR_TYPE));
+// assertEquals("Input size should be " + String.valueOf(10),
String.valueOf(10), input.getAttribute(HTML.ATTR_SIZE));
+//
+// final nsIDOMElement img = (nsIDOMElement)
elements.get(1).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+// assertTrue("Shoul contains of image path ",
img.getAttribute("src").indexOf("\\comboBox\\down.gif") > 1);
+
+ }
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComboBoxTemplateTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesFileUploadTemplateTestCase.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesFileUploadTemplateTestCase.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesFileUploadTemplateTestCase.java 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,42 @@
+
+
+package org.jboss.tools.jsf.vpe.richfaces.test;
+
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.PartInitException;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+
+
+/**
+ * Test case for testing {@link RichFacesFileUploadTemplateTestCase}.
+ *
+ * @author Eugene Stherbin
+ */
+public class RichFacesFileUploadTemplateTestCase extends CommonRichFacesTestCase {
+
+ /** The Constant COMPONENTS_FILE_UPLOAD_FILE_UPLOAD_BASE. */
+ private static final String COMPONENTS_FILE_UPLOAD_FILE_UPLOAD_BASE =
"components/fileUpload/fileUpload.xhtml";
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public RichFacesFileUploadTemplateTestCase(String name) {
+ super(name);
+ setCheckWarning(false);
+ }
+
+ /**
+ * Test file upload.
+ *
+ * @throws PartInitException the part init exception
+ * @throws Throwable the throwable
+ */
+ public void testBaseFileUpload() throws PartInitException, Throwable {
+ performTestForVpeComponent((IFile)
TestUtil.getComponentPath(COMPONENTS_FILE_UPLOAD_FILE_UPLOAD_BASE,
+ RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ }
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesFileUploadTemplateTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+
+package org.jboss.tools.jsf.vpe.richfaces.test;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+
+
+/**
+ * Test case for testing <rich:inplaceInput/> template.
+ *
+ * @author Eugene Stherbin
+ */
+public class RichFacesInplaceInputTemplateTestCase extends CommonRichFacesTestCase {
+
+ /** The Constant EL_VALUE. */
+ private static final String EL_VALUE = "#{person.name}";
+
+ /** The Constant MY_STYLE_CLASS. */
+ private static final String MY_STYLE_CLASS = "myStyleClass";
+
+ /** The Constant NULL. */
+ private static final String NULL = "null";
+
+ /** The Constant RICH_INPLACE_VIEW. */
+ private static final String RICH_INPLACE_VIEW = "rich-inplace
rich-inplace-view";
+
+ /** The Constant TEMPLATE_WITH_EMPTY_TAG. */
+ private static final String TEMPLATE_WITH_EMPTY_TAG =
"components/inplaceInput/inplaceInput.xhtml";
+
+ /** The Constant TEMPLATE_WITH_VALUE_AND_STYLE_CLASS. */
+ private static final String TEMPLATE_WITH_VALUE_AND_STYLE_CLASS =
"components/inplaceInput/inplaceInputWithStyleClassAttribute.xhtml";
+
+ /** The Constant TEMPLATE_WITH_VALUE_ATTR. */
+ private static final String TEMPLATE_WITH_VALUE_ATTR =
"components/inplaceInput/inplaceInputWithValueAttribute.xhtml";
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public RichFacesInplaceInputTemplateTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Base check.
+ *
+ * @param styleClass the style class
+ * @param value the value
+ * @param page the page
+ *
+ * @throws CoreException the core exception
+ * @throws Throwable the throwable
+ */
+ private void baseCheck(String page, String value, String styleClass) throws
Throwable, CoreException {
+ final nsIDOMElement rst = performTestForRichFacesComponent((IFile)
TestUtil.getComponentPath(page,
+ RichFacesComponentTest.IMPORT_PROJECT_NAME));
+
+ List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_SPAN);
+
+ assertEquals("Count of items should be 1", 1, elements.size());
+
+ final nsIDOMElement element = (nsIDOMElement)
elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Text value should be equals 'null'", value,
element.getFirstChild().getNodeValue());
+
+ assertTrue("Style class should be equals " + styleClass,
element.getAttribute(HTML.ATTR_CLASS).contains(styleClass));
+ }
+
+ /**
+ * Test inplace input without attributes.
+ *
+ * @throws CoreException the core exception
+ * @throws Throwable the throwable
+ */
+ public void testInplaceInputWithoutAttributes() throws CoreException, Throwable {
+ baseCheck(TEMPLATE_WITH_EMPTY_TAG, NULL, RICH_INPLACE_VIEW);
+
+ }
+
+ /**
+ * Test inplace input with value.
+ *
+ * @throws CoreException the core exception
+ * @throws Throwable the throwable
+ */
+ public void testInplaceInputWithValue() throws CoreException, Throwable {
+ baseCheck(TEMPLATE_WITH_VALUE_ATTR, EL_VALUE, RICH_INPLACE_VIEW);
+
+ }
+
+ /**
+ * Test inplace input with value and style.
+ *
+ * @throws CoreException the core exception
+ * @throws Throwable the throwable
+ */
+ public void testInplaceInputWithValueAndStyle() throws CoreException, Throwable {
+ baseCheck(TEMPLATE_WITH_VALUE_AND_STYLE_CLASS, EL_VALUE, MY_STYLE_CLASS);
+
+ }
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceInputTemplateTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceSelectTemplateTestCase.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceSelectTemplateTestCase.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceSelectTemplateTestCase.java 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+
+package org.jboss.tools.jsf.vpe.richfaces.test;
+
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.PartInitException;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+
+
+/**
+ * The Class RichFacesInplaceSelectTemplateTestCase.
+ *
+ * @author Eugene Stherbin
+ */
+public class RichFacesInplaceSelectTemplateTestCase extends CommonRichFacesTestCase {
+
+ /** The Constant COMPONENTS_INPLACE_SELECT_INPLACE_SELECT_XHTML. */
+ private static final String COMPONENTS_INPLACE_SELECT_INPLACE_SELECT_XHTML =
"components/inplaceSelect/inplaceSelect.xhtml";
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public RichFacesInplaceSelectTemplateTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Test simple.
+ *
+ * @throws CoreException the core exception
+ * @throws PartInitException the part init exception
+ * @throws Throwable the throwable
+ */
+ public void testSimple() throws PartInitException, CoreException, Throwable {
+ performTestForVpeComponent((IFile)
TestUtil.getComponentPath(COMPONENTS_INPLACE_SELECT_INPLACE_SELECT_XHTML,
+ RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ }
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesInplaceSelectTemplateTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+
+package org.jboss.tools.jsf.vpe.richfaces.test;
+
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+
+
+/**
+ * Test case for testing <rich:pickList/> component.
+ *
+ * @author Eugene Stherbin
+ */
+public class RichFacesPickListTemplateTestCase extends CommonRichFacesTestCase {
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public RichFacesPickListTemplateTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Test simple pick list.
+ */
+ public void testSimplePickList() {
+ nsIDOMElement rst;
+ try {
+ rst = performTestForRichFacesComponent((IFile)
TestUtil.getComponentPath("components/pickList/pickList.xhtml",
+ RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_TABLE);
+ assertEquals("Count of tables should be 3", 3, elements.size());
+ nsIDOMElement tableOne = (nsIDOMElement)
elements.get(0).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Style class should be equals",
"rich-list-picklist", tableOne.getAttribute(HTML.ATTR_CLASS));
+ assertEquals("Style should be empty", "",
tableOne.getAttribute(HTML.ATTR_STYLE));
+ elements.clear();
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_DIV);
+ assertEquals("Count of divs should be 18", 18, elements.size());
+
+ elements.clear();
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_IMG);
+ assertEquals("Count of divs should be 18", 4, elements.size());
+
+ } catch (CoreException e) {
+ fail(e);
+ } catch (Throwable e) {
+ fail(e);
+ }
+
+ }
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesPickListTemplateTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java 2008-05-29
12:54:21 UTC (rev 8432)
@@ -0,0 +1,117 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+
+package org.jboss.tools.jsf.vpe.richfaces.test;
+
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
+
+
+/**
+ * Test case for testing <rich:progressBar/> component.
+ *
+ * @author Eugene Stherbin
+ */
+public class RichFacesProgressBarTemplateTestCase extends CommonRichFacesTestCase {
+
+ /** The Constant CHECK_BASE_STYLE. */
+ private static final String CHECK_BASE_STYLE = "rich-progress-bar-block
rich-progress-bar-width rich-progress-bar-shell";
+
+ /** The Constant MY_STYLE_CLASS. */
+ private static final String MY_STYLE_CLASS = " myStyleClass";
+
+ /** The Constant PERCENTAGES. */
+ private static final String PERCENTAGES = " 60%;";
+
+ /** The Constant SIMPLE_PAGE. */
+ private static final String SIMPLE_PAGE =
"/components/progressBar/progressBar.xhtml";
+
+ /** The Constant SIMPLE_WITH_ATTRIBUTES. */
+ private static final String SIMPLE_WITH_ATTRIBUTES =
"/components/progressBar/progressBarWithAttributes.xhtml";
+
+ /** The Constant STYLE_1_FOR_CHECK. */
+ private static final String STYLE_1_FOR_CHECK = "width: 250px; text-align:
left;";
+
+ /** The Constant STYLE_CLASS_2. */
+ private static final String STYLE_CLASS_2 = "rich-progress-bar-height
rich-progress-bar-uploaded null";
+
+ /**
+ * The Constructor.
+ *
+ * @param name the name
+ */
+ public RichFacesProgressBarTemplateTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Base test.
+ *
+ * @param styleClass the style class
+ * @param page the page
+ * @param style the style
+ * @param twoStyleClass the two style class
+ * @param style2 the style2
+ */
+ private void baseTest(String page, String styleClass, String style, String
twoStyleClass, String style2) {
+ nsIDOMElement rst = null;
+
+ try {
+ rst = performTestForRichFacesComponent((IFile)
TestUtil.getComponentPath(page, RichFacesComponentTest.IMPORT_PROJECT_NAME));
+ } catch (CoreException e) {
+ fail(e.getMessage() + e);
+ } catch (Throwable e) {
+ fail(e.getMessage() + e);
+ }
+
+ final List<nsIDOMNode> elements = new ArrayList<nsIDOMNode>();
+ TestUtil.findAllElementsByName(rst, elements, HTML.TAG_DIV);
+
+ assertEquals("Size should be 2", 5, elements.size());
+ final nsIDOMElement divOne = (nsIDOMElement)
elements.get(3).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Style class should be equals" + styleClass, styleClass,
divOne.getAttribute(HTML.ATTR_CLASS));
+ assertEquals("Style should be equals" + style, style,
divOne.getAttribute(HTML.ATTR_STYLE));
+
+ final nsIDOMElement divTwo = (nsIDOMElement)
elements.get(4).queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ assertEquals("Style class should be equals" + twoStyleClass,
twoStyleClass, divTwo.getAttribute(HTML.ATTR_CLASS));
+ assertEquals("Style should be equals" + style2, style2,
divTwo.getAttribute(HTML.ATTR_STYLE));
+
+ }
+
+ /**
+ * Test simple.
+ */
+ public void testSimple() {
+ baseTest(SIMPLE_PAGE, CHECK_BASE_STYLE, "text-align: left;",
STYLE_CLASS_2,VpeStyleUtil.PARAMETER_WIDTH
+ + VpeStyleUtil.COLON_STRING + PERCENTAGES);
+ }
+
+ /**
+ * Test with attributes.
+ */
+ public void testWithAttributes() {
+ baseTest(SIMPLE_WITH_ATTRIBUTES, CHECK_BASE_STYLE + MY_STYLE_CLASS,
STYLE_1_FOR_CHECK,
+ STYLE_CLASS_2,VpeStyleUtil.PARAMETER_WIDTH
+ + VpeStyleUtil.COLON_STRING + PERCENTAGES);
+ }
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesProgressBarTemplateTestCase.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native