// get sequences from the alignment
List<SequenceI> seqs = parentPanel.getAlignment().getSequences();
- // get the Popup Menu for first sequence - no insertions
- testee = new PopupMenu(parentPanel, (Sequence) seqs.get(0), null);
- testee.hideInsertions_actionPerformed(null);
-
- HiddenColumns hidden = parentPanel.av.getAlignment().getHiddenColumns();
- Iterator<int[]> it = hidden.iterator();
- assertFalse(it.hasNext());
-
+ // add our own seqs to avoid problems with changes to existing sequences
+ // (gap at end of sequences varies depending on how tests are run!)
Sequence seqGap1 = new Sequence("GappySeq",
"AAAA----AA-AAAAAAA---AAA-----------AAAAAAAAAA--");
seqGap1.createDatasetSequence();
"AAAAAA-AAAAA---AAA--AAAAA--AAAAAAA-AAAAAA");
seqGap2.createDatasetSequence();
seqs.add(seqGap2);
- Sequence seqGap3 = new Sequence("OneGapSeq",
+ Sequence seqGap3 = new Sequence("AnotherGapSeq",
"AAAAAA-AAAAAA--AAAAAA-AAAAAAAAAAA---AAAAAAAA");
seqGap3.createDatasetSequence();
seqs.add(seqGap3);
+ Sequence seqGap4 = new Sequence("NoGaps",
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
+ seqGap4.createDatasetSequence();
+ seqs.add(seqGap4);
+
+ ColumnSelection sel = new ColumnSelection();
+ parentPanel.av.getAlignment().getHiddenColumns()
+ .revealAllHiddenColumns(sel);
+
+ // get the Popup Menu for 7th sequence - no insertions
+ testee = new PopupMenu(parentPanel, (Sequence) seqs.get(7), null);
+ testee.hideInsertions_actionPerformed(null);
+
+ HiddenColumns hidden = parentPanel.av.getAlignment().getHiddenColumns();
+ Iterator<int[]> it = hidden.iterator();
+ assertFalse(it.hasNext());
// get the Popup Menu for GappySeq - this time we have insertions
testee = new PopupMenu(parentPanel, (Sequence) seqs.get(4), null);
assertFalse(it.hasNext());
- ColumnSelection sel = new ColumnSelection();
+ sel = new ColumnSelection();
hidden.revealAllHiddenColumns(sel);
// make a sequence group and hide insertions within the group