From ccbd7db9e08c6bda0040a64ec7f4f62790e054f1 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Sat, 27 May 2017 14:01:41 +0100 Subject: [PATCH] =?utf8?q?JAL-2563=20failing=20test=20to=20verify=20SetStatu?= =?utf8?q?s=20returns=20position=20and=20message=20includes=20the=20position?= =?utf8?q?=20for=20ambiguous=20peptide=20=E2=80=98B=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- test/jalview/gui/SeqPanelTest.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/jalview/gui/SeqPanelTest.java b/test/jalview/gui/SeqPanelTest.java index 210dcf3..53dff0e 100644 --- a/test/jalview/gui/SeqPanelTest.java +++ b/test/jalview/gui/SeqPanelTest.java @@ -21,6 +21,7 @@ package jalview.gui; import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; import jalview.datamodel.Alignment; import jalview.datamodel.AlignmentI; @@ -65,4 +66,21 @@ public class SeqPanelTest alignFrame.alignPanel.getSeqPanel().setStatusMessage( visAl.getSequenceAt(1), 3, 1), -1); } + + @Test(groups = "Functional") + public void testAmbiguousAminoAcidGetsStatusMessage() + { + SequenceI seq1 = new Sequence("Seq1", "ABCDE"); + SequenceI seq2 = new Sequence("Seq2", "AB--E"); + AlignmentI al = new Alignment(new SequenceI[] { seq1, seq2 }); + AlignFrame alignFrame = new AlignFrame(al, al.getWidth(), + al.getHeight()); + AlignmentI visAl = alignFrame.getViewport().getAlignment(); + // Test either side of gap + // This first assert fails due to JAL-2563 + assertEquals( + alignFrame.alignPanel.getSeqPanel().setStatusMessage( + visAl.getSequenceAt(1), 1, 1), 2); + assertTrue(alignFrame.statusBar.getText().contains("(2)")); + } } -- 1.7.10.2