Passing test for JAL-4127 failing on the JAL-1713 branch
authorJames Procter <j.procter@dundee.ac.uk>
Wed, 15 Feb 2023 14:43:32 +0000 (14:43 +0000)
committerJames Procter <j.procter@dundee.ac.uk>
Wed, 15 Feb 2023 14:43:32 +0000 (14:43 +0000)
test/jalview/project/Jalview2xmlTests.java

index 8886394..0cc993e 100644 (file)
@@ -1359,4 +1359,25 @@ public class Jalview2xmlTests extends Jalview2xmlBase
     assertTrue(dbRef instanceof GeneLocus);
     assertEquals(dbRef, dbref3);
   }
+
+  /**
+   * Test that loading example.jvp, doing some stuff, then hitting reload
+   * doesn't leave the modified window still open
+   * 
+   * @throws Exception
+   */
+  @Test(groups = { "Functional" }, enabled = true)
+  public void testReloadActuallyReloads() throws Exception
+  {
+    Desktop.instance.closeAll_actionPerformed(null);
+    AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
+            "examples/exampleFile.jvp", DataSourceType.FILE);
+    af.getViewport().getColumnSelection().addElement(3);
+    af.hideSelColumns_actionPerformed(null);
+    af.newView("new", true);
+    af.reload_actionPerformed(null);
+    Thread.sleep(30);
+    // af exists still but isn't shown
+    assertTrue(af.isClosed());
+  }
 }