On Mon, 13 Mar 2023 10:51:33 GMT, Ambarish Rapte <ara...@openjdk.org> wrote:
>> Lukasz Kostyra has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - SetSceneScalingTest: Use latch to check if button was pressed >> - Window: Remove bug ID from comment > > tests/system/src/test/java/test/robot/javafx/stage/SetSceneScalingTest.java > line 64: > >> 62: >> 63: protected void testButtonClick() { >> 64: robot.mouseMove(400, 400); > > In general, this is not hard coded in our tests. > I would recommend to change as: > 1. Add two variables width and height in TestApp > > private final int WIDTH = 400; > private final int HEIGHT = 400; > > 2. Change this line to: > > robot.mouseMove((int)(stage.getX() + stage.getScene().getX() + WIDTH/2), > (int)(stage.getY() + stage.getScene().getY() + HEIGHT/2)); > > > 3. Remove line 97, 98 > 4. Change line 99 and 100 as: > > stage.setWidth(WIDTH); > stage.setHeight(HEIGHT); Done > tests/system/src/test/java/test/robot/javafx/stage/SetSceneScalingTest.java > line 96: > >> 94: stage = new Stage(StageStyle.UNDECORATED); >> 95: stage.addEventHandler(WindowEvent.WINDOW_SHOWN, e -> >> 96: >> Platform.runLater(shownLatch::countDown)); > > Can be changed to : > > stage.setOnShown(l -> { > Platform.runLater(() -> startupLatch.countDown()); > }); Done ------------- PR: https://git.openjdk.org/jfx/pull/1054