[jbosstools-commits] JBoss Tools SVN: r43215 - branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Aug 24 07:49:18 EDT 2012


Author: ljelinko
Date: 2012-08-24 07:49:18 -0400 (Fri, 24 Aug 2012)
New Revision: 43215

Modified:
   branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java
Log:
Added special treatment for Windows. 

Modified: branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java
===================================================================
--- branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java	2012-08-24 11:44:40 UTC (rev 43214)
+++ branches/jbosstools-3.3.x/portlet/tests/org.jboss.tools.portlet.ui.bot.test/src/org/jboss/tools/portlet/ui/bot/task/server/MarkFileAsDeployableTask.java	2012-08-24 11:49:18 UTC (rev 43215)
@@ -1,12 +1,16 @@
 package org.jboss.tools.portlet.ui.bot.task.server;
 
+import static org.eclipse.swtbot.swt.finder.waits.Conditions.shellIsActive;
+
 import java.awt.AWTException;
 import java.awt.Robot;
 import java.awt.event.KeyEvent;
 
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
 import org.jboss.tools.portlet.ui.bot.entity.WorkspaceFile;
 import org.jboss.tools.portlet.ui.bot.task.AbstractSWTTask;
 import org.jboss.tools.portlet.ui.bot.task.workspace.FileContextMenuSelectingTask;
+import org.jboss.tools.ui.bot.ext.SWTBotFactory;
 
 /**
  * Marks a file as deployable for the specified server (it works only if there is just one server defined) 
@@ -24,7 +28,25 @@
 
 	@Override
 	public void perform() {
+		System.out.println("*** Shells: ***");
+		SWTBotShell activeShell = SWTBotFactory.getBot().activeShell();
+		System.out.println("A: " + activeShell.getText());
+		for (SWTBotShell shell : SWTBotFactory.getBot().shells()){
+			System.out.println(shell.getText());
+		}
+
+
 		performInnerTask(new FileContextMenuSelectingTask(workspaceFile, "Mark as Deployable"));
+
+		SWTBotFactory.getBot().waitUntil(shellIsActive("Really mark these resources as deployable?"));
+
+		System.out.println("---------");
+		activeShell = SWTBotFactory.getBot().activeShell();
+		System.out.println("A: " + activeShell.getText());
+		for (SWTBotShell shell : SWTBotFactory.getBot().shells()){
+			System.out.println(shell.getText());
+		}
+
 		// for the confirmation dialog select OK (the dialog is native and normal swtbot functions do now work)
 		try {
 			Robot robot = new Robot();



More information about the jbosstools-commits mailing list