Search in sources :

Example 6 with JavaProp

use of limelight.java.JavaProp in project limelight by slagyr.

the class UtilitiesTest method stageHeightWithLargeText.

@Test
public void stageHeightWithLargeText() throws Exception {
    String message = "";
    for (int i = 0; i < 100; i++) message += "This is line number" + i + "\n";
    startAlert(message);
    FramedStage alertStage = waitForStage("Alert");
    Thread.sleep(100);
    JavaScene scene = (JavaScene) alertStage.getScene().getProxy();
    JavaProp advice = scene.findProp("advice");
    assertEquals(500, advice.getBounds().height);
    assertEquals("on", advice.getStyle().getVerticalScrollbar());
}
Also used : JavaScene(limelight.java.JavaScene) JavaProp(limelight.java.JavaProp) FramedStage(limelight.ui.model.FramedStage)

Example 7 with JavaProp

use of limelight.java.JavaProp in project limelight by slagyr.

the class UtilitiesTest method stageHeightWithSmallText.

@Test
public void stageHeightWithSmallText() throws Exception {
    startAlert("A friendly message.");
    FramedStage alertStage = waitForStage("Alert");
    Thread.sleep(100);
    JavaScene scene = (JavaScene) alertStage.getScene().getProxy();
    JavaProp advice = scene.findProp("advice");
    assertEquals(true, advice.getBounds().height < 100);
}
Also used : JavaScene(limelight.java.JavaScene) JavaProp(limelight.java.JavaProp) FramedStage(limelight.ui.model.FramedStage)

Aggregations

JavaProp (limelight.java.JavaProp)7 JavaScene (limelight.java.JavaScene)5 FramedStage (limelight.ui.model.FramedStage)3