int w = af.alignPanel.getVisibleIdWidth(true);
int actual = af.alignPanel.getIdPanel().getWidth();
assertEquals(w, actual);
- assertEquals(w, 115);
+ // allow some leeway for different OS renderings
+ assertTrue(w > 105 && w < 120);
// manually adjust
af.viewport.setIdWidth(200);
assertEquals(w, actual);
af.viewport.setIdWidth(-1);
+ af.alignPanel.calculateIdWidth();
af.alignPanel.getIdPanel().getIdCanvas().setManuallyAdjusted(false);
w = af.alignPanel.calculateIdWidth().width;
af.alignPanel.paintComponent(af.alignPanel.getGraphics());
// setting a negative IdWidth and then running calculateIdWidth resets width
// to optimal id width
- assertEquals(w, 115);
+ // allow some leeway for different OS renderings
+ assertTrue(w > 105 && w < 120);
}
@Test(groups = "Functional")