Author: akazakov
Date: 2011-11-10 19:20:52 -0500 (Thu, 10 Nov 2011)
New Revision: 36289
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JBossPerspectiveTest.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
Log:
https://issues.jboss.org/browse/JBIDE-10140 JBoss Perspective
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF 2011-11-10 23:57:53
UTC (rev 36288)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/META-INF/MANIFEST.MF 2011-11-11 00:20:52
UTC (rev 36289)
@@ -34,10 +34,11 @@
org.eclipse.gef,
org.eclipse.pde.ui,
org.eclipse.wst.validation,
- org.eclipse.wst.html.core;bundle-version="1.1.500",
- org.eclipse.wst.html.ui;bundle-version="1.0.600",
- org.jboss.tools.jst.jsp.base.test;bundle-version="3.3.0",
- org.jboss.tools.common.el.ui;bundle-version="3.3.0",
- org.eclipse.jdt.ui;bundle-version="3.7.0"
+ org.eclipse.wst.html.core,
+ org.eclipse.wst.html.ui,
+ org.jboss.tools.jst.jsp.base.test,
+ org.jboss.tools.common.el.ui,
+ org.eclipse.jdt.ui,
+ org.jboss.tools.common.ui
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Added:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JBossPerspectiveTest.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JBossPerspectiveTest.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JBossPerspectiveTest.java 2011-11-11
00:20:52 UTC (rev 36289)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2011 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
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.ui.test;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.WorkbenchException;
+import org.jboss.tools.common.ui.JBossPerspectiveFactory;
+import org.jboss.tools.test.util.WorkbenchUtils;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class JBossPerspectiveTest extends TestCase {
+
+ /**
+ * Tests JBoss perspective has JSF stuff
+ * See
https://issues.jboss.org/browse/JBIDE-10145
+ * @throws WorkbenchException
+ */
+ public void testJBossPerspective() throws WorkbenchException {
+ IWorkbenchPage page =
WorkbenchUtils.getWorkbench().getActiveWorkbenchWindow().openPage(JBossPerspectiveFactory.PERSPECTIVE_ID,
null);
+ assertNotNull(page);
+ IViewPart[] views = page.getViews();
+ System.out.println("Views number: " + views.length);
+ IViewReference[] viewReferences = page.getViewReferences();
+ Set<String> viewIds = new HashSet<String>();
+ for (IViewReference viewReference : viewReferences) {
+ System.out.println("View ID: " + viewReference.getId());
+ viewIds.add(viewReference.getId());
+ }
+ assertTrue("Have not found org.eclipse.gef.ui.palette_view in
org.eclipse.jst.j2ee.J2EEPerspective.",
viewIds.contains("org.eclipse.gef.ui.palette_view"));
+ }
+}
\ No newline at end of file
Property changes on:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JBossPerspectiveTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2011-11-10
23:57:53 UTC (rev 36288)
+++
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JsfUiAllTests.java 2011-11-11
00:20:52 UTC (rev 36289)
@@ -51,6 +51,7 @@
ValidationFramework.getDefault().suspendAllValidation(true);
+ suite.addTestSuite(JBossPerspectiveTest.class);
suite.addTestSuite(NewJSFProjectTest.class);
suite.addTestSuite(CAForUnclosedELTest.class);
suite.addTestSuite(CAForCompositeComponentTest.class);