Add utility method to close secondary shells after tests
[deliverable/tracecompass.git] / releng / org.eclipse.tracecompass.integration.swtbot.tests / src / org / eclipse / tracecompass / integration / swtbot / tests / projectexplorer / ProjectExplorerTraceActionsTest.java
index 8546a9afd31c453e7a6ea9bbac717537dadf4d8a..a35085cc7fb42f2f5152c8c09aea6f4eece1b5c3 100644 (file)
@@ -41,6 +41,7 @@ import org.eclipse.tracecompass.tmf.ui.swtbot.tests.shared.ConditionHelpers;
 import org.eclipse.tracecompass.tmf.ui.swtbot.tests.shared.SWTBotUtils;
 import org.eclipse.tracecompass.tmf.ui.views.statistics.TmfStatisticsView;
 import org.eclipse.ui.IEditorReference;
+import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -118,6 +119,14 @@ public class ProjectExplorerTraceActionsTest {
         fLogger.removeAllAppenders();
     }
 
+    /**
+     * Test tear down method.
+     */
+    @After
+    public void afterTest() {
+        SWTBotUtils.closeSecondaryShells(fBot);
+    }
+
     /**
      * Test that the expected context menu items are there
      * <p>
@@ -308,7 +317,6 @@ public class ProjectExplorerTraceActionsTest {
     public void test4_08OpenDoubleClick() throws WidgetNotFoundException {
         SWTBotUtils.openTrace(TRACE_PROJECT_NAME, fTestFile.getAbsolutePath(), CUSTOM_TEXT_LOG.getTraceType());
         SWTBotTreeItem traceItem = SWTBotUtils.getTraceProjectItem(fBot, SWTBotUtils.selectTracesFolder(fBot, TRACE_PROJECT_NAME), TRACE_NAME);
-        traceItem.select();
         traceItem.doubleClick();
 
         testEventsTable(TRACE_NAME);
@@ -329,7 +337,6 @@ public class ProjectExplorerTraceActionsTest {
     public void test4_09BringToTop() {
         SWTBotUtils.openTrace(TRACE_PROJECT_NAME, fTestFile.getAbsolutePath(), CUSTOM_TEXT_LOG.getTraceType());
         SWTBotTreeItem traceItem = SWTBotUtils.getTraceProjectItem(fBot, SWTBotUtils.selectTracesFolder(fBot, TRACE_PROJECT_NAME), TRACE_NAME);
-        traceItem.select();
         traceItem.doubleClick();
         fBot.waitUntil(new ConditionHelpers.ActiveEventsEditor(fBot, TRACE_NAME));
         IEditorReference originalEditor = fBot.activeEditor().getReference();
@@ -337,12 +344,9 @@ public class ProjectExplorerTraceActionsTest {
         createCopy(traceItem);
 
         SWTBotTreeItem copiedItem = SWTBotUtils.getTraceProjectItem(fBot, SWTBotUtils.selectTracesFolder(fBot, TRACE_PROJECT_NAME), RENAMED_TRACE_NAME);
-        copiedItem.select();
-        copiedItem.doubleClick();
         copiedItem.doubleClick();
         fBot.waitUntil(new ConditionHelpers.ActiveEventsEditor(fBot, RENAMED_TRACE_NAME));
         SWTBotUtils.delay(1000);
-        traceItem.select();
         traceItem.doubleClick();
         fBot.waitUntil(new ConditionHelpers.ActiveEventsEditor(fBot, TRACE_NAME));
         assertTrue(originalEditor == fBot.activeEditor().getReference());
This page took 0.024808 seconds and 5 git commands to generate.