JAL-2154 clear the desktop before every 2xml test
authorJim Procter <jprocter@issues.jalview.org>
Thu, 11 Aug 2016 20:36:09 +0000 (21:36 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Thu, 11 Aug 2016 20:36:09 +0000 (21:36 +0100)
test/jalview/io/Jalview2xmlBase.java

index bfd5ca4..d774f87 100644 (file)
@@ -3,12 +3,14 @@ package jalview.io;
 import jalview.bin.Cache;
 import jalview.datamodel.AlignmentAnnotation;
 import jalview.datamodel.SequenceI;
+import jalview.gui.Desktop;
 
 import java.time.Instant;
 import java.util.Date;
 
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeTest;
 
 public class Jalview2xmlBase
 {
@@ -36,6 +38,12 @@ public class Jalview2xmlBase
     jalview.gui.Desktop.instance.closeAll_actionPerformed(null);
   }
 
+  @BeforeTest(alwaysRun = true)
+  public static void clearDesktop()
+  {
+    Desktop.instance.closeAll_actionPerformed(null);
+  }
+
   public int countDsAnn(jalview.viewmodel.AlignmentViewport avp)
   {
     int numdsann = 0;