Author: mareshkau
Date: 2010-11-25 11:11:09 -0500 (Thu, 25 Nov 2010)
New Revision: 26941
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/JBIDE/4373/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/JBIDE/4373/s-decorate.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/templates/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/templates/insert.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/OpenOnForDecorateTest.java
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/s-decorate.xhtml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4373Test.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/SeamAllTests.java
Log:
https://jira.jboss.org/browse/JBIDE-7704 moving seam test to right place
Deleted:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/s-decorate.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4373Test.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4373Test.java 2010-11-25
15:37:15 UTC (rev 26940)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4373Test.java 2010-11-25
16:11:09 UTC (rev 26941)
@@ -180,23 +180,6 @@
}
/**
- * Test openOn mechanism for VpeDefineContainerTemplate
- * in Seam's s:decorate template (SeamDecorateTemplate).
- *
- * @throws CoreException
- * @throws IOException
- */
- public void testOpenOnForSDecorate() throws CoreException, IOException {
- VpeController vpeController = openInVpe(JsfAllTests.IMPORT_CUSTOM_FACELETS_PROJECT,
"s-decorate.xhtml"); //$NON-NLS-1$
- int position =
TestUtil.getLinePositionOffcet(vpeController.getSourceEditor().getTextViewer(), 11, 33);
- Node sourceNode =
SelectionUtil.getNodeBySourcePosition(vpeController.getSourceEditor(), position);
- nsIDOMNode domNode = vpeController.getDomMapping().getNearVisualNode(sourceNode);
- vpeController.getSourceBuilder().openOn(domNode);
- IEditorPart activeEditor =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
- assertEquals("/templates/insert.xhtml file should be
opened","insert.xhtml", activeEditor.getEditorInput().getName());
//$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
* Test openOn mechanism for VpeIncludeTemplate in ajax4jsf a4j:include.
*
* @throws CoreException
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/META-INF/MANIFEST.MF 2010-11-25
15:37:15 UTC (rev 26940)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/META-INF/MANIFEST.MF 2010-11-25
16:11:09 UTC (rev 26941)
@@ -18,7 +18,11 @@
org.jboss.tools.jsf.vpe.facelets,
org.jboss.tools.jsf.vpe.richfaces,
org.jboss.tools.jsf.vpe.seam,
- org.jboss.tools.vpe.html
+ org.jboss.tools.vpe.html,
+ org.eclipse.wst.sse.ui;bundle-version="1.2.0",
+ org.eclipse.jface.text;bundle-version="3.6.0",
+ org.eclipse.wst.sse.core;bundle-version="1.1.500",
+ org.jboss.tools.jsf.text.ext.facelets;bundle-version="3.2.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.jsf.vpe.seam.test
Bundle-Vendor: %Bundle-Vendor.0
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/JBIDE/4373/s-decorate.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/JBIDE/4373/s-decorate.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/JBIDE/4373/s-decorate.xhtml 2010-11-25
16:11:09 UTC (rev 26941)
@@ -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:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:s="http://jboss.com/products/seam/taglib"
+
xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<head>
+</head>
+<body>
+<s:decorate template="/templates/insert.xhtml" styleClass="btn2"
style="background-color: blue;" id="id4">
+</s:decorate>
+</body>
+</html>
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/pages/JBIDE/4373/s-decorate.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/templates/insert.xhtml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/templates/insert.xhtml
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/templates/insert.xhtml 2010-11-25
16:11:09 UTC (rev 26941)
@@ -0,0 +1,66 @@
+<!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">
+
+<head>
+<title><ui:insert name="pageTitle">Page
Title</ui:insert></title>
+<style type="text/css">
+body {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 14px;
+}
+
+.header {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 18px;
+}
+
+.bottom {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 9px;
+ text-align: center;
+ vertical-align: middle;
+ color: #8E969D;
+}
+</style>
+</head>
+
+<body bgcolor="#ffffff">
+<table style="border: 1px solid #CAD6E0" align="center"
cellpadding="0"
+ cellspacing="0" border="0" width="400">
+ <tbody>
+
+ <tr>
+ <td class="header" height="42" align="center"
valign="middle"
+ width="100%" bgcolor="#E4EBEB"><ui:insert
name="pageHeader">Page Header</ui:insert>
+ </td>
+ </tr>
+ <tr>
+ <td height="1" width="100%" bgcolor="#CAD6E0"
align="center">#{user}</td>
+ </tr>
+
+ <tr>
+ <td width="100%" colspan="2">
+ <table width="100%" style="height: 150px"
align="left"
+ cellpadding="0" cellspacing="0" border="0">
+ <tbody>
+ <tr>
+ <td align="center" width="100%"
valign="middle"><ui:insert
+ name="body">Page Body</ui:insert></td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2" valign="bottom" height="1"
width="100%"
+ bgcolor="#CAD6E0"></td>
+ </tr>
+ </tbody>
+</table>
+</body>
+
+</html>
\ No newline at end of file
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/resources/SeamTest/WebContent/templates/insert.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/OpenOnForDecorateTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/OpenOnForDecorateTest.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/OpenOnForDecorateTest.java 2010-11-25
16:11:09 UTC (rev 26941)
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2010 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.seam.test;
+
+import java.io.IOException;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.util.SelectionUtil;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.w3c.dom.Node;
+
+/**
+ * Junit test for JBIDE-4373
+ *
+ * @author mareshkau
+ *
+ */
+public class OpenOnForDecorateTest extends VpeTest {
+
+ public OpenOnForDecorateTest(String name) {
+ super(name);
+ }
+
+ /**
+ * Test openOn mechanism for VpeDefineContainerTemplate
+ * in Seam's s:decorate template (SeamDecorateTemplate).
+ *
+ * @throws CoreException
+ * @throws IOException
+ */
+ public void testOpenOnForSDecorate() throws CoreException, IOException {
+ VpeController vpeController = openInVpe(SeamAllTests.IMPORT_PROJECT_NAME,
"JBIDE/4373/s-decorate.xhtml"); //$NON-NLS-1$
+ int position =
TestUtil.getLinePositionOffcet(vpeController.getSourceEditor().getTextViewer(), 11, 33);
+ Node sourceNode =
SelectionUtil.getNodeBySourcePosition(vpeController.getSourceEditor(), position);
+ nsIDOMNode domNode = vpeController.getDomMapping().getNearVisualNode(sourceNode);
+ vpeController.getSourceBuilder().openOn(domNode);
+ IEditorPart activeEditor =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ assertEquals("/templates/insert.xhtml file should be
opened","insert.xhtml", activeEditor.getEditorInput().getName());
//$NON-NLS-1$ //$NON-NLS-2$
+ }
+}
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/OpenOnForDecorateTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/SeamAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/SeamAllTests.java 2010-11-25
15:37:15 UTC (rev 26940)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.seam.test/src/org/jboss/tools/jsf/vpe/seam/test/SeamAllTests.java 2010-11-25
16:11:09 UTC (rev 26941)
@@ -32,6 +32,7 @@
suite.addTestSuite(SeamComponentTest.class);
suite.addTestSuite(SeamComponentContentTest.class);
suite.addTestSuite(JBIDE1484Test.class);
+ suite.addTestSuite(OpenOnForDecorateTest.class);
// $JUnit-END$
return new VpeTestSetup(suite);
}