Author: lzoubek(a)redhat.com
Date: 2010-05-05 04:11:37 -0400 (Wed, 05 May 2010)
New Revision: 21901
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ESBBean.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddESB.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJava.java
Removed:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJRE.java
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTOpenExt.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearWorkspace.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
Log:
SWTBotExt : add esb runtime annotations, preparing views, small fixes
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties 2010-05-05
08:01:05 UTC (rev 21900)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/resources/SWTBotTest-default.properties 2010-05-05
08:11:37 UTC (rev 21901)
@@ -6,3 +6,4 @@
SERVER=EAP,5.0,1.6,/data/jboss/jboss-eap-5.0/jboss-as
#<seam version>,<seam runtime home>
SEAM=2.2,/data/jboss/jboss-eap-5.0/seam
+ESB=4.7,/data/jboss/esb-4.7
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-05-05
08:01:05 UTC (rev 21900)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2010-05-05
08:11:37 UTC (rev 21901)
@@ -477,7 +477,24 @@
open.finish(wiz, IDELabel.Button.OK);
}
}
-
+ public void addESBRuntime(String name, String version, String runtimeHome ) {
+ SWTBot wiz =
open.preferenceOpen(ActionItem.Preference.JBossToolsJBossESBRuntimes.LABEL);
+ wiz.button("Add").click();
+ bot.shell(IDELabel.Shell.NEW_ESB_RUNTIME).activate();
+ bot.text(0).setText(name);
+ bot.text(1).setText(runtimeHome);
+ String[] versions = bot.comboBox().items();
+ int myIndex =0;
+ for (int index=0;index<versions.length;index++) {
+ if (version.equals(versions[index])) {
+ myIndex=index;
+ break;
+ }
+ }
+ bot.comboBox().setSelection(myIndex);
+ open.finish(bot.activeShell().bot());
+ open.finish(wiz, IDELabel.Button.OK);
+ }
/**
* adds jboss server runtime only if it's not specified yet
*
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTOpenExt.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTOpenExt.java 2010-05-05
08:01:05 UTC (rev 21900)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTOpenExt.java 2010-05-05
08:11:37 UTC (rev 21901)
@@ -62,6 +62,7 @@
viewObj.show();
return viewObj;
}
+
/**
* closes given view
*
@@ -76,8 +77,6 @@
}
}
-
-
/**
* selects given actionItem in bot's tree();
*
@@ -87,22 +86,25 @@
SWTBotTreeItem ti = null;
try {
Iterator<String> iter = item.getGroupPath().iterator();
-
+
if (iter.hasNext()) {
String next = iter.next();
- ti = bot.tree().expandNode(next);
+ ti = bot.tree().expandNode(next);
try {
while (iter.hasNext()) {
next = iter.next();
- // expanding node is failing, so try to collapse and expand it again
+ // expanding node is failing, so try to collapse and
+ // expand it again
ti.expand();
- ti = ti.expandNode(next);
+ ti = ti.expandNode(next);
}
- next = item.getName();
- ti.expandNode(next).select();
- }
- catch (WidgetNotFoundException ex) {
- log.warn("Tree item '"+next+"' was not found, trying to
collapse and reexpand parent node");
+ next = item.getName();
+ ti.expandNode(next).select();
+ } catch (WidgetNotFoundException ex) {
+ log
+ .warn("Tree item '"
+ + next
+ + "' was not found, trying to collapse and reexpand parent
node");
ti.collapse();
ti.expand();
ti.select();
@@ -113,9 +115,10 @@
bot.tree().select(item.getName());
}
} catch (WidgetNotFoundException ex) {
- String exStr="Item '"+ ActionItem.getItemString(item)+ "' does
not exist in tree";
- if (ti!=null) {
- exStr+=", last selected item was '"+ti.getText()+"'";
+ String exStr = "Item '" + ActionItem.getItemString(item)
+ + "' does not exist in tree";
+ if (ti != null) {
+ exStr += ", last selected item was '" + ti.getText() +
"'";
}
throw new WidgetNotFoundException(exStr, ex);
}
@@ -146,7 +149,7 @@
shell.activate();
bot.table().select(perspective.getName());
bot.button("OK").click();
- log.info("Perspective switched to
'"+perspective.getName()+"'");
+ log.info("Perspective switched to '" + perspective.getName() +
"'");
}
/**
@@ -165,7 +168,7 @@
bot.button("Next >").click();
return bot;
}
-
+
/**
* Wait for appearance shell of given name
*
@@ -218,14 +221,28 @@
SWTBotButton btn = bot.button("Cancel");
btn.click();
}
+
/**
* clicks given button on active shell and waits until shell disappears
- * @param bot
+ *
+ * @param bot
* @param finishButtonText
*/
public void finish(SWTBot bot, String finishButtonText) {
- long timeout =480*1000;
-
+ finish(bot, finishButtonText,false);
+ }
+
+ /**
+ * clicks given button on active shell and waits until shell disappears
+ *
+ * @param bot
+ * @param finishButtonText
+ * @param autoCloseShells true if you want close all possibly risen shells when closing
+ */
+ public void finish(SWTBot bot, String finishButtonText,
+ boolean autoCloseShells) {
+ long timeout = 480 * 1000;
+
SWTBotShell activeShell = bot.activeShell();
String activeShellStr = bot.activeShell().getText();
bot.button(finishButtonText).click();
@@ -234,38 +251,58 @@
log.info("Waiting until shell '" + activeShellStr + "'
closes");
try {
bot.waitUntil(shellCloses(activeShell));
- log.info("OK, shell '"+activeShellStr+"' closed.");
+ log.info("OK, shell '" + activeShellStr + "' closed.");
return;
} catch (TimeoutException ex) {
- String currentShellStr = bot.activeShell().getText();
- if (!activeShellStr.equals(currentShellStr)) {
- log.error("Unexpected shell '"+currentShellStr+"':
["+SWTUtilExt.getAllBotWidgetsAsText(bot)+"] appeared, when waiting for shell to
close");
- bot.activeShell().close();
- log.info("Shell '"+currentShellStr+"' closed.");
+ if (autoCloseShells) {
+ String currentShellStr = bot.activeShell().getText();
+ if (!activeShellStr.equals(currentShellStr)) {
+ log
+ .error("Unexpected shell '"
+ + currentShellStr
+ + "': ["
+ + SWTUtilExt
+ .getAllBotWidgetsAsText(bot)
+ + "] appeared, when waiting for shell to close");
+ bot.activeShell().close();
+ log.info("Shell '" + currentShellStr + "' closed, clicking
finish button again.");
+ bot.button(finishButtonText).click();
+ }
}
- if (System.currentTimeMillis()-time>timeout) {
- log.error("Shell '"+activeShellStr+"' probably hanged up
(480s timeout), returning, forcing to close it, expect errors");
+ if (System.currentTimeMillis() - time > timeout) {
+ log
+ .error("Shell '"
+ + activeShellStr
+ + "' probably hanged up (480s timeout), returning, forcing to close it,
expect errors");
try {
bot.activeShell().close();
activeShell.close();
bot.waitUntil(shellCloses(activeShell));
- log.info("Shell '"+activeShellStr+"' was forced to
close.");
+ log.info("Shell '" + activeShellStr
+ + "' was forced to close.");
return;
- }
- catch (Exception e) {
+ } catch (Exception e) {
e.printStackTrace();
}
- throw new WidgetNotFoundException("Shell '"+activeShellStr+"'
did not close after timeout", ex);
+ throw new WidgetNotFoundException("Shell '"
+ + activeShellStr + "' did not close after timeout",
+ ex);
}
log.warn("Shell '" + activeShellStr + "' is still
opened");
}
}
}
+
/**
* clicks 'Finish' button on active shell and waits until shell disappears
+ *
* @param bot
*/
public void finish(SWTBot bot) {
- finish(bot,"Finish");
+ finish(bot, "Finish",false);
}
+
+ public void finish(SWTBot bot, boolean autoCloseShells) {
+ finish(bot, "Finish",autoCloseShells);
+ }
}
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java 2010-05-05
08:01:05 UTC (rev 21900)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/Annotations.java 2010-05-05
08:11:37 UTC (rev 21901)
@@ -35,6 +35,11 @@
*/
Seam seam() default @Seam( required = false );
/**
+ * optionally require ESB runtime
+ * @return
+ */
+ ESB esb() default @ESB( required = false);
+ /**
* name of perspective to run within
* @return
*/
@@ -93,17 +98,41 @@
*/
boolean required() default true;
/**
- * version of required server (use * for all)
+ * version of required runtime (use * for all)
* @return
*/
String version() default "*";
/**
- * defines operator on server, possible values (=,<,>=<=,>=,!=) default =
+ * defines operator on runtime version, possible values (=,<,>=<=,>=,!=)
default =
* @return
*/
String operator() default "=";
}
+ /**
+ *
+ * @author lzoubek(a)redhat.com
+ *
+ */
+ @Retention(RetentionPolicy.RUNTIME)
+ public @interface ESB {
+ /**
+ * true if ESB is required (default)
+ * @return
+ */
+ boolean required() default true;
+ /**
+ * version of required runtime (use * for all)
+ * @return
+ */
+ String version() default "*";
+ /**
+ * defines operator on runtime version, possible values (=,<,>=<=,>=,!=)
default =
+ * @return
+ */
+ String operator() default "=";
+
+ }
public enum ServerType {
/**
* EAP
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ESBBean.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ESBBean.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ESBBean.java 2010-05-05
08:11:37 UTC (rev 21901)
@@ -0,0 +1,19 @@
+package org.jboss.tools.ui.bot.ext.config;
+
+public class ESBBean {
+ public String version;
+ public String esbHome;
+
+ public static ESBBean fromString(String propValue) throws Exception{
+ try {
+ String[] esbParams = propValue.split(",");
+ ESBBean bean = new ESBBean();
+ bean.esbHome=esbParams[1];
+ bean.version=esbParams[0];
+ return bean;
+ }
+ catch (Exception ex) {
+ throw new Exception("Cannot parse ESB property line",ex);
+ }
+ }
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/ESBBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2010-05-05
08:01:05 UTC (rev 21900)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/TestConfigurator.java 2010-05-05
08:11:37 UTC (rev 21901)
@@ -13,6 +13,7 @@
import org.apache.log4j.Logger;
import org.jboss.tools.ui.bot.ext.Activator;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.ESB;
import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
import org.jboss.tools.ui.bot.ext.config.Annotations.Seam;
import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
@@ -27,6 +28,7 @@
public static final String SEAM = "SEAM";
public static final String JAVA_HOME_15 = "JAVA_HOME_15";
public static final String JAVA_HOME_16 = "JAVA_HOME_16";
+ public static final String ESB = "ESB";
}
public class Values {
@@ -39,6 +41,7 @@
private static Properties swtTestProperties = new Properties();
public static ServerBean server;
public static SeamBean seam;
+ public static ESBBean esb;
static {
try {
// try to load from file first
@@ -78,6 +81,7 @@
try {
server = ServerBean.fromString(getProperty(Keys.SERVER));
seam = SeamBean.fromString(getProperty(Keys.SEAM));
+ esb = ESBBean.fromString(getProperty(Keys.ESB));
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
@@ -93,10 +97,11 @@
checkDirExists(getProperty(Keys.JAVA_HOME_16));
checkDirExists(seam.seamHome);
checkDirExists(server.runtimeHome);
+ checkDirExists(esb.esbHome);
return true;
}
catch (Exception ex) {
- log.error(ex.getMessage()+ " incorrect configuration, set your custom properties
file via 'swtbot.test.properties.file' java property");
+ log.error("'"+ex.getMessage()+ "' - incorrect configuration,
set your custom properties file via '"+SWTBOT_TEST_PROPERTIES_FILE+"'
java property");
return false;
}
@@ -153,6 +158,15 @@
}
return RequirementBase.createAddSeam();
}
+ private static RequirementBase getESBRequirement(ESB e) {
+ if (!e.required()) {
+ return null;
+ }
+ if (!matches(esb.version, e.operator(), e.version())) {
+ return null;
+ }
+ return RequirementBase.createAddESB();
+ }
/**
* returns list of requirements if given class (Test) can run, all this is
@@ -165,6 +179,7 @@
.getAnnotation(SWTBotTestRequires.class);
// internal list
List<RequirementBase> reqs = new ArrayList<RequirementBase>();
+ reqs.add(RequirementBase.createPrepareViews());
// all not annotated classes can run
if (requies == null) {
return reqs;
@@ -183,6 +198,13 @@
}
reqs.add(req);
}
+ if (requies.esb().required()) {
+ RequirementBase req = getESBRequirement(requies.esb());
+ if (req == null) {
+ return null;
+ }
+ reqs.add(req);
+ }
if (!"".equals(requies.perspective())) {
reqs.add(RequirementBase.createSwitchPerspective(requies
.perspective()));
Added:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddESB.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddESB.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddESB.java 2010-05-05
08:11:37 UTC (rev 21901)
@@ -0,0 +1,23 @@
+package org.jboss.tools.ui.bot.ext.config.requirement;
+
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
+
+public class AddESB extends RequirementBase {
+
+ @Override
+ public boolean checkFulfilled() {
+ return SWTTestExt.configuredState.getEsb().isConfiured;
+ }
+
+ @Override
+ public void handle() {
+ String esbName = "ESB-"+TestConfigurator.esb.version;
+ SWTTestExt.eclipse.addESBRuntime(esbName,TestConfigurator.esb.version,TestConfigurator.esb.esbHome);
+ SWTTestExt.configuredState.getEsb().isConfiured=true;
+ SWTTestExt.configuredState.getEsb().name=esbName;
+ SWTTestExt.configuredState.getEsb().version=TestConfigurator.esb.version;
+
+ }
+
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddESB.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJRE.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJRE.java 2010-05-05
08:01:05 UTC (rev 21900)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJRE.java 2010-05-05
08:11:37 UTC (rev 21901)
@@ -1,48 +0,0 @@
-package org.jboss.tools.ui.bot.ext.config.requirement;
-
-import static org.junit.Assert.fail;
-import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
-/**
- * adds JRE among Installed JRE's
- * @author lzoubek
- *
- */
-public class AddJRE extends RequirementBase {
-
- private final String version;
- /**
- * requirement for adding JRE
- * @param version to add
- */
- public AddJRE(String version) {
- this.version = version;
- }
- @Override
- public boolean checkFulfilled() {
- return SWTTestExt.configuredState.getJreList().contains(getAddedAsName());
- }
-
- @Override
- public void handle(){
- SWTTestExt.eclipse.addJavaVM(getAddedAsName(), getJavaHome());
- SWTTestExt.configuredState.getJreList().add(getAddedAsName());
- }
- public String getAddedAsName() {
- return "JRE-"+version;
- }
- private String getJavaHome() {
- if ("1.5".equals(version)) {
- return TestConfigurator.getProperty(TestConfigurator.Keys.JAVA_HOME_15);
- }
- if ("1.6".equals(version)) {
- return TestConfigurator.getProperty(TestConfigurator.Keys.JAVA_HOME_16);
- }
- failParsing();
- return null;
- }
- private void failParsing() {
- fail("Unable to add JRE runtime, unsupported verson :"+version);
- }
-
-}
Copied:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJava.java
(from rev 21883,
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJRE.java)
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJava.java
(rev 0)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJava.java 2010-05-05
08:11:37 UTC (rev 21901)
@@ -0,0 +1,48 @@
+package org.jboss.tools.ui.bot.ext.config.requirement;
+
+import static org.junit.Assert.fail;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.TestConfigurator;
+/**
+ * adds JRE among Installed JRE's
+ * @author lzoubek
+ *
+ */
+public class AddJava extends RequirementBase {
+
+ private final String version;
+ /**
+ * requirement for adding JRE
+ * @param version to add
+ */
+ public AddJava(String version) {
+ this.version = version;
+ }
+ @Override
+ public boolean checkFulfilled() {
+ return SWTTestExt.configuredState.getJreList().contains(getAddedAsName());
+ }
+
+ @Override
+ public void handle(){
+ SWTTestExt.eclipse.addJavaVM(getAddedAsName(), getJavaHome());
+ SWTTestExt.configuredState.getJreList().add(getAddedAsName());
+ }
+ public String getAddedAsName() {
+ return "JRE-"+version;
+ }
+ private String getJavaHome() {
+ if ("1.5".equals(version)) {
+ return TestConfigurator.getProperty(TestConfigurator.Keys.JAVA_HOME_15);
+ }
+ if ("1.6".equals(version)) {
+ return TestConfigurator.getProperty(TestConfigurator.Keys.JAVA_HOME_16);
+ }
+ failParsing();
+ return null;
+ }
+ private void failParsing() {
+ fail("Unable to add JRE runtime, unsupported verson :"+version);
+ }
+
+}
Property changes on:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddJava.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java 2010-05-05
08:01:05 UTC (rev 21900)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/AddServer.java 2010-05-05
08:11:37 UTC (rev 21901)
@@ -8,10 +8,12 @@
import org.jboss.tools.ui.bot.ext.gen.IServerRuntime;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossCommunityJBossAS42;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossCommunityJBossAS50;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossCommunityJBossAS60;
import
org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform43;
import
org.jboss.tools.ui.bot.ext.gen.ActionItem.Server.JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform50;
import
org.jboss.tools.ui.bot.ext.gen.ActionItem.ServerRuntime.JBossCommunityJBoss42Runtime;
import
org.jboss.tools.ui.bot.ext.gen.ActionItem.ServerRuntime.JBossCommunityJBoss50Runtime;
+import
org.jboss.tools.ui.bot.ext.gen.ActionItem.ServerRuntime.JBossCommunityJBoss60Runtime;
import
org.jboss.tools.ui.bot.ext.gen.ActionItem.ServerRuntime.JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform43Runtime;
import
org.jboss.tools.ui.bot.ext.gen.ActionItem.ServerRuntime.JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform50Runtime;
/**
@@ -25,7 +27,7 @@
public AddServer() {
String javaVer = getNeededJavaVersion(TestConfigurator.server.withJavaVersion);
if (javaVer!=null) {
- AddJRE addJava = createAddJRE(javaVer);
+ AddJava addJava = createAddJRE(javaVer);
getDependsOn().add(addJava);
javaName=addJava.getAddedAsName();
}
@@ -73,6 +75,7 @@
return new
ServerInfo(JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform50Runtime.LABEL,
JBossEnterpriseMiddlewareJBossEnterpriseApplicationPlatform50.LABEL);
}
+
} else if (TestConfigurator.Values.SERVER_TYPE_JBOSSAS.equals(serverType)) {
if ("4.2".equals(version)) {
return new
ServerInfo(JBossCommunityJBoss42Runtime.LABEL,JBossCommunityJBossAS42.LABEL);
@@ -80,6 +83,9 @@
if ("5.0".equals(version)) {
return new
ServerInfo(JBossCommunityJBoss50Runtime.LABEL,JBossCommunityJBossAS50.LABEL);
}
+ if ("6.0".equals(version)) {
+ return new
ServerInfo(JBossCommunityJBoss60Runtime.LABEL,JBossCommunityJBossAS60.LABEL);
+ }
}
failParsing();
return null;
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearWorkspace.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearWorkspace.java 2010-05-05
08:01:05 UTC (rev 21900)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearWorkspace.java 2010-05-05
08:11:37 UTC (rev 21901)
@@ -1,38 +1,19 @@
package org.jboss.tools.ui.bot.ext.config.requirement;
-import java.util.List;
-import java.util.Vector;
-
import org.jboss.tools.ui.bot.ext.SWTTestExt;
-import org.jboss.tools.ui.bot.ext.gen.IView;
public class ClearWorkspace extends RequirementBase {
-
+ // this requirement will always run handle();
+ private boolean once = false;
@Override
public boolean checkFulfilled() {
- try {
- return SWTTestExt.bot.shells().length==2 && SWTTestExt.bot.editors().isEmpty()
&& !SWTTestExt.configuredState.isWelcomeViewVisible();
- }
- catch (Exception ex) {
- log.error("Cannot determine, if all editors and shells are closed", ex);
- return false;
- }
+ return once;
}
@Override
public void handle() {
SWTTestExt.bot.closeAllShells();
SWTTestExt.bot.closeAllEditors();
- SWTTestExt.open.viewClose(new IView(){
- public List<String> getGroupPath() {
- // TODO Auto-generated method stub
- return new Vector<String>();
- }
- public String getName() {
- // TODO Auto-generated method stub
- return "Welcome";
- }});
- SWTTestExt.configuredState.setWelcomeViewVisible(false);
-
+ once = true;
}
}
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java 2010-05-05
08:01:05 UTC (rev 21900)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/PrepareViews.java 2010-05-05
08:11:37 UTC (rev 21901)
@@ -24,11 +24,9 @@
public void handle() {
SWTTestExt.open.viewClose(new IView(){
public List<String> getGroupPath() {
- // TODO Auto-generated method stub
return new Vector<String>();
}
public String getName() {
- // TODO Auto-generated method stub
return "Welcome";
}});
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java 2010-05-05
08:01:05 UTC (rev 21900)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RequirementBase.java 2010-05-05
08:11:37 UTC (rev 21901)
@@ -115,9 +115,13 @@
RequirementBase req = new AddSeam();
return req;
}
+ public static RequirementBase createAddESB() {
+ RequirementBase req = new AddESB();
+ return req;
+ }
- public static AddJRE createAddJRE(String version) {
- AddJRE req = new AddJRE(version);
+ public static AddJava createAddJRE(String version) {
+ AddJava req = new AddJava(version);
return req;
}
@@ -138,5 +142,12 @@
req.setPriority(-1);
return req;
}
+ public static RequirementBase createPrepareViews() {
+ RequirementBase req = new PrepareViews();
+ req.setPriority(2);
+ return req;
+ }
+
+
}
Modified:
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
---
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-05-05
08:01:05 UTC (rev 21900)
+++
trunk/jst/tests/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2010-05-05
08:11:37 UTC (rev 21901)
@@ -117,7 +117,8 @@
public static final String RENAME_COMPILATION_UNIT = "Rename Compilation
Unit";
public static final String RENAME_JAVA_PROJECT = "Rename Java Project";
public static final String CONFIRM_PERSPECTIVE_SWITCH = "Confirm Perspective
Switch";
- public static final String NEW_SEAM_RUNTIME = "New Seam Runtime";
+ public static final String NEW_SEAM_RUNTIME = "New Seam Runtime";
+ public static final String NEW_ESB_RUNTIME = "New JBoss ESB Runtime";
}
public class EntityGroup {