Author: ldimaggio
Date: 2012-01-23 22:11:54 -0500 (Mon, 23 Jan 2012)
New Revision: 38068
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Timing.java
Log:
SWTEclipseExt.java - JBQA-5837 - JBQA ESB tests - resolve issue in
SWTEclipseExt.getFormattedTreeNode() - formatting of returned errors
Timing.java, SWTTestExt.java - added 30 second timeout value
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2012-01-24
02:09:22 UTC (rev 38067)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java 2012-01-24
03:11:54 UTC (rev 38068)
@@ -372,6 +372,8 @@
* @return
*/
public static SWTBotTreeItem selectTreeLocation(SWTBot bot, String... path) {
+
+
SWTBot viewBot = bot;
@@ -419,6 +421,9 @@
/* Re-expand the tree - commented out as this does not seem to help */
//theBot.tree().collapseNode(groupLabel);
//theBot.tree().expandNode(groupLabel);
+ //theBot.tree().getTreeItem(groupLabel).click();
+ //theBot.tree().setFocus();
+ //theBot.tree().getTreeItem(groupLabel).expand();
log.info ("Located Problems view - " +
theBot.tree().expandNode(groupLabel).expandNode(viewLabel).getText() );
tempItem = theBot.tree().expandNode(groupLabel).expandNode(viewLabel).select();
@@ -426,6 +431,7 @@
theBot.sleep(Timing.time3S());
counter++;
}
+ theBot.sleep(Timing.time30S());
}
@@ -1231,12 +1237,11 @@
//bot.sleep(30000l);
//System.out.println (treeItem.contextMenu("Run As").menu("2 Java
Application").getText());
- //bot.sleep(30000l);
- bot.sleep(Timing.time1S());
+ bot.sleep(30000l);
treeItem.contextMenu("Run As").menu("2 Java
Application").click();
//runJavaApplication("helloworld_testclient","org.jboss.soa.esb.samples.quickstart.helloworld.test.SendJMSMessage","
");
- //bot.sleep(30000l); // This is needed to enable the test to run successfully to
completion
- bot.waitForShell(IDELabel.Shell.PROGRESS_INFORMATION);
+ bot.sleep(30000l); // This is needed to enable the test to run successfully to
completion
+
}
/**
@@ -1400,14 +1405,15 @@
if (item.row()==null) {
return item.getText();
}
- StringBuilder sb = new StringBuilder("");
+ StringBuilder sb = new StringBuilder("");
for (int i=0;i<item.row().columnCount();i++) {
String text = item.row().get(i);
if (text==null) {
sb.append("\"<null>\"");
}
else {
- sb.append(String.format("\"{0}\"", text));
+ //sb.append(String.format("\"{0}\"", text));
+ sb.append(String.format("\"{%s}\"", text)); /*
https://issues.jboss.org/browse/JBQA-5837 - ldimaggi */
}
}
return sb.toString();
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java 2012-01-24
02:09:22 UTC (rev 38067)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTTestExt.java 2012-01-24
03:11:54 UTC (rev 38068)
@@ -67,6 +67,8 @@
public static int TIME_5S = Timing.time5S();
public static int TIME_10S = Timing.time10S();
public static int TIME_20S = Timing.time20S();
+ public static int TIME_30S = Timing.time30S();
+ public static int TIME_60S = Timing.time60S();
protected void setUp() throws Exception {
super.setUp();
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Timing.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Timing.java 2012-01-24
02:09:22 UTC (rev 38067)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/Timing.java 2012-01-24
03:11:54 UTC (rev 38068)
@@ -38,6 +38,12 @@
public static int time20S() {
return (int) Math.round(20000*multiplier);
}
+ public static int time30S() {
+ return (int) Math.round(30000*multiplier);
+ }
+ public static int time60S() {
+ return (int) Math.round(60000*multiplier);
+ }
public static int time5S() {
return (int) Math.round(5000*multiplier);
}