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

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Mon Aug 27 02:36:34 EDT 2012


Author: jjankovi
Date: 2012-08-27 02:36:34 -0400 (Mon, 27 Aug 2012)
New Revision: 43236

Modified:
   trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesTestBase.java
   trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/VariousProjectsArchiving.java
Log:
enhancing of archive bot tests

Modified: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesTestBase.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesTestBase.java	2012-08-27 06:35:38 UTC (rev 43235)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/ArchivesTestBase.java	2012-08-27 06:36:34 UTC (rev 43236)
@@ -106,9 +106,10 @@
 		return serversView;
 	}
 	
-	public void assertClearErrorLog() {
-		assertTrue("Error log contains some records", 
-				new ErrorLogView().getRecordCount() == 0);
+	public void assertClearArchivesErrorLog() {
+		
+		assertTrue("Error log contains archive errors", 
+				countOfArchivesErrors() == 0);
 	}
 	
 	public static void showErrorView() {
@@ -144,4 +145,15 @@
 		ImportHelper.importProject(projectLocation, dir, Activator.PLUGIN_ID);
 	}
 	
+	private int countOfArchivesErrors() {
+		ErrorLogView errorLog = new ErrorLogView();
+		int archivesErrorsCount = 0;
+		for (SWTBotTreeItem ti : errorLog.getMessages()) {
+			if (ti.getText().contains("org.jboss.ide.eclipse.archives")) {
+				archivesErrorsCount++;
+			}
+		}
+		return archivesErrorsCount;
+	}
+	
 }

Modified: trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/VariousProjectsArchiving.java
===================================================================
--- trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/VariousProjectsArchiving.java	2012-08-27 06:35:38 UTC (rev 43235)
+++ trunk/archives/tests/org.jboss.tools.archives.ui.bot.test/src/org/jboss/tools/archives/ui/bot/test/VariousProjectsArchiving.java	2012-08-27 06:36:34 UTC (rev 43236)
@@ -35,7 +35,7 @@
 	
 	@After
 	public void checkErrorLog() {
-		assertClearErrorLog();
+		assertClearArchivesErrorLog();
 	}
 	
 	@Test
@@ -54,9 +54,6 @@
 		/* create archive */
 		view.createNewJarArchive(project).finish();
 		
-		/* workaround JBIDE-11878 */
-		view = viewForProject(project);
-		
 		/* test if archive was created and no error was thrown*/
 		assertItemExistsInView(view, 
 				project, project + ".jar [/" + project + "]");
@@ -78,9 +75,6 @@
 		/* create archive */
 		view.createNewJarArchive(project).finish();
 		
-		/* workaround JBIDE-11878 */
-		view = viewForProject(project);
-		
 		/* test if archive was created and no error was thrown*/
 		assertItemExistsInView(view, 
 				project, project + ".jar [/" + project + "]");



More information about the jbosstools-commits mailing list