[jbosstools-commits] JBoss Tools SVN: r43421 - in trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test: view and 1 other directory.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Wed Sep 5 11:51:50 EDT 2012


Author: jjankovi
Date: 2012-09-05 11:51:50 -0400 (Wed, 05 Sep 2012)
New Revision: 43421

Modified:
   trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/CreatingArchiveTest.java
   trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/view/ProjectArchivesView.java
Log:
fixing archive bot tests

Modified: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/CreatingArchiveTest.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/CreatingArchiveTest.java	2012-09-05 15:37:38 UTC (rev 43420)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/CreatingArchiveTest.java	2012-09-05 15:51:50 UTC (rev 43421)
@@ -53,8 +53,14 @@
 		eclipse.createJavaProject(jpe);
 	}
 	
-	@Test
-	public void testCreatingArchiveWithView() {
+	@Test 
+	public void testCreatingArchive() {
+		// workaround because of JBIDE-11927
+		testCreatingArchiveWithView();
+		testCreatingArchiveWithExplorer();
+	}
+	
+	private void testCreatingArchiveWithView() {
 		
 		/* prepare view for testing */
 		ProjectArchivesView view = viewForProject(project);
@@ -74,8 +80,7 @@
 		assertItemExistsInView(view, project, ARCHIVE_NO_COMPRESSION_1_PATH);
 	}
 	
-	@Test
-	public void testCreatingArchiveWithExplorer() {
+	private void testCreatingArchiveWithExplorer() {
 		
 		/* prepare explorer for testing */
 		ProjectArchivesExplorer explorer = explorerForProject(project);

Modified: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/view/ProjectArchivesView.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/view/ProjectArchivesView.java	2012-09-05 15:37:38 UTC (rev 43420)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/view/ProjectArchivesView.java	2012-09-05 15:51:50 UTC (rev 43421)
@@ -16,6 +16,7 @@
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
 import org.jboss.tools.archives.ui.bot.test.context.ArchiveContextMenu;
 import org.jboss.tools.archives.ui.bot.test.dialog.ArchivePublishSettingsDialog;
 import org.jboss.tools.archives.ui.bot.test.dialog.EditArchiveDialog;
@@ -115,7 +116,7 @@
 			this.bot().tree(0).getTreeItem(path[0]).collapse();
 			TreeHelper.expandNode(bot(), path);
 			return true;
-		} catch (WidgetNotFoundException exc) {
+		} catch (TimeoutException exc) {
 			return false;
 		}
 	}



More information about the jbosstools-commits mailing list