import jalview.schemes.PIDColourScheme;
import jalview.structure.StructureSelectionManager;
import jalview.util.MapList;
+import jalview.viewmodel.ViewportRanges;
import java.util.ArrayList;
import java.util.List;
SequenceI cons = testme.getConsensusSeq();
assertEquals("A-C", cons.getSequenceAsString());
}
+
+ @Test(groups = { "Functional" })
+ public void testHideRevealSequences()
+ {
+ ViewportRanges ranges = testee.getRanges();
+ assertEquals(3, al.getHeight());
+ assertEquals(0, ranges.getStartSeq());
+ assertEquals(2, ranges.getEndSeq());
+
+ /*
+ * hide first sequence
+ */
+ testee.hideSequence(new SequenceI[] { al.getSequenceAt(0) });
+ assertEquals(2, al.getHeight());
+ assertEquals(0, ranges.getStartSeq());
+ assertEquals(1, ranges.getEndSeq());
+
+ /*
+ * reveal hidden sequences above the first
+ */
+ testee.showSequence(0);
+ assertEquals(3, al.getHeight());
+ assertEquals(0, ranges.getStartSeq());
+ assertEquals(2, ranges.getEndSeq());
+
+ /*
+ * hide first and third sequences
+ */
+ testee.hideSequence(new SequenceI[] { al.getSequenceAt(0),
+ al.getSequenceAt(2) });
+ assertEquals(1, al.getHeight());
+ assertEquals(0, ranges.getStartSeq());
+ assertEquals(0, ranges.getEndSeq());
+
+ /*
+ * reveal all hidden sequences
+ */
+ testee.showAllHiddenSeqs();
+ assertEquals(3, al.getHeight());
+ assertEquals(0, ranges.getStartSeq());
+ assertEquals(2, ranges.getEndSeq());
+ }
}