import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
+import jalview.analysis.AnnotationSorter.SequenceAnnotationOrder;
+import jalview.bin.Cache;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.Annotation;
@Before
public void setUp() throws IOException
{
+ // pin down annotation sort order for test
+ Cache.applicationProperties.setProperty(Preferences.SORT_ANNOTATIONS,
+ SequenceAnnotationOrder.NONE.name());
+ Cache.applicationProperties.setProperty(
+ Preferences.SHOW_AUTOCALC_ABOVE, Boolean.TRUE.toString());
+
AlignmentI al = new jalview.io.FormatAdapter().readFile(TEST_DATA,
AppletFormatAdapter.PASTE, "FASTA");
af = new AlignFrame(al, 700, 500);
@Test
public void testSelectType_showForSelected()
{
+ // sequences 1 and 2 have annotations IUPred and Jmol
selectSequences(1, 2);
testee = new AnnotationChooser(parentPanel);
final Checkbox showCheckbox = (Checkbox) getComponent(testee, 1, 0, 0);
setSelected(selectedSequencesCheckbox, true);
setSelected(hideCheckbox, true);
setSelected(getTypeCheckbox("JMol"), true);
+
assertTrue(anns[5].visible); // JMol for seq3
assertFalse(anns[7].visible); // JMol for seq1
// ...now show them...
assertTrue(anns[0].visible); // Conservation
assertTrue(anns[1].visible); // Quality
assertTrue(anns[2].visible); // Consensus
- assertFalse(anns[3].visible); // IUPRED
- assertTrue(anns[4].visible); // Beauty (not seq-related)
+ assertTrue(anns[3].visible); // Beauty (not seq-related)
+ assertFalse(anns[4].visible); // IUPRED
assertFalse(anns[5].visible); // JMol
assertFalse(anns[6].visible); // IUPRED
assertFalse(anns[7].visible); // JMol