Merge branch 'develop' into feature/JAL-1713_overviewInProject
authorJames Procter <j.procter@dundee.ac.uk>
Wed, 15 Feb 2023 15:25:53 +0000 (15:25 +0000)
committerJames Procter <j.procter@dundee.ac.uk>
Wed, 15 Feb 2023 15:25:53 +0000 (15:25 +0000)
test/jalview/project/Jalview2xmlTests.java

index 91ea959..cd8a4b0 100644 (file)
@@ -1477,4 +1477,28 @@ public class Jalview2xmlTests extends Jalview2xmlBase
 
     assertNull(af.alignPanel.getOverviewPanel());
   }
+
+  /**
+   * Test that loading example.jvp, doing some stuff, then hitting reload
+   * doesn't leave the modified window still open
+   * 
+   * See JAL-4127 - interactively performing the same actions and reloading
+   * works fine, but programmatically they do not
+   * 
+   * @throws Exception
+   */
+  @Test(groups = {"Functional"}, enabled=false)
+  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());
+  }
 }