* use read-only test properties file
*/
Cache.loadProperties("test/jalview/io/testProps.jvprops");
+ Cache.setPropertyNoSave("SHOW_JWS2_SERVICES", Boolean.FALSE.toString());
Jalview.main(new String[] { "-nonews" });
}
@Test(groups = "Functional")
public void testColourThresholdActions()
{
+
AlignViewport av = af.getViewport();
AlignmentI al = av.getAlignment();
SliderPanel sp = SliderPanel.getSliderPanel();
assertTrue(sp.isForConservation());
assertEquals(sp.getValue(), 30); // initial slider setting
+
+ // BH 2019.08.28 this was necessary so that rs was updated
+ af.changeColour_actionPerformed(JalviewColourScheme.Helix.toString());
+
sp.valueChanged(10);
+
assertSame(rs, av.getResidueShading());
c = rs.findColour('I', 14, ferCapan);
Color i_faded = new Color(196, 186, 196);
assertEquals(c, s_original);
}
+ private void waitSome()
+ {
+
+ // just a hack
+ synchronized (this)
+ {
+ try
+ {
+ wait(250);
+ } catch (InterruptedException e)
+ {
+ }
+ }
+ }
+
/**
* Verify that making a New View transfers alignment and group colour schemes,
* including any thresholds, to the new view. Because New View is performed by
ViewportRanges ranges = af.getViewport().getRanges();
int endres = ranges.getEndRes();
+ System.out.println("APT range end0 " + ranges.getEndRes());
// wrap
af.alignPanel.getAlignViewport().setWrapAlignment(true);
af.alignPanel.updateLayout();
af.paintImmediately(af.getBounds());
-
+ waitSome();
+ System.out.println("APT range end1 " + ranges.getEndRes());
// endRes has changed
assertNotEquals(ranges.getEndRes(), endres);
// unwrap
af.alignPanel.getAlignViewport().setWrapAlignment(false);
af.alignPanel.updateLayout();
+ waitSome();
af.paintImmediately(af.getBounds());
+
+ System.out.println("APT range end3 " + ranges.getEndRes());
+
// endRes back to original value
assertEquals(ranges.getEndRes(), endres);
}
+
+ private void waitSome()
+ {
+
+ // just a hack
+ synchronized (this)
+ {
+ try
+ {
+ wait(250);
+ } catch (InterruptedException e)
+ {
+ }
+ }
+ }
}