From 091704be1e1e54b7990e8e6a10f7c0fd12d33416 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 15 Jan 2019 13:12:10 +0000 Subject: [PATCH] JAL-1767 test that changing view association for PCA panel can be restored --- test/jalview/project/Jalview2xmlTests.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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"); -- 1.7.10.2