[jbosstools-commits] JBoss Tools SVN: r39304 - in trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext: condition and 2 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Tue Mar 6 11:23:02 EST 2012


Author: rhopp
Date: 2012-03-06 11:23:01 -0500 (Tue, 06 Mar 2012)
New Revision: 39304

Modified:
   trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTFormsBotExt.java
   trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/BrowserIsLoaded.java
   trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java
   trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java
   trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
Log:
Just a bunch of minor updates.

Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTFormsBotExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTFormsBotExt.java	2012-03-06 15:05:16 UTC (rev 39303)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTFormsBotExt.java	2012-03-06 16:23:01 UTC (rev 39304)
@@ -57,7 +57,7 @@
 		}catch(WidgetNotFoundException ex){
 			throw new WidgetNotFoundException("Could not find widget of type FormText", ex);
 		}catch(IndexOutOfBoundsException ex){
-			throw new ArrayIndexOutOfBoundsException("There is widget Form Text with such a index");
+			throw new ArrayIndexOutOfBoundsException("There is no widget Form Text with text: "+text+" and index: "+index);
 		}
 	}
 

Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/BrowserIsLoaded.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/BrowserIsLoaded.java	2012-03-06 15:05:16 UTC (rev 39303)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/condition/BrowserIsLoaded.java	2012-03-06 16:23:01 UTC (rev 39304)
@@ -2,6 +2,8 @@
 
 import org.eclipse.swtbot.swt.finder.SWTBot;
 import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.results.VoidResult;
 import org.eclipse.swtbot.swt.finder.waits.ICondition;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
 import org.jboss.tools.ui.bot.ext.parts.SWTBotBrowserExt;
@@ -20,7 +22,7 @@
 	private SWTBotBrowserExt browser;
 	
 	public BrowserIsLoaded(SWTBotBrowserExt browser){
-		super();
+		browser.addProgressListenerToBrowser();
 		this.browser = browser;
 	}
 	
@@ -38,7 +40,6 @@
 
 	@Override
 	public void init(SWTBot bot) {
-		browser.addProgressListenerToBrowser();
 		this.bot = bot;
 	}
 

Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java	2012-03-06 15:05:16 UTC (rev 39303)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java	2012-03-06 16:23:01 UTC (rev 39304)
@@ -36,10 +36,9 @@
 	}
 	
 	public AbstractSWTBotControl<FormText> click()  {
-		Event e = createEvent();
-		e.text = getText();
-		notify(SWT.MouseDown, e);
-		return click(true);
+		setFocus();
+		keyboard().typeCharacter('\r');
+		return this;
 	}
 	
 	public String selectedLinkText() {

Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java	2012-03-06 15:05:16 UTC (rev 39303)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotTwistie.java	2012-03-06 16:23:01 UTC (rev 39304)
@@ -8,6 +8,7 @@
 import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
 import org.eclipse.swtbot.swt.finder.results.BoolResult;
 import org.eclipse.swtbot.swt.finder.results.StringResult;
+import org.eclipse.swtbot.swt.finder.results.VoidResult;
 import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl;
 import org.eclipse.ui.forms.widgets.Twistie;
 import org.hamcrest.SelfDescribing;
@@ -50,8 +51,15 @@
 	 * Toggles twistie (expands its section)
 	 */
 	public AbstractSWTBotControl<Twistie> toggle() {
-		setFocus();
-		keyboard().typeCharacter('\r');
+		syncExec(new VoidResult() {
+			
+			@Override
+			public void run() {
+				clickXY(widget.getBounds().x+3, widget.getBounds().y+3);
+			}
+		});
+		/*setFocus();
+		keyboard().typeCharacter('\r');*/
 		return this;
 	}
 	

Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java	2012-03-06 15:05:16 UTC (rev 39303)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java	2012-03-06 16:23:01 UTC (rev 39304)
@@ -825,11 +825,11 @@
 	   public static final String JAVA_EE_WEB_PROJECT = "Java EE Web Project";
 	   public static final String HTML5_PROJECT = "HTML5 Project";
 	   public static final String RICHFACES_PROJECT = "RichFaces Project";
-	   public static final String OPENSHIFT_APP = "OpenShift Express Application";
+	   public static final String OPENSHIFT_APP = "OpenShift Application";
 	   public static final String JAVA_EE_PROJECT = "Java EE Project";
 	   public static final String SPRING_MVC_PROJECT = "Spring MVC Project";
 	   public static final String NEW_DYNAMIC_WEB_PROJECT = "New Dynamic Web Project";
-	   public static final String PROJECT_EXAMPLE = "Project Example";
+	   public static final String PROJECT_EXAMPLE = "New Project Example";
 	   public static final String NEW_JBOSS_PROJECT = "New JBoss Project";
 	   public static final String OPENSHIFT_APP_WIZARD = "New OpenShift Express Application";
    }



More information about the jbosstools-commits mailing list