Search in sources :

Example 6 with JavaScene

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

the class UtilitiesTest method returnsFalseWhenClickingCancel.

@Test
public void returnsFalseWhenClickingCancel() throws Exception {
    startProceedWithIncompatibleVersion();
    FramedStage stage = waitForStage("Incompatible Version");
    JavaScene scene = (JavaScene) stage.getScene().getProxy();
    Mouse.click(scene.findProp("cancelButton"));
    waitForDialogResponse();
    assertEquals(false, dialogResponse);
}
Also used : JavaScene(limelight.java.JavaScene) FramedStage(limelight.ui.model.FramedStage)

Example 7 with JavaScene

use of limelight.java.JavaScene 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 8 with JavaScene

use of limelight.java.JavaScene 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)

Example 9 with JavaScene

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

the class UtilitiesTest method returnsTrueWhenClickingProceed.

@Test
public void returnsTrueWhenClickingProceed() throws Exception {
    startProceedWithIncompatibleVersion();
    FramedStage stage = waitForStage("Incompatible Version");
    JavaScene scene = (JavaScene) stage.getScene().getProxy();
    Mouse.click(scene.findProp("proceedButton"));
    waitForDialogResponse();
    assertEquals(true, dialogResponse);
}
Also used : JavaScene(limelight.java.JavaScene) FramedStage(limelight.ui.model.FramedStage)

Aggregations

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