JBoss Tools SVN: r40080 - in trunk/gwt/tests/org.jboss.tools.gwt.tests: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-04-05 16:50:14 -0400 (Thu, 05 Apr 2012)
New Revision: 40080
Added:
trunk/gwt/tests/org.jboss.tools.gwt.tests/plugin.xml
trunk/gwt/tests/org.jboss.tools.gwt.tests/plugin_customization.ini
Modified:
trunk/gwt/tests/org.jboss.tools.gwt.tests/META-INF/MANIFEST.MF
trunk/gwt/tests/org.jboss.tools.gwt.tests/build.properties
trunk/gwt/tests/org.jboss.tools.gwt.tests/pom.xml
Log:
Added test product for gwt.tests component to make tests run faster
Modified: trunk/gwt/tests/org.jboss.tools.gwt.tests/META-INF/MANIFEST.MF
===================================================================
--- trunk/gwt/tests/org.jboss.tools.gwt.tests/META-INF/MANIFEST.MF 2012-04-05 18:14:18 UTC (rev 40079)
+++ trunk/gwt/tests/org.jboss.tools.gwt.tests/META-INF/MANIFEST.MF 2012-04-05 20:50:14 UTC (rev 40080)
@@ -1,11 +1,12 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tests for GWT integration
-Bundle-SymbolicName: org.jboss.tools.gwt.tests
+Bundle-SymbolicName: org.jboss.tools.gwt.tests;singleton:=true
Bundle-Version: 1.0.2.qualifier
Bundle-Vendor: JBoss by Red Hat
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.junit;bundle-version="4.8.2",
org.eclipse.core.runtime;bundle-version="3.7.0",
org.jboss.tools.gwt.core;bundle-version="1.0.0",
- org.jboss.tools.gwt.ui;bundle-version="1.0.0"
+ org.jboss.tools.gwt.ui;bundle-version="1.0.0",
+ org.eclipse.ui.ide.application;bundle-version="1.0.300"
Modified: trunk/gwt/tests/org.jboss.tools.gwt.tests/build.properties
===================================================================
--- trunk/gwt/tests/org.jboss.tools.gwt.tests/build.properties 2012-04-05 18:14:18 UTC (rev 40079)
+++ trunk/gwt/tests/org.jboss.tools.gwt.tests/build.properties 2012-04-05 20:50:14 UTC (rev 40080)
@@ -1,4 +1,5 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
- .
+ .,\
+ plugin.xml
Added: trunk/gwt/tests/org.jboss.tools.gwt.tests/plugin.xml
===================================================================
--- trunk/gwt/tests/org.jboss.tools.gwt.tests/plugin.xml (rev 0)
+++ trunk/gwt/tests/org.jboss.tools.gwt.tests/plugin.xml 2012-04-05 20:50:14 UTC (rev 40080)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ id="product"
+ point="org.eclipse.core.runtime.products">
+ <product
+ application="org.eclipse.ui.ide.workbench"
+ name="GWT Test Product">
+ <property
+ name="aboutText"
+ value="This is test product for GWT integration Plugins">
+ </property>
+ <property
+ name="appName"
+ value="JBoss Tools Test Application">
+ </property>
+ <property
+ name="preferenceCustomization"
+ value="plugin_customization.ini">
+ </property>
+ </product>
+ </extension>
+
+</plugin>
Property changes on: trunk/gwt/tests/org.jboss.tools.gwt.tests/plugin.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/gwt/tests/org.jboss.tools.gwt.tests/plugin_customization.ini
===================================================================
--- trunk/gwt/tests/org.jboss.tools.gwt.tests/plugin_customization.ini (rev 0)
+++ trunk/gwt/tests/org.jboss.tools.gwt.tests/plugin_customization.ini 2012-04-05 20:50:14 UTC (rev 40080)
@@ -0,0 +1,8 @@
+# Shut down an Intro for tests because of
+org.eclipse.ui/showIntro=false
+org.eclipse.ui/PROJECT_OPEN_NEW_PERSPECTIVE=NO_NEW_PERSPECTIVE
+org.eclipse.ui.ide/SWITCH_PERSPECTIVE_ON_PROJECT_CREATION=never
+org.eclipse.ui.workbench/ENABLED_DECORATORS=org.eclipse.wst.server.ui.decorator\:false,org.eclipse.jdt.ui.override.decorator\:false,org.eclipse.jdt.ui.interface.decorator\:false,org.eclipse.jdt.ui.buildpath.decorator\:false,org.eclipse.pde.ui.binaryProjectDecorator\:false,org.eclipse.ui.LinkedResourceDecorator\:false,org.eclipse.ui.VirtualResourceDecorator\:false,org.eclipse.ui.ContentTypeDecorator\:false,org.eclipse.ui.ResourceFilterDecorator\:false,org.eclipse.wst.jsdt.ui.override.decorator\:false,org.eclipse.wst.server.ui.navigatorDecorator\:false,
+org.eclipse.ui.workbench/PLUGINS_NOT_ACTIVATED_ON_STARTUP=org.eclipse.epp.usagedata.gathering;org.eclipse.epp.usagedata.recording;org.jboss.tools.usage;org.eclipse.equinox.p2.ui.sdk.scheduler;org.eclipse.update.scheduler;org.jboss.tools.central;
+org.jboss.tools.usage/ask_user_for_usage_report_preference=false
+org.jboss.tools.usage/allow_usage_report_preference=false
\ No newline at end of file
Property changes on: trunk/gwt/tests/org.jboss.tools.gwt.tests/plugin_customization.ini
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/gwt/tests/org.jboss.tools.gwt.tests/pom.xml
===================================================================
--- trunk/gwt/tests/org.jboss.tools.gwt.tests/pom.xml 2012-04-05 18:14:18 UTC (rev 40079)
+++ trunk/gwt/tests/org.jboss.tools.gwt.tests/pom.xml 2012-04-05 20:50:14 UTC (rev 40080)
@@ -10,4 +10,16 @@
<groupId>org.jboss.tools.gwt.tests</groupId>
<artifactId>org.jboss.tools.gwt.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <configuration>
+ <product>org.jboss.tools.gwt.tests.product</product>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
14 years
JBoss Tools SVN: r40079 - trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/icons.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-04-05 14:14:18 -0400 (Thu, 05 Apr 2012)
New Revision: 40079
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/icons/openshift-logo-white-icon.png
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/icons/openshift-logo-white-medium.png
Log:
Update to official openshift logos JBIDE-11489
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/icons/openshift-logo-white-icon.png
===================================================================
(Binary files differ)
Modified: trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/icons/openshift-logo-white-medium.png
===================================================================
(Binary files differ)
14 years
JBoss Tools SVN: r40078 - trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-04-05 14:04:48 -0400 (Thu, 05 Apr 2012)
New Revision: 40078
Modified:
trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/ELHyperlinkDetector.java
Log:
JBIDE-11477
https://issues.jboss.org/browse/JBIDE-11477
ELHyperlinkDetector.findInvocationExpressionByOffset(ELReference, int) is fixed to return parameter expression, not parent method expression.
Modified: trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/ELHyperlinkDetector.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/ELHyperlinkDetector.java 2012-04-05 18:02:59 UTC (rev 40077)
+++ trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/ELHyperlinkDetector.java 2012-04-05 18:04:48 UTC (rev 40078)
@@ -91,11 +91,14 @@
private static ELInvocationExpression findInvocationExpressionByOffset(ELReference reference, ELExpression expression, int offset){
List<ELInvocationExpression> invocations = expression.getInvocations();
+ ELInvocationExpression result = null;
for(ELInvocationExpression invocation : invocations){
if(reference.getStartPosition()+invocation.getStartPosition() <= offset && reference.getStartPosition()+invocation.getEndPosition() > offset)
- return invocation;
+ if(result == null || result.toString().length() > invocation.toString().length()) {
+ result = invocation;
+ }
}
- return null;
+ return result;
}
private IFile getFile(){
14 years
JBoss Tools SVN: r40077 - trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-04-05 14:02:59 -0400 (Thu, 05 Apr 2012)
New Revision: 40077
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELUtil.java
Log:
JBIDE-11477
https://issues.jboss.org/browse/JBIDE-11477
ELUtil.findExpression(ELModel, int) fixed to return parameter expression, not parent method expression.
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELUtil.java 2012-04-05 13:05:07 UTC (rev 40076)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/model/ELUtil.java 2012-04-05 18:02:59 UTC (rev 40077)
@@ -43,18 +43,28 @@
for (ELInvocationExpression inv: invs) {
if(inv.getStartPosition() <= offset && inv.getEndPosition() >= offset) {
if(off < inv.getStartPosition()) {
- result = inv;
+ ELInvocationExpression res = inv;
off = inv.getStartPosition();
ELInvocationExpression l = inv.getLeft();
while(l != null && l.getEndPosition() >= offset) {
- result = l;
+ res = l;
l = l.getLeft();
}
- return result;
+ if(result == null || result.toString().length() > res.toString().length()) {
+ result = res;
+ }
}
}
}
-
+ if(result != null) {
+ if(result instanceof ELMethodInvocation && ((ELMethodInvocation)result).getParameters() != null) {
+ ELParameters p = ((ELMethodInvocation)result).getParameters();
+ if(p.getStartPosition() < offset && p.getEndPosition() > offset) {
+ result = null;
+ }
+ }
+ return result;
+ }
}
return result;
14 years
JBoss Tools SVN: r40076 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-05 09:05:07 -0400 (Thu, 05 Apr 2012)
New Revision: 40076
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/DeploymentHelper.java
Log:
small fix and refactoring
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/DeploymentHelper.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/DeploymentHelper.java 2012-04-05 13:04:31 UTC (rev 40075)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/DeploymentHelper.java 2012-04-05 13:05:07 UTC (rev 40076)
@@ -11,6 +11,9 @@
package org.jboss.tools.ws.ui.bot.test.utils;
+import static org.eclipse.swtbot.swt.finder.SWTBotAssert.assertContains;
+import static org.junit.Assert.assertEquals;
+
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
@@ -18,14 +21,22 @@
import java.util.Scanner;
import java.util.logging.Logger;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTOpenExt;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.view.ProjectExplorer;
-public class DeploymentHelper extends SWTTestExt {
+public class DeploymentHelper {
private final Logger LOGGER = Logger
.getLogger(DeploymentHelper.class.getName());
+
+ private final SWTBotExt bot = new SWTBotExt();
+ private final ProjectExplorer projectExplorer = new ProjectExplorer();
+
+ private final SWTOpenExt open = new SWTOpenExt(bot);
+
/**
* Method runs project on configured server
* @param project
@@ -41,7 +52,7 @@
* @param wsdlURL
*/
public void assertServiceDeployed(String wsdlURL) {
- assertServiceDeployed(wsdlURL, 5000);
+ assertServiceDeployed(wsdlURL, 5000);
}
/**
14 years
JBoss Tools SVN: r40075 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-05 09:04:31 -0400 (Thu, 05 Apr 2012)
New Revision: 40075
Modified:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ProjectHelper.java
Log:
adding default runtime into project method
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ProjectHelper.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ProjectHelper.java 2012-04-05 13:03:03 UTC (rev 40074)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/utils/ProjectHelper.java 2012-04-05 13:04:31 UTC (rev 40075)
@@ -14,19 +14,33 @@
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTOpenExt;
+import org.jboss.tools.ui.bot.ext.SWTUtilExt;
+import org.jboss.tools.ui.bot.ext.condition.ShellIsActiveCondition;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.JavaEEEnterpriseApplicationProject;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServicesWSDL;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.jboss.tools.ui.bot.ext.view.ProjectExplorer;
import org.jboss.tools.ws.ui.bot.test.uiutils.actions.NewFileWizardAction;
import org.jboss.tools.ws.ui.bot.test.uiutils.actions.TreeItemAction;
import org.jboss.tools.ws.ui.bot.test.uiutils.wizards.DynamicWebProjectWizard;
import org.jboss.tools.ws.ui.bot.test.uiutils.wizards.Wizard;
-public class ProjectHelper extends SWTTestExt {
+public class ProjectHelper {
+ private final SWTBotExt bot = new SWTBotExt();
+
+ private final ProjectExplorer projectExplorer = new ProjectExplorer();
+
+ private final SWTOpenExt open = new SWTOpenExt(bot);
+
+ private final SWTUtilExt util = new SWTUtilExt(bot);
+
/**
* Method creates basic java class for entered project with
* entered package and class name
@@ -124,4 +138,26 @@
bot.sleep(1500);
}
+ /**
+ * Add first defined runtime into project as targeted runtime
+ * @param project
+ */
+ public void addDefaultRuntimeIntoProject(String project) {
+ projectExplorer.selectProject(project);
+ bot.menu(IDELabel.Menu.FILE).menu(
+ IDELabel.Menu.PROPERTIES).click();
+ bot.waitForShell(IDELabel.Shell.PROPERTIES_FOR + " " + project);
+ SWTBotShell propertiesShell = bot.shell(
+ IDELabel.Shell.PROPERTIES_FOR + " " + project);
+ propertiesShell.activate();
+ SWTBotTreeItem item = bot.tree().getTreeItem("Targeted Runtimes");
+ item.select();
+ bot.table().getTableItem(0).uncheck();
+ bot.table().getTableItem(0).check();
+ bot.button(IDELabel.Button.OK).click();
+ bot.waitWhile(new ShellIsActiveCondition(propertiesShell),
+ TaskDuration.LONG.getTimeout());
+
+ }
+
}
14 years
JBoss Tools SVN: r40074 - trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-05 09:03:03 -0400 (Thu, 05 Apr 2012)
New Revision: 40074
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/Seam3TestBase.java
Log:
change dependency of method importProject to ImportHelper
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/Seam3TestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/Seam3TestBase.java 2012-04-05 13:02:28 UTC (rev 40073)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/src/org/jboss/tools/cdi/seam3/bot/test/base/Seam3TestBase.java 2012-04-05 13:03:03 UTC (rev 40074)
@@ -23,6 +23,7 @@
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.helper.ImportHelper;
import org.junit.runner.RunWith;
import org.junit.runners.Suite.SuiteClasses;
@@ -56,7 +57,7 @@
}
protected void importSeam3TestProject(String projectLocation, String dir) {
- projectImportHelper.importTestProject(projectLocation, dir, Activator.PLUGIN_ID);
+ ImportHelper.importProject(projectLocation, dir, Activator.PLUGIN_ID);
}
protected void addAndCheckLibraryInProject(String projectName, SeamLibraries library) {
14 years
JBoss Tools SVN: r40073 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: uiutils and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-05 09:02:28 -0400 (Thu, 05 Apr 2012)
New Revision: 40073
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/AbstractTestSuite.java
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/SWTEclipseCDIExtUtil.java
Log:
Small refactoring and fixing
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/AbstractTestSuite.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/AbstractTestSuite.java 2012-04-05 13:02:11 UTC (rev 40072)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/AbstractTestSuite.java 2012-04-05 13:02:28 UTC (rev 40073)
@@ -10,13 +10,20 @@
******************************************************************************/
package org.jboss.tools.cdi.bot.test;
+import junit.framework.TestSuite;
+
import org.jboss.tools.cdi.bot.test.uiutils.SWTEclipseCDIExtUtil;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
+import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
import org.jboss.tools.ui.bot.ext.types.ViewType;
import org.junit.BeforeClass;
-public abstract class AbstractTestSuite extends SWTTestExt {
-
+public abstract class AbstractTestSuite extends TestSuite {
+
+ private static final SWTBotExt bot = new SWTBotExt();
+
+ private static final SWTEclipseExt eclipse = new SWTEclipseExt(bot);
+
/*
* init method "setup()" shows a project explorer view as default, disable
* folding (to easier source code editing)
@@ -24,7 +31,7 @@
@BeforeClass
public static void setUpSuite() {
eclipse.showView(ViewType.PROJECT_EXPLORER);
- SWTEclipseCDIExtUtil.disableFolding(bot, util);
+ SWTEclipseCDIExtUtil.disableFolding();
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/SWTEclipseCDIExtUtil.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/SWTEclipseCDIExtUtil.java 2012-04-05 13:02:11 UTC (rev 40072)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/SWTEclipseCDIExtUtil.java 2012-04-05 13:02:28 UTC (rev 40073)
@@ -11,15 +11,21 @@
package org.jboss.tools.cdi.bot.test.uiutils;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotCheckBox;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
-import org.jboss.tools.ui.bot.ext.SWTEclipseExt;
import org.jboss.tools.ui.bot.ext.SWTUtilExt;
import org.jboss.tools.ui.bot.ext.Timing;
+import org.jboss.tools.ui.bot.ext.condition.ShellIsActiveCondition;
+import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
-public class SWTEclipseCDIExtUtil extends SWTEclipseExt {
+public class SWTEclipseCDIExtUtil {
+ private static final SWTBotExt bot = new SWTBotExt();
+
+ private static final SWTUtilExt util = new SWTUtilExt(bot);
+
private SWTEclipseCDIExtUtil() {
throw new AssertionError();
}
@@ -29,8 +35,8 @@
* @param bot
* @param util
*/
- public static void disableFolding(SWTBotExt bot, SWTUtilExt util) {
- editFolding(bot, util, false);
+ public static void disableFolding() {
+ editFolding(false);
}
/**
@@ -38,14 +44,14 @@
* @param bot
* @param util
*/
- public static void enableFolding(SWTBotExt bot, SWTUtilExt util) {
- editFolding(bot, util, true);
+ public static void enableFolding() {
+ editFolding(true);
}
- private static void editFolding(SWTBotExt bot, SWTUtilExt util,
- boolean select) {
- bot.menu(CDIConstants.WINDOW).menu(CDIConstants.PREFERENCES).click();
- bot.shell(CDIConstants.PREFERENCES).activate();
+ private static void editFolding(boolean select) {
+ bot.menu(IDELabel.Menu.WINDOW).menu(IDELabel.Menu.PREFERENCES).click();
+ SWTBotShell preferencesShell = bot.shell(IDELabel.Shell.PREFERENCES);
+ preferencesShell.activate();
SWTBotTreeItem item = bot.tree(0).expandNode("Java", "Editor");
item.select("Folding");
SWTBotCheckBox foldCheckBox = bot.checkBox("Enable folding");
@@ -54,7 +60,9 @@
} else {
foldCheckBox.deselect();
}
- bot.button("OK").click();
+ bot.button(IDELabel.Button.OK).click();
+ bot.waitWhile(new ShellIsActiveCondition(preferencesShell),
+ TaskDuration.LONG.getTimeout());
bot.sleep(Timing.time2S());
util.waitForNonIgnoredJobs();
}
14 years
JBoss Tools SVN: r40072 - in trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test: uiutils and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-04-05 09:02:11 -0400 (Thu, 05 Apr 2012)
New Revision: 40072
Removed:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/ProjectImportHelper.java
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
Log:
change dependency of method importProject to ImportHelper
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2012-04-05 12:44:58 UTC (rev 40071)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/CDITestBase.java 2012-04-05 13:02:11 UTC (rev 40072)
@@ -19,7 +19,6 @@
import org.jboss.tools.cdi.bot.test.uiutils.CDIWizardHelper;
import org.jboss.tools.cdi.bot.test.uiutils.EditorResourceHelper;
import org.jboss.tools.cdi.bot.test.uiutils.OpenOnHelper;
-import org.jboss.tools.cdi.bot.test.uiutils.ProjectImportHelper;
import org.jboss.tools.cdi.bot.test.uiutils.QuickFixHelper;
import org.jboss.tools.cdi.bot.test.uiutils.wizards.CDIWizardBaseExt;
import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
@@ -27,6 +26,7 @@
import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerState;
+import org.jboss.tools.ui.bot.ext.helper.ImportHelper;
import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
@@ -51,9 +51,7 @@
public static final OpenOnHelper openOnUtil = new OpenOnHelper();
public static final EditorResourceHelper editResourceUtil = new EditorResourceHelper();
public static final QuickFixHelper quickFixHelper = new QuickFixHelper();
- public static final ProjectImportHelper projectImportHelper = new ProjectImportHelper();
-
public SWTBotEclipseEditor getEd() {
return ed;
}
@@ -83,7 +81,7 @@
}
protected void importCDITestProject(String projectLocation, String dir) {
- projectImportHelper.importTestProject(projectLocation, dir, PluginActivator.PLUGIN_ID);
+ ImportHelper.importProject(projectLocation, dir, PluginActivator.PLUGIN_ID);
}
}
\ No newline at end of file
Deleted: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/ProjectImportHelper.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/ProjectImportHelper.java 2012-04-05 12:44:58 UTC (rev 40071)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/uiutils/ProjectImportHelper.java 2012-04-05 13:02:11 UTC (rev 40072)
@@ -1,51 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010-2012 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.cdi.bot.test.uiutils;
-
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.io.IOException;
-
-import org.jboss.tools.ui.bot.ext.SWTBotExt;
-import org.jboss.tools.ui.bot.ext.SWTUtilExt;
-import org.jboss.tools.ui.bot.ext.helper.FileHelper;
-import org.jboss.tools.ui.bot.ext.helper.ImportHelper;
-import org.jboss.tools.ui.bot.ext.helper.ResourceHelper;
-
-public class ProjectImportHelper {
-
- private SWTBotExt bot = new SWTBotExt();
-
- private SWTUtilExt util = new SWTUtilExt(bot);
-
- public void importTestProject(String projectLocation, String dir, String activatorPlugIn) {
- String rpath = ResourceHelper.getResourceAbsolutePath(activatorPlugIn, projectLocation);
- String wpath = ResourceHelper.getWorkspaceAbsolutePath() + "/" + dir;
- File rfile = new File(rpath);
- File wfile = new File(wpath);
-
- wfile.mkdirs();
- try {
- FileHelper.copyFilesBinaryRecursively(rfile, wfile, null);
- } catch (IOException e) {
- fail("Unable to copy test project");
- }
- ImportHelper.importAllProjects(wpath);
- util.waitForNonIgnoredJobs();
- }
-
-// public void importTestProject(String projectLocation, String activatorPlugIn) {
-// importTestProject(projectLocation, projectLocation);
-// }
-
-}
14 years
JBoss Tools SVN: r40071 - in trunk/central/tests/org.jboss.tools.central.test.ui.bot: src/org/jboss/tools/central/test/ui/bot and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-04-05 08:44:58 -0400 (Thu, 05 Apr 2012)
New Revision: 40071
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/pom.xml
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithoutServerTest.java
Log:
https://issues.jboss.org/browse/JBQA-6176
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/pom.xml
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/pom.xml 2012-04-05 10:40:36 UTC (rev 40070)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/pom.xml 2012-04-05 12:44:58 UTC (rev 40071)
@@ -24,10 +24,6 @@
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
- <!-- <systemPropertyVariables>
- <MOZILLA_FIVE_HOME>/home/rhopp/jbdevstudio/studio/plugins/org.mozilla.xulrunner.gtk.linux.x86_64_1.9.2.19pre/xulrunner</MOZILLA_FIVE_HOME>
- <LD_LIBRARY_PATH>${env.MOZILLA_FIVE_HOME}</LD_LIBRARY_PATH>
- </systemPropertyVariables> -->
<testSuite>org.jboss.tools.central.test.ui.bot</testSuite>
<testClass>org.jboss.tools.central.test.ui.bot.CentralAllBotTests</testClass>
<useUIThread>false</useUIThread>
@@ -60,7 +56,7 @@
</dependency>
<dependency>
<type>p2-installable-unit</type>
- <artifactId>org.jboss.tools.xulrunner.feature.feature.group</artifactId>
+ <artifactId>org.jboss.ide.eclipse.as.feature.feature.group</artifactId>
<version>0.0.0</version>
</dependency>
</dependencies>
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java 2012-04-05 10:40:36 UTC (rev 40070)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CentralAllBotTests.java 2012-04-05 12:44:58 UTC (rev 40071)
@@ -7,9 +7,9 @@
@RunWith(RequirementAwareSuite.class)
@SuiteClasses({
//BaseFunctionalityTest.class,
- CreateProjectsWithServerTest.class,
- CreateProjectsWithoutServerTest.class,
- DocumentationSectionTest.class
+ CreateProjectsWithServerTest.class
+// CreateProjectsWithoutServerTest.class
+// DocumentationSectionTest.class
//EmptyTestForHudson.class
})
public class CentralAllBotTests {
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java 2012-04-05 10:40:36 UTC (rev 40070)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java 2012-04-05 12:44:58 UTC (rev 40071)
@@ -1,10 +1,7 @@
package org.jboss.tools.central.test.ui.bot;
-import java.io.File;
-
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
import org.jboss.tools.ui.bot.ext.SWTFormsBotExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
@@ -12,10 +9,8 @@
import org.jboss.tools.ui.bot.ext.config.Annotations.ServerType;
import org.jboss.tools.ui.bot.ext.parts.SWTBotTwistie;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
-import org.jboss.tools.ui.bot.ext.view.ProblemsView;
import org.jboss.tools.ui.bot.ext.wizards.SWTBotWizard;
import org.junit.After;
-import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -30,16 +25,16 @@
@After
public void teardown(){
- SWTBotTreeItem[] items = ProblemsView.getErrorsNode(bot).getItems();
+ /*SWTBotTreeItem[] items = ProblemsView.getErrorsNode(bot).getItems();
for (SWTBotTreeItem swtBotTreeItem : items) {
log.error(swtBotTreeItem.toString());
- }
+ }*/
}
@Test
public void createProjectsSectionTest(){
//waitForAWhile();
- SWTFormsBotExt formsBot = SWTBotFactory.getFormsBot();
+// SWTFormsBotExt formsBot = SWTBotFactory.getFormsBot();
//Dynamic web project
bot.hyperlink(IDELabel.JBossCentralEditor.DYNAMIC_WEB_PROJECT).click();
bot.waitForShell(IDELabel.JBossCentralEditor.NEW_DYNAMIC_WEB_PROJECT);
@@ -201,21 +196,21 @@
}
}
- private void checkCreateProject(String formText){
- //formsBot.formTextWithText(formText).click();
- bot.hyperlink(formText).click();
- bot.waitForShell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE);
- SWTBotWizard wizard = new SWTBotWizard(bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).widget);
- wizard.next();
- wizard.finishWithWait();
- bot.activeShell().close();
- if (bot.activeEditor().getTitle().equalsIgnoreCase("cheat sheets")){
- bot.activeEditor().close();
- }
-// assertTrue("Project Example window should have appeared", bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).isActive());
-// bot.button("Start").click();
-// bot.waitForShell(wizzardShellText);
-// assertTrue(wizzardShellText+" should have appeared", bot.shell(wizzardShellText).isActive());
+// private void checkCreateProject(String formText){
+// //formsBot.formTextWithText(formText).click();
+// bot.hyperlink(formText).click();
+// bot.waitForShell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE);
+// SWTBotWizard wizard = new SWTBotWizard(bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).widget);
+// wizard.next();
+// wizard.finishWithWait();
// bot.activeShell().close();
- }
+// if (bot.activeEditor().getTitle().equalsIgnoreCase("cheat sheets")){
+// bot.activeEditor().close();
+// }
+//// assertTrue("Project Example window should have appeared", bot.shell(IDELabel.JBossCentralEditor.PROJECT_EXAMPLE).isActive());
+//// bot.button("Start").click();
+//// bot.waitForShell(wizzardShellText);
+//// assertTrue(wizzardShellText+" should have appeared", bot.shell(wizzardShellText).isActive());
+//// bot.activeShell().close();
+// }
}
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithoutServerTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithoutServerTest.java 2012-04-05 10:40:36 UTC (rev 40070)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithoutServerTest.java 2012-04-05 12:44:58 UTC (rev 40071)
@@ -1,20 +1,12 @@
package org.jboss.tools.central.test.ui.bot;
import java.io.File;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.sql.Date;
-import java.util.Calendar;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.ui.IMemento;
-import org.eclipse.ui.XMLMemento;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
import org.jboss.tools.ui.bot.ext.SWTFormsBotExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.condition.NonSystemJobRunsCondition;
import org.jboss.tools.ui.bot.ext.condition.ShellIsActiveCondition;
import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
@@ -41,7 +33,7 @@
@Test
public void createProjectsSectionTest(){
- SWTFormsBotExt formsBot = SWTBotFactory.getFormsBot();
+// SWTFormsBotExt formsBot = SWTBotFactory.getFormsBot();
//Dynamic web project
bot.hyperlink(IDELabel.JBossCentralEditor.DYNAMIC_WEB_PROJECT).click();
bot.waitForShell(IDELabel.JBossCentralEditor.NEW_DYNAMIC_WEB_PROJECT);
14 years