JAL-3253 temporary branch SwingJS upgrade with testNG fixes Java 8
[jalview.git] / test / jalview / gui / AlignFrameTest.java
index fd690f3..568d285 100644 (file)
@@ -29,7 +29,6 @@ import static org.testng.Assert.assertTrue;
 
 import jalview.api.FeatureColourI;
 import jalview.bin.Cache;
-import jalview.bin.Instance;
 import jalview.bin.Jalview;
 import jalview.datamodel.Alignment;
 import jalview.datamodel.AlignmentI;
@@ -67,6 +66,9 @@ public class AlignFrameTest
   {
     JvOptionPane.setInteractiveMode(false);
     JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
+
+    // BH 2020.03.22 solved the assertEquals(c, i_faded) problem below
+    Jalview.setSynchronous(true);
   }
 
   @Test(groups = "Functional")
@@ -165,7 +167,7 @@ public class AlignFrameTest
   @AfterMethod(alwaysRun = true)
   public void tearDown()
   {
-    Instance.getDesktop().closeAll_actionPerformed(null);
+    Desktop.getInstance().closeAll_actionPerformed(null);
   }
 
   /**
@@ -176,7 +178,7 @@ public class AlignFrameTest
   public void setUp()
   {
     Cache.loadProperties("test/jalview/io/testProps.jvprops");
-    Cache.setPropertyNoSave("SHOW_IDENTITY",
+    Cache.getInstance().applicationProperties.setProperty("SHOW_IDENTITY",
             Boolean.TRUE.toString());
     af = new FileLoader().LoadFileWaitTillLoaded("examples/uniref50.fa",
             DataSourceType.FILE);