[jbosstools-commits] JBoss Tools SVN: r39455 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Mar 12 22:44:22 EDT 2012


Author: ldimaggio
Date: 2012-03-12 22:44:21 -0400 (Mon, 12 Mar 2012)
New Revision: 39455

Modified:
   trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java
   trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java
Log:
ext/ExampleTest.java - Updated to match UI changes on import of new examples
ext/SWTEclipseExt.java - added missing wait loop for slow-to-paint elements



Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java	2012-03-13 01:19:45 UTC (rev 39454)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/ExampleTest.java	2012-03-13 02:44:21 UTC (rev 39455)
@@ -86,6 +86,9 @@
 	 */
 	protected void importExample(SWTBot wiz) {
 		String hasProjName = wiz.textWithLabel(JBossToolsProjectExamples.TEXT_PROJECT_NAME).getText();
+		
+		System.out.println("DEBUG1 - " + JBossToolsProjectExamples.TEXT_PROJECT_NAME );
+		
 		assertTrue(String.format("Example project name changed, have '%s', expected '%s'",hasProjName,getProjectNames()[0]),hasProjName.equals(getProjectNames()[0]));
 		int projSize = getProjectSize(wiz.textWithLabel(JBossToolsProjectExamples.TEXT_PROJECT_SIZE).getText());
 		wiz.button(IDELabel.Button.FINISH).click();
@@ -93,8 +96,10 @@
 		shell.activate();
 		bot.waitUntil(shellCloses(shell),Timing.time(projSize*20*1000));
 		util.waitForNonIgnoredJobs(Timing.time20S());
-		bot.waitForShell("New Project Example");
-		bot.shell("New Project Example").bot().button(IDELabel.Button.FINISH).click();
+		/* ldimaggi - removed - March 11, 2012 - UI changed */
+		//bot.waitForShell("New Project Example");		
+		//bot.shell("New Project Example").bot().button(IDELabel.Button.FINISH).click();
+		
 		for (String project : getProjectNames()) {
 			assertTrue(String.format("Example project '%s' was not found in project explorer",project),projectExplorer.existsResource(project));
 		}		

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-03-13 01:19:45 UTC (rev 39454)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTEclipseExt.java	2012-03-13 02:44:21 UTC (rev 39455)
@@ -372,8 +372,6 @@
 	 * @return
 	 */
 	public static SWTBotTreeItem selectTreeLocation(SWTBot bot, String... path) {
-		
-		
 
 		SWTBot viewBot = bot;
 
@@ -425,12 +423,13 @@
 			//theBot.tree().setFocus();
 			//theBot.tree().getTreeItem(groupLabel).expand();
 			
-			log.info ("Located Problems view - " + theBot.tree().expandNode(groupLabel).expandNode(viewLabel).getText() );
+			log.info ("Located view - " + theBot.tree().expandNode(groupLabel).expandNode(viewLabel).getText() );
 			tempItem = theBot.tree().expandNode(groupLabel).expandNode(viewLabel).select();
-			theBot.sleep(Timing.time3S());
+			if (tempItem == null) {
+				theBot.sleep(Timing.time3S());
+			}
 			counter++;
-		}
-		
+		}		
 	}
 	
 	
@@ -1362,6 +1361,7 @@
       }
       
       SWTBotTreeItem[] nodeChildren = parent.getItems();
+       
       if (nodeChildren != null){
         for (SWTBotTreeItem child : nodeChildren){
           if (child.getText().length() > 0){



More information about the jbosstools-commits mailing list