Search in sources :

Example 1 with FramedStage

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

the class JavaProductionTest method loadsStagesWithOptions.

@Test
public void loadsStagesWithOptions() throws Exception {
    assumeTrue(TestUtil.notHeadless());
    fs.createTextFile("/testProduction/stages.xml", "<stages><egats title='Eureka!'/></stages>");
    production.loadStages();
    final Stage stage = production.getTheater().get("egats");
    assertEquals(FramedStage.class, stage.getClass());
    FramedStage framedStage = (FramedStage) stage;
    assertEquals("Eureka!", framedStage.getTitle());
}
Also used : Stage(limelight.model.Stage) FramedStage(limelight.ui.model.FramedStage) FramedStage(limelight.ui.model.FramedStage) Test(org.junit.Test)

Example 2 with FramedStage

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

the class UtilitiesTest method stageForIncompatibleVersion.

@Test
public void stageForIncompatibleVersion() throws Exception {
    startProceedWithIncompatibleVersion();
    FramedStage stage = waitForStage("Incompatible Version");
    assertEquals("center", stage.getXLocationStyle().toString());
    assertEquals("center", stage.getYLocationStyle().toString());
    assertEquals("400", stage.getWidthStyle().toString());
    assertEquals("auto", stage.getHeightStyle().toString());
    assertEquals("#ffffffff", stage.getBackgroundColor());
    assertEquals(false, stage.isFramed());
    assertEquals(true, stage.isAlwaysOnTop());
    assertEquals(false, stage.isVital());
}
Also used : FramedStage(limelight.ui.model.FramedStage)

Example 3 with FramedStage

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

the class UtilitiesTest method alertStage.

@Test
public void alertStage() throws Exception {
    startAlert("A Friendly Message.");
    final FramedStage stage = waitForStage("Alert");
    assertNotNull(stage);
    assertEquals("Alert", stage.getTitle());
    assertEquals("center", stage.getXLocationStyle().toString());
    assertEquals("center", stage.getYLocationStyle().toString());
    assertEquals("400", stage.getWidthStyle().toString());
    assertEquals("auto", stage.getHeightStyle().toString());
    assertEquals(false, stage.isFramed());
    assertEquals(false, stage.isVital());
    assertEquals(true, stage.isAlwaysOnTop());
}
Also used : FramedStage(limelight.ui.model.FramedStage)

Example 4 with FramedStage

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

the class StageEventTest method setUp.

@Before
public void setUp() throws Exception {
    assumeTrue(TestUtil.notHeadless());
    Context.instance().frameManager = new MockFrameManager();
    stage = new FramedStage("default", new MockStageProxy());
}
Also used : MockStageProxy(limelight.model.api.MockStageProxy) FramedStage(limelight.ui.model.FramedStage) MockFrameManager(limelight.ui.model.MockFrameManager) Before(org.junit.Before)

Example 5 with FramedStage

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

the class UtilitiesTest method alertSceneClosesWhenClickingOk.

@Test
public void alertSceneClosesWhenClickingOk() throws Exception {
    startAlert("A friendly message.");
    FramedStage alertStage = waitForStage("Alert");
    JavaScene scene = (JavaScene) alertStage.getScene().getProxy();
    final JavaProp okButton = scene.findProp("okButton");
    assertNotNull(okButton);
    Mouse.click(okButton);
    waitForDialogResponse();
    assertEquals(true, dialogResponse);
}
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