From: Jim Procter Date: Tue, 15 Jan 2019 13:12:10 +0000 (+0000) Subject: JAL-1767 test that changing view association for PCA panel can be restored X-Git-Tag: Release_2_11_1_0~78^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=091704be1e1e54b7990e8e6a10f7c0fd12d33416;p=jalview.git JAL-1767 test that changing view association for PCA panel can be restored --- diff --git a/test/jalview/project/Jalview2xmlTests.java b/test/jalview/project/Jalview2xmlTests.java index fb2d3e9..3f4ed71 100644 --- a/test/jalview/project/Jalview2xmlTests.java +++ b/test/jalview/project/Jalview2xmlTests.java @@ -1120,15 +1120,18 @@ public class Jalview2xmlTests extends Jalview2xmlBase AlignFrame af = new FileLoader().LoadFileWaitTillLoaded(exampleFile, DataSourceType.FILE); assertNotNull(af, "Didn't read in the example file correctly."); + AlignmentPanel origView = (AlignmentPanel) af.getAlignPanels().get(0); AlignmentPanel newview = af.newView(PCAVIEWNAME, true); // create another for good measure af.newView("Not the PCA View", true); - PCAPanel pcaPanel = new PCAPanel(newview, "BLOSUM62", + PCAPanel pcaPanel = new PCAPanel(origView, "BLOSUM62", new SimilarityParams(true, true, true, false)); - // we're in the test exec thread, so we can just run synchronously here pcaPanel.run(); + // now switch the linked view + pcaPanel.selectAssociatedView(newview); + assertTrue(pcaPanel.getAlignViewport() == newview.getAlignViewport(), "PCA should be associated with 'With PCA' view: test is broken");