Skip to content
This repository
Browse code

STS-3046: Fix eclipse-integration-tcserver tests executed in a mvn build

  • Loading branch information...
commit 19c569e9d75148f6dda17894728f56411a5c103b 1 parent a086d62
Tomasz Zarna authored November 28, 2012
2  org.springsource.ide.eclipse.commons.frameworks.test.util/META-INF/MANIFEST.MF
@@ -6,7 +6,7 @@ Bundle-Version: 3.2.0.qualifier
6 6
 Bundle-ActivationPolicy: lazy
7 7
 Bundle-Vendor: SpringSource
8 8
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
9  
-Require-Bundle: org.eclipse.swtbot.go;resolution:=optional,
  9
+Require-Bundle: org.eclipse.swtbot.go,
10 10
  org.eclipse.core.resources,
11 11
  org.springsource.ide.eclipse.commons.tests.util,
12 12
  org.eclipse.debug.core
17  ...mons.frameworks.test.util/src/org/springsource/ide/eclipse/commons/frameworks/test/util/SWTBotUtils.java
@@ -11,6 +11,7 @@
11 11
 package org.springsource.ide.eclipse.commons.frameworks.test.util;
12 12
 
13 13
 import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.widgetOfType;
  14
+import static org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory.withRegex;
14 15
 import static org.eclipse.swtbot.swt.finder.waits.Conditions.waitForShell;
15 16
 import static org.junit.Assert.assertTrue;
16 17
 
@@ -63,6 +64,7 @@
63 64
  * Utility methods that are useful in writing SWTBot tests.
64 65
  * @author Kris De Volder
65 66
  * @author Nieraj Singh
  67
+ * @author Tomasz Zarna
66 68
  */
67 69
 public class SWTBotUtils {
68 70
 
@@ -197,12 +199,23 @@ public static SWTBotShell shell(SWTBotShell parentShell) {
197 199
 		return new SWTBotShell(shells(parentShell).get(0));
198 200
 	}
199 201
 
  202
+	/**
  203
+	 * Wait for a shell with the given regular expression.
  204
+	 * 
  205
+	 * @param bot the SWTBot
  206
+	 * @param regex the regular expression
  207
+	 */
  208
+	public static void waitForShellWithRegex(SWTBot bot, String regex) {
  209
+		Matcher<Shell> withRegex = withRegex(regex);
  210
+		WaitForObjectCondition<Shell> waitForShell = waitForShell(withRegex);
  211
+		bot.waitUntilWidgetAppears(waitForShell);
  212
+	}
  213
+
200 214
 	public static void doubleClick(SWTWorkbenchBot bot,
201 215
 			final SWTBotTable table, int row, int col) {
202 216
 		table.click(row, col);
203 217
 		// Note: table.doubleClick() method doesn't work, table appears not to
204  
-		// be listenening
205  
-		// to the events that are being posted by this method.
  218
+		// be listening to the events that are being posted by this method.
206 219
 		// Use this workaround instead:
207 220
 		// http://dev.eclipse.org/mhonarc/newsLists/news.eclipse.swtbot/msg00309.html
208 221
 		UIThreadRunnable.asyncExec(bot.getDisplay(), new VoidResult() {

0 notes on commit 19c569e

Please sign in to comment.
Something went wrong with that request. Please try again.