JAL-2164 clear the desktop before testStoreAndRecoverExpandedViews
authorJim Procter <jprocter@issues.jalview.org>
Mon, 1 Aug 2016 12:45:05 +0000 (13:45 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Mon, 1 Aug 2016 12:45:05 +0000 (13:45 +0100)
test/jalview/io/Jalview2xmlTests.java

index 915625f..2c55909 100644 (file)
@@ -371,10 +371,12 @@ public class Jalview2xmlTests
   @Test(groups = { "Functional" }, enabled = true)
   public void testStoreAndRecoverExpandedviews() throws Exception
   {
+    Desktop.instance.closeAll_actionPerformed(null);
 
     AlignFrame af = new jalview.io.FileLoader().LoadFileWaitTillLoaded(
             "examples/exampleFile_2_7.jar", FormatAdapter.FILE);
     assertTrue("Didn't read in the example file correctly.", af != null);
+    Assert.assertEquals(Desktop.getAlignFrames().length, 1);
     String afid = af.getViewport().getSequenceSetId();
 
     // check FileLoader returned a reference to the one alignFrame that is