JAL-2780 JAL-2891 clear all windows always beforeTest for Jalview2XmlBase
authorJim Procter <jprocter@issues.jalview.org>
Wed, 7 Feb 2018 16:56:44 +0000 (16:56 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Wed, 7 Feb 2018 16:56:44 +0000 (16:56 +0000)
test/jalview/io/Jalview2xmlBase.java

index 15e18e3..fbdd782 100644 (file)
@@ -76,7 +76,8 @@ public class Jalview2xmlBase
   @BeforeTest(alwaysRun = true)
   public static void clearDesktop()
   {
-    if (Desktop.instance != null && Desktop.getAlignFrames() != null)
+    if (Desktop.instance != null && Desktop.getFrames() != null
+            && Desktop.getFrames().length > 0)
     {
       Desktop.instance.closeAll_actionPerformed(null);
     }