From 164a8192345f622c2f9c62d3b0c6e593b5f08af4 Mon Sep 17 00:00:00 2001 From: James Procter Date: Wed, 15 Feb 2023 14:43:32 +0000 Subject: [PATCH] Passing test for JAL-4127 failing on the JAL-1713 branch --- test/jalview/project/Jalview2xmlTests.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/test/jalview/project/Jalview2xmlTests.java b/test/jalview/project/Jalview2xmlTests.java index 8886394..0cc993e 100644 --- a/test/jalview/project/Jalview2xmlTests.java +++ b/test/jalview/project/Jalview2xmlTests.java @@ -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()); + } } -- 1.7.10.2