Search in sources :

Example 6 with FramedStage

use of limelight.ui.model.FramedStage in project limelight by slagyr.

the class UtilitiesTest method alertScene.

@Test
public void alertScene() throws Exception {
    startAlert("A friendly message.");
    FramedStage alertStage = waitForStage("Alert");
    JavaScene scene = (JavaScene) alertStage.getScene().getProxy();
    assertEquals("Limelight Alert", scene.findProp("title").getText());
    assertEquals("A friendly message.", scene.findProp("advice").getText());
}
Also used : JavaScene(limelight.java.JavaScene) FramedStage(limelight.ui.model.FramedStage)

Example 7 with FramedStage

use of limelight.ui.model.FramedStage in project limelight by slagyr.

the class UtilitiesTest method incompatibleVersionSceneComponents.

@Test
public void incompatibleVersionSceneComponents() throws Exception {
    startProceedWithIncompatibleVersion();
    FramedStage stage = waitForStage("Incompatible Version");
    JavaScene scene = (JavaScene) stage.getScene().getProxy();
    assertEquals("Some Production", scene.findProp("productionNameLabel").getText());
    assertEquals("1.2.3", scene.findProp("requiredVersionLabel").getText());
    assertEquals(About.version.toString(), scene.findProp("currentVersionLabel").getText());
}
Also used : JavaScene(limelight.java.JavaScene) FramedStage(limelight.ui.model.FramedStage)

Example 8 with FramedStage

use of limelight.ui.model.FramedStage 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 9 with FramedStage

use of limelight.ui.model.FramedStage 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 10 with FramedStage

use of limelight.ui.model.FramedStage 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

FramedStage (limelight.ui.model.FramedStage)11 JavaScene (limelight.java.JavaScene)7 JavaProp (limelight.java.JavaProp)3 Stage (limelight.model.Stage)1 MockStageProxy (limelight.model.api.MockStageProxy)1 MockFrameManager (limelight.ui.model.MockFrameManager)1 Before (org.junit.Before)1 Test (org.junit.Test)1