Author: dmaliarevich
Date: 2009-06-12 07:32:24 -0400 (Fri, 12 Jun 2009)
New Revision: 15921
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithTaglibs.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithTaglibs.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithoutTaglibs.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithoutTaglibs.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentContentTest.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsAllTests.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/jbide/JBIDE3416Test.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4398, JUnits for ui:composite were added.
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithTaglibs.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithTaglibs.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithTaglibs.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithTaglibs.xhtml.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithTaglibs.xhtml.xml 2009-06-12
11:32:24 UTC (rev 15921)
@@ -0,0 +1,58 @@
+<tests>
+ <test id="id3">
+ <DIV VPE:INCLUDE-ELEMENT="yes">
+ <DIV>
+ <DIV STYLE="display: none; -moz-user-modify: read-only;">
+ <H1>
+ </H1>
+ </DIV>
+ <DIV>
+ <TABLE WIDTH="400" CELLSPACING="0" CELLPADDING="0"
BORDER="0"
+ ALIGN="center"
+ STYLE="border: 1px solid rgb(202, 214, 224); -moz-user-modify:
read-only;">
+ <TBODY>
+ <TR>
+ <TD WIDTH="100%" VALIGN="middle" HEIGHT="42"
BGCOLOR="#e4ebeb"
+ ALIGN="center" CLASS="header">
+ <SPAN CLASS="vpe-text">
+ Greeting Page
+</SPAN>
+ </TD>
+ </TR>
+ <TR>
+ <TD WIDTH="100%" HEIGHT="1" BGCOLOR="#cad6e0"
ALIGN="center">
+ <SPAN CLASS="vpe-text">
+ #{user}
+</SPAN>
+ </TD>
+ </TR>
+ <TR>
+ <TD WIDTH="100%" COLSPAN="2">
+ <TABLE WIDTH="100%" CELLSPACING="0"
CELLPADDING="0"
+ BORDER="0" ALIGN="left" STYLE="height: 150px;
-moz-user-modify: read-only;">
+ <TBODY>
+ <TR>
+ <TD WIDTH="100%" VALIGN="middle"
ALIGN="center">
+ <SPAN CLASS="vpe-text">
+ #{msg.greeting} #{person.name}!
+</SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </TD>
+ </TR>
+ <TR>
+ <TD WIDTH="100%" VALIGN="bottom" HEIGHT="1"
BGCOLOR="#cad6e0"
+ COLSPAN="2">
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
+
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </DIV>
+ </DIV>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithTaglibs.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithoutTaglibs.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithoutTaglibs.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithoutTaglibs.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithoutTaglibs.xhtml.xml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithoutTaglibs.xhtml.xml 2009-06-12
11:32:24 UTC (rev 15921)
@@ -0,0 +1,34 @@
+<tests>
+ <test id="id2">
+ <SPAN>
+ THIS SHOULD BE VISIBLE:
+ </SPAN>
+ </test>
+ <test id="id3">
+
+ <DIV CLASS="__any__tag__caption" STYLE="border: 1px solid green;
-moz-user-modify: read-only;">
+ ui:composition
+ <DIV CLASS="__any__tag__caption"
+ STYLE="border: 1px solid green; -moz-user-modify: read-only;">
+ ui:define
+ <SPAN CLASS="vpe-text">
+ Greeting to User
+</SPAN>
+ </DIV>
+ <DIV CLASS="__any__tag__caption"
+ STYLE="border: 1px solid green; -moz-user-modify: read-only;">
+ ui:define
+ <SPAN CLASS="vpe-text">
+ Greeting Page
+</SPAN>
+ </DIV>
+ <DIV CLASS="__any__tag__caption"
+ STYLE="border: 1px solid green; -moz-user-modify: read-only;">
+ ui:define
+ <SPAN CLASS="vpe-text">
+ Hello #{person.name}!
+</SPAN>
+ </DIV>
+ </DIV>
+ </test>
+</tests>
\ No newline at end of file
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithoutTaglibs.xhtml.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsAllTests.java 2009-06-12
08:24:44 UTC (rev 15920)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsAllTests.java 2009-06-12
11:32:24 UTC (rev 15921)
@@ -22,6 +22,9 @@
public class FaceletsAllTests {
+ // import project name
+ public static final String IMPORT_PROJECT_NAME = "faceletsTest";
//$NON-NLS-1$
+
public static Test suite() {
TestSuite suite = new TestSuite("Tests for Vpe Facelets components");
@@ -29,11 +32,12 @@
suite.addTestSuite(FaceletsComponentTest.class);
suite.addTestSuite(JBIDE3416Test.class);
+ suite.addTestSuite(FaceletsComponentContentTest.class);
// $JUnit-END$
List<ImportBean> importProjects = new ArrayList<ImportBean>();
ImportBean importBean = new ImportBean();
- importBean.setImportProjectName(FaceletsComponentTest.IMPORT_PROJECT_NAME);
+ importBean.setImportProjectName(IMPORT_PROJECT_NAME);
importBean.setImportProjectPath(FaceletsTestPlugin.getPluginResourcePath());
importProjects.add(importBean);
return new VpeTestSetup(suite,importProjects);
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentContentTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentContentTest.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentContentTest.java 2009-06-12
11:32:24 UTC (rev 15921)
@@ -0,0 +1,29 @@
+package org.jboss.tools.jsf.vpe.facelets.test;
+
+import org.jboss.tools.vpe.ui.test.ComponentContentTest;
+
+public class FaceletsComponentContentTest extends ComponentContentTest {
+
+
+ /**
+ * Constructor
+ */
+ public FaceletsComponentContentTest(String name) {
+ super(name);
+ setCheckWarning(false);
+ }
+
+ public void testCompositionWithTaglibs() throws Throwable {
+ performContentTest("components/compositionWithTaglibs.xhtml");//$NON-NLS-1$
+ }
+
+ public void testCompositionWithoutTaglibs() throws Throwable {
+ performContentTest("components/compositionWithoutTaglibs.xhtml");//$NON-NLS-1$
+ }
+
+ @Override
+ protected String getTestProjectName() {
+ return FaceletsAllTests.IMPORT_PROJECT_NAME;
+ }
+
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentContentTest.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.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2009-06-12
08:24:44 UTC (rev 15920)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/FaceletsComponentTest.java 2009-06-12
11:32:24 UTC (rev 15921)
@@ -39,8 +39,6 @@
private static final String TEMPLATE_WITH_RELATED_PATH_IS_NOT_INCLUDED =
"Template with related path is not included"; //$NON-NLS-1$
private static final String TEMPLATE_WITH_ABSOLUTE_PATH_IS_NOT_INCLUDED =
"Template with absolute path is not included"; //$NON-NLS-1$
private static final String DEFINED_CONTENT_IS_NOT_SHOWN = "Defined content is
not shown"; //$NON-NLS-1$
- // import project name
- public static final String IMPORT_PROJECT_NAME = "faceletsTest";
//$NON-NLS-1$
public FaceletsComponentTest(String name) {
super(name);
@@ -320,7 +318,7 @@
*/
public void testInsert() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/insert.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/insert.xhtml", FaceletsAllTests.IMPORT_PROJECT_NAME));
//$NON-NLS-1$
}
/**
@@ -337,10 +335,10 @@
// get test page path
IFile file = (IFile) TestUtil.getComponentPath(componentPage,
- IMPORT_PROJECT_NAME);
+ FaceletsAllTests.IMPORT_PROJECT_NAME);
assertNotNull("Could not open specified file. componentPage = " +
componentPage//$NON-NLS-1$
- + ";projectName = " + IMPORT_PROJECT_NAME, file);//$NON-NLS-1$
+ + ";projectName = " + FaceletsAllTests.IMPORT_PROJECT_NAME,
file);//$NON-NLS-1$
IEditorInput input = new FileEditorInput(file);
@@ -421,7 +419,7 @@
*/
public void testAllTags() throws Throwable {
performTestForVpeComponent((IFile) TestUtil.getComponentPath(
- "components/faceletsTest.xhtml", IMPORT_PROJECT_NAME)); //$NON-NLS-1$
+ "components/faceletsTest.xhtml", FaceletsAllTests.IMPORT_PROJECT_NAME));
//$NON-NLS-1$
}
}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/jbide/JBIDE3416Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/jbide/JBIDE3416Test.java 2009-06-12
08:24:44 UTC (rev 15920)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/src/org/jboss/tools/jsf/vpe/facelets/test/jbide/JBIDE3416Test.java 2009-06-12
11:32:24 UTC (rev 15921)
@@ -10,7 +10,7 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.facelets.test.jbide;
-import org.jboss.tools.jsf.vpe.facelets.test.FaceletsComponentTest;
+import org.jboss.tools.jsf.vpe.facelets.test.FaceletsAllTests;
import org.jboss.tools.vpe.ui.test.ComponentContentTest;
public class JBIDE3416Test extends ComponentContentTest {
@@ -25,7 +25,7 @@
@Override
protected String getTestProjectName() {
- return FaceletsComponentTest.IMPORT_PROJECT_NAME;
+ return FaceletsAllTests.IMPORT_PROJECT_NAME;
}
}