[jbosstools-commits] JBoss Tools SVN: r42198 - trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Jun 25 10:58:05 EDT 2012


Author: jjankovi
Date: 2012-06-25 10:58:05 -0400 (Mon, 25 Jun 2012)
New Revision: 42198

Modified:
   trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/RESTFullExplorer.java
Log:
fixing RESTfullExplorer

Modified: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/RESTFullExplorer.java
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/RESTFullExplorer.java	2012-06-25 14:57:06 UTC (rev 42197)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/uiutils/RESTFullExplorer.java	2012-06-25 14:58:05 UTC (rev 42198)
@@ -11,11 +11,9 @@
 
 package org.jboss.tools.ws.ui.bot.test.uiutils;
 
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
-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.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
 import org.jboss.tools.ws.ui.bot.test.rest.RESTFulAnnotations;
 
 public class RESTFullExplorer extends SWTTestExt {
@@ -40,7 +38,7 @@
 	public SWTBotTreeItem restService(String method) {
 		SWTBotTreeItem getMethod = null;
 		for (SWTBotTreeItem ti : getAllRestServices()) {
-			if (ti.getText().contains("GET")) {
+			if (ti.getText().contains(method)) {
 				getMethod = ti;
 				break;
 			}
@@ -49,11 +47,10 @@
 	}
 	
 	public RunOnServerDialog runOnServer(SWTBotTreeItem service) {
-		SWTBotTree tree = projectExplorer.bot().tree();
-		ContextMenuHelper.prepareTreeItemForContextMenu(tree, service);
-		SWTBotMenu menu = new SWTBotMenu(ContextMenuHelper.
-				getContextMenu(tree, "Run As", false));
-		menu.menu("1 Run on Server").click();
+		service.select();
+		bot.menu(IDELabel.Menu.RUN).
+			menu(IDELabel.Menu.RUN_AS).
+			menu("1 " + IDELabel.Menu.RUN_ON_SERVER).click();
 		return new RunOnServerDialog();
 	}
 	



More information about the jbosstools-commits mailing list