use of org.testfx.api.FxRobot in project honest-profiler by jvm-profiling-tools.
the class TreeViewTest method testTreeViewScenario.
// Actual Test Method
@Test
public void testTreeViewScenario() {
FxRobot robot = new FxRobot();
newProfileTab(robot, app(), 0, scenario.getName(), scenario, LOG);
selectView(robot, TREE);
selectThreadGrouping(robot, threadGrouping, "#tree");
selectFrameGrouping(robot, frameGrouping, "#tree");
clickExpandAll(robot, "#tree");
TreeTableView<Node> tableView = getTreeTableView(robot);
runLater(() -> scenario.checkTreeAggregation(new TreeTableViewCheckAdapter(threadGrouping, frameGrouping, tableView)));
}
use of org.testfx.api.FxRobot in project honest-profiler by jvm-profiling-tools.
the class FlatViewQuickFilterTest method testFlatQuickFilterScenario.
@Test
public void testFlatQuickFilterScenario() {
FxRobot robot = new FxRobot();
newProfileTab(robot, app(), 0, scenario.getName(), scenario, LOG);
selectView(robot, FLAT);
focusOn(robot, "#quickFilterText", "#flat");
robot.write("ba");
clickQuickFilterButton(robot, "#flat");
checkResult(robot, keyFlt(s -> s.contains("ba")));
selectView(robot, FLAT);
focusOn(robot, "#quickFilterText", "#flat");
robot.type(BACK_SPACE, BACK_SPACE, ENTER);
checkResult(robot);
}
use of org.testfx.api.FxRobot in project honest-profiler by jvm-profiling-tools.
the class FlatViewTest method testFlatViewScenario.
// Actual Test Method
@Test
public void testFlatViewScenario() {
FxRobot robot = new FxRobot();
newProfileTab(robot, app(), 0, scenario.getName(), scenario, LOG);
selectView(robot, FLAT);
selectFrameGrouping(robot, frameGrouping, "#flat");
TableView<Entry> tableView = getFlatTableView(robot);
runLater(() -> scenario.checkFlatAggregation(new FlatTableViewCheckAdapter(BY_ID, frameGrouping, tableView)));
}
use of org.testfx.api.FxRobot in project TestFX by TestFX.
the class GlassRobotClipboardBug method setupSpec.
/*
static {
System.setProperty("testfx.robot", "glass");
System.setProperty("testfx.headless", "true");
System.setProperty("prism.order", "sw");
}
*/
@BeforeClass
public static void setupSpec() throws Exception {
FxToolkit.registerPrimaryStage();
fx = new FxRobot();
}
use of org.testfx.api.FxRobot in project Malai by arnobl.
the class MoveShape method testCanCancelDnDWithObsList.
@Test
public void testCanCancelDnDWithObsList(final FxRobot robot) {
new NodeBinder<>(new DnD(true, true), i -> new MoveShape((Rectangle) i.getSrcObject().get()), instrument).on(widget1.getChildren()).first((i, c) -> Platform.runLater(() -> i.getSrcObject().get().requestFocus())).then((i, c) -> c.setCoord(((Rectangle) i.getSrcObject().get()).getX() + (i.getTgtScenePoint().getX() - i.getSrcScenePoint().getX()), ((Rectangle) i.getSrcObject().get()).getY() + (i.getTgtScenePoint().getY() - i.getSrcScenePoint().getY()))).end((i, c) -> fail("")).exec().bind();
final Rectangle rec2 = new Rectangle(200d, 200d, 70d, 50d);
Platform.runLater(() -> widget1.getChildren().addAll(rec2));
WaitForAsyncUtils.waitForFxEvents();
robot.drag(rec2).moveBy(100, 100).type(KeyCode.ESCAPE).sleep(50L);
assertEquals(0, instrument.exec.get());
}
Aggregations