Search in sources :

Example 1 with ENTER

use of javafx.scene.input.KeyCode.ENTER in project honest-profiler by jvm-profiling-tools.

the class TreeViewQuickFilterTest method testTreeQuickFilterScenario.

// Actual Test Method
@Test
public void testTreeQuickFilterScenario() {
    FxRobot robot = new FxRobot();
    newProfileTab(robot, app(), 0, scenario.getName(), scenario, LOG);
    selectView(robot, TREE);
    focusOn(robot, "#quickFilterText", "#tree");
    robot.write("ba");
    clickQuickFilterButton(robot, "#tree");
    checkResult(robot, keyFlt(s -> s.contains("ba")));
    selectView(robot, TREE);
    focusOn(robot, "#quickFilterText", "#tree");
    robot.type(BACK_SPACE, BACK_SPACE, ENTER);
    checkResult(robot);
}
Also used : ThreadGrouping(com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping) AbstractJavaFxTest(com.insightfullogic.honest_profiler.ports.javafx.framework.AbstractJavaFxTest) HPFXUtil.clickExpandAll(com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.clickExpandAll) BACK_SPACE(javafx.scene.input.KeyCode.BACK_SPACE) HPFXUtil.focusOn(com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.focusOn) Node(com.insightfullogic.honest_profiler.core.aggregation.result.straight.Node) RunWith(org.junit.runner.RunWith) Parameters(org.junit.runners.Parameterized.Parameters) HPFXUtil.clickQuickFilterButton(com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.clickQuickFilterButton) ParameterUtil.getScenarios(com.insightfullogic.honest_profiler.framework.ParameterUtil.getScenarios) LOG(com.insightfullogic.honest_profiler.ports.javafx.model.ProfileContext.ProfileMode.LOG) TreeTableView(javafx.scene.control.TreeTableView) HPFXUtil.getTreeTableView(com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.getTreeTableView) Arrays.asList(java.util.Arrays.asList) ScenarioStraightFilter.keyFlt(com.insightfullogic.honest_profiler.framework.scenario.ScenarioStraightFilter.keyFlt) FxRobot(org.testfx.api.FxRobot) HPFXUtil.selectThreadGrouping(com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.selectThreadGrouping) FrameGrouping(com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping) Parameterized(org.junit.runners.Parameterized) HPFXUtil.newProfileTab(com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.newProfileTab) TREE(com.insightfullogic.honest_profiler.ports.javafx.ViewType.TREE) HPFXUtil.selectFrameGrouping(com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.selectFrameGrouping) Collection(java.util.Collection) Test(org.junit.Test) SimplifiedLogScenario(com.insightfullogic.honest_profiler.framework.scenario.SimplifiedLogScenario) HPFXUtil.selectView(com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.selectView) TreeTableViewCheckAdapter(com.insightfullogic.honest_profiler.framework.checker.TreeTableViewCheckAdapter) ENTER(javafx.scene.input.KeyCode.ENTER) Ignore(org.junit.Ignore) ScenarioStraightFilter(com.insightfullogic.honest_profiler.framework.scenario.ScenarioStraightFilter) FxRobot(org.testfx.api.FxRobot) AbstractJavaFxTest(com.insightfullogic.honest_profiler.ports.javafx.framework.AbstractJavaFxTest) Test(org.junit.Test)

Example 2 with ENTER

use of javafx.scene.input.KeyCode.ENTER 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);
}
Also used : AbstractJavaFxTest(com.insightfullogic.honest_profiler.ports.javafx.framework.AbstractJavaFxTest) BACK_SPACE(javafx.scene.input.KeyCode.BACK_SPACE) HPFXUtil.focusOn(com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.focusOn) RunWith(org.junit.runner.RunWith) Parameters(org.junit.runners.Parameterized.Parameters) HPFXUtil.clickQuickFilterButton(com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.clickQuickFilterButton) ParameterUtil.getScenarios(com.insightfullogic.honest_profiler.framework.ParameterUtil.getScenarios) LOG(com.insightfullogic.honest_profiler.ports.javafx.model.ProfileContext.ProfileMode.LOG) FlatTableViewCheckAdapter(com.insightfullogic.honest_profiler.framework.checker.FlatTableViewCheckAdapter) Arrays.asList(java.util.Arrays.asList) ScenarioStraightFilter.keyFlt(com.insightfullogic.honest_profiler.framework.scenario.ScenarioStraightFilter.keyFlt) Entry(com.insightfullogic.honest_profiler.core.aggregation.result.straight.Entry) FLAT(com.insightfullogic.honest_profiler.ports.javafx.ViewType.FLAT) FxRobot(org.testfx.api.FxRobot) TableView(javafx.scene.control.TableView) ALL_TOGETHER(com.insightfullogic.honest_profiler.core.aggregation.grouping.ThreadGrouping.ALL_TOGETHER) FrameGrouping(com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping) Parameterized(org.junit.runners.Parameterized) HPFXUtil.newProfileTab(com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.newProfileTab) HPFXUtil.selectFrameGrouping(com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.selectFrameGrouping) Collection(java.util.Collection) Test(org.junit.Test) SimplifiedLogScenario(com.insightfullogic.honest_profiler.framework.scenario.SimplifiedLogScenario) HPFXUtil.selectView(com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.selectView) HPFXUtil.getFlatTableView(com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.getFlatTableView) ENTER(javafx.scene.input.KeyCode.ENTER) Ignore(org.junit.Ignore) ScenarioStraightFilter(com.insightfullogic.honest_profiler.framework.scenario.ScenarioStraightFilter) FxRobot(org.testfx.api.FxRobot) AbstractJavaFxTest(com.insightfullogic.honest_profiler.ports.javafx.framework.AbstractJavaFxTest) Test(org.junit.Test)

Aggregations

FrameGrouping (com.insightfullogic.honest_profiler.core.aggregation.grouping.FrameGrouping)2 ParameterUtil.getScenarios (com.insightfullogic.honest_profiler.framework.ParameterUtil.getScenarios)2 ScenarioStraightFilter (com.insightfullogic.honest_profiler.framework.scenario.ScenarioStraightFilter)2 ScenarioStraightFilter.keyFlt (com.insightfullogic.honest_profiler.framework.scenario.ScenarioStraightFilter.keyFlt)2 SimplifiedLogScenario (com.insightfullogic.honest_profiler.framework.scenario.SimplifiedLogScenario)2 AbstractJavaFxTest (com.insightfullogic.honest_profiler.ports.javafx.framework.AbstractJavaFxTest)2 HPFXUtil.clickQuickFilterButton (com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.clickQuickFilterButton)2 HPFXUtil.focusOn (com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.focusOn)2 HPFXUtil.newProfileTab (com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.newProfileTab)2 HPFXUtil.selectFrameGrouping (com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.selectFrameGrouping)2 HPFXUtil.selectView (com.insightfullogic.honest_profiler.ports.javafx.framework.HPFXUtil.selectView)2 LOG (com.insightfullogic.honest_profiler.ports.javafx.model.ProfileContext.ProfileMode.LOG)2 Arrays.asList (java.util.Arrays.asList)2 Collection (java.util.Collection)2 BACK_SPACE (javafx.scene.input.KeyCode.BACK_SPACE)2 ENTER (javafx.scene.input.KeyCode.ENTER)2 Ignore (org.junit.Ignore)2 Test (org.junit.Test)2 RunWith (org.junit.runner.RunWith)2 Parameterized (org.junit.runners.Parameterized)2