Merge branch 'develop' into alpha/JAL-3362_Jalview_212_alpha
[jalview.git] / test / jalview / gui / AlignViewportTest.java
index 06cd44e..bd36a08 100644 (file)
@@ -28,6 +28,14 @@ import static org.testng.AssertJUnit.assertSame;
 import static org.testng.AssertJUnit.assertTrue;
 
 import jalview.api.AlignViewportI;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
 import jalview.bin.Cache;
 import jalview.bin.Jalview;
 import jalview.datamodel.AlignedCodonFrame;
@@ -50,14 +58,6 @@ import jalview.util.MapList;
 import jalview.viewmodel.AlignmentViewport;
 import jalview.viewmodel.ViewportRanges;
 
-import java.util.ArrayList;
-import java.util.List;
-
-import org.testng.Assert;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Test;
-
 public class AlignViewportTest
 {
 
@@ -301,7 +301,7 @@ public class AlignViewportTest
     AlignViewport viewport = af.getViewport();
     synchronized (this)
     {
-      while (viewport.getAlignmentConservationAnnotation() != null)
+      while (viewport.getCalcManager().isWorking())
       {
         try
         {
@@ -429,7 +429,8 @@ public class AlignViewportTest
     AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(
             "examples/uniref50.fa", DataSourceType.FILE);
     AlignViewportI av = af.getViewport();
-    Assert.assertNull(av.getOccupancyAnnotation(), "Preference did not disable occupancy row.");
+    Assert.assertNull(av.getAlignmentGapAnnotation(),
+            "Preference did not disable occupancy row.");
     int c = 0;
     for (AlignmentAnnotation aa : av.getAlignment().findAnnotations(null,
             null, "Occupancy"))
@@ -443,10 +444,11 @@ public class AlignViewportTest
     af = new FileLoader().LoadFileWaitTillLoaded(
             "examples/uniref50.fa", DataSourceType.FILE);
     av = af.getViewport();
-    Assert.assertNotNull(av.getOccupancyAnnotation(), "Preference did not enable occupancy row.");
+    Assert.assertNotNull(av.getAlignmentGapAnnotation(),
+            "Preference did not enable occupancy row.");
     c = 0;
     for (AlignmentAnnotation aa : av.getAlignment().findAnnotations(null,
-            null, av.getOccupancyAnnotation().label))
+            null, av.getAlignmentGapAnnotation().label))
     {
       c++;
     }