From 2c8ef0f88ce90532213c36613b83aa283320b72d Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 15 Jan 2019 11:19:39 +0000 Subject: [PATCH] JAL-1767 patch buggy PCA view association test --- test/jalview/project/Jalview2xmlTests.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/jalview/project/Jalview2xmlTests.java b/test/jalview/project/Jalview2xmlTests.java index a0f1f6d..fb2d3e9 100644 --- a/test/jalview/project/Jalview2xmlTests.java +++ b/test/jalview/project/Jalview2xmlTests.java @@ -1151,7 +1151,14 @@ public class Jalview2xmlTests extends Jalview2xmlBase "PCA and the tabbed alignment view should be the only two windows on the desktop"); PCAPanel pcaPanel = (PCAPanel) frames[frames[0] == af ? 1 : 0]; - AlignmentViewPanel restoredNewView = af.getAlignPanels().get(1); + AlignmentViewPanel restoredNewView = null; + for (AlignmentViewPanel alignpanel : Desktop.getAlignmentPanels(null)) + { + if (alignpanel.getAlignViewport() == pcaPanel.getAlignViewport()) + { + restoredNewView = alignpanel; + } + } assertEquals(restoredNewView.getViewName(), PCAVIEWNAME); assertTrue( restoredNewView.getAlignViewport() == pcaPanel -- 1.7.10.2