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

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu Sep 6 07:10:35 EDT 2012


Author: jpeterka
Date: 2012-09-06 07:10:35 -0400 (Thu, 06 Sep 2012)
New Revision: 43465

Modified:
   trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/src/org/jboss/tools/freemarker/ui/bot/test/FreeMarkerSuite.java
   trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/src/org/jboss/tools/freemarker/ui/bot/test/FreeMarkerTest.java
Log:
Freemarker ui test updated to run on different target platforms & to use RequireAwareSuite

Modified: trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/src/org/jboss/tools/freemarker/ui/bot/test/FreeMarkerSuite.java
===================================================================
--- trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/src/org/jboss/tools/freemarker/ui/bot/test/FreeMarkerSuite.java	2012-09-06 11:10:21 UTC (rev 43464)
+++ trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/src/org/jboss/tools/freemarker/ui/bot/test/FreeMarkerSuite.java	2012-09-06 11:10:35 UTC (rev 43465)
@@ -1,10 +1,10 @@
 package org.jboss.tools.freemarker.ui.bot.test;
 
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
 import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
 
- at RunWith(Suite.class)
+ at RunWith(RequirementAwareSuite.class)
 @SuiteClasses({FreeMarkerTest.class})
 public class FreeMarkerSuite {
 

Modified: trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/src/org/jboss/tools/freemarker/ui/bot/test/FreeMarkerTest.java
===================================================================
--- trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/src/org/jboss/tools/freemarker/ui/bot/test/FreeMarkerTest.java	2012-09-06 11:10:21 UTC (rev 43464)
+++ trunk/freemarker/tests/org.jboss.tools.freemarker.ui.bot.test/src/org/jboss/tools/freemarker/ui/bot/test/FreeMarkerTest.java	2012-09-06 11:10:35 UTC (rev 43465)
@@ -12,10 +12,10 @@
 
 import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
 import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
-import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
 import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Require;
 import org.jboss.tools.ui.bot.ext.gen.ActionItem;
 import org.jboss.tools.ui.bot.ext.helper.FileHelper;
 import org.jboss.tools.ui.bot.ext.helper.ImportHelper;
@@ -27,14 +27,13 @@
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 
 /**
  * Freemarker ui bot test
  * @author jpeterka
  *
  */
- at RunWith(SWTBotJunit4ClassRunner.class)
+ at Require(perspective="Java")
 public class FreeMarkerTest extends SWTTestExt {
 
 	private String prj = "org.jboss.tools.freemarker.testprj";
@@ -46,9 +45,9 @@
 		eclipse.closeAllEditors();
 
 		util.waitForAll();
-		String title = "Resource - Eclipse Platform";
-		bot.waitForShell(title);
-		SWTBotShell shell = bot.shell(title);
+		List<SWTBotShell> shells = bot.waitForNumberOfShells(1);
+		SWTBotShell shell = bot.shell(shells.get(0).getText());
+		log.info(shell.getText());
 		shell.activate();
 		shell.setFocus();
 		open.perspective(ActionItem.Perspective.JAVA.LABEL);



More information about the jbosstools-commits mailing list