-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test Automation: Some tests do not work on Windows when using AWT Robot Adapter #588
Comments
Good to know. I'll wait for your PR |
I verified that the tests are running fine on X11 / Linux with the glass robot - would you be fine with setting the BTW: Those integration tests are really cool. Can we establish a policy so that we accept pull requests only if a corresponding test is provided? :-) |
I think the headless Travis build uses the glass robot anyways, so I don't know if we need to test it on a mac. Mind submitting a PR?
It would be ideal, but we should clean up the tests that we have right now. When I first wrote them, I wasn't going for accuracy as much as I was just trying to prove that the code works. So, some tests should have a few additional checks that aren't currently there right now. |
Closed by #589 |
@afester Can you list which tests failed on Windows when the |
I quickly run the tests from within Eclipse, using the awt robot. The failures are usually compare assertions (selection does not match the expected text) while the errors are usually something like |
BTW: I think this is more a TestFX issue. I have written this simple pure JavaFX test case: https://github.com/afester/FranzXaver/blob/testfx/Examples/src/main/java/afester/javafx/examples/testfx/SelectionTestFXExample.java and it also failes with the awt robot. I see the cursor moving in the input text field, but the text does not get selected. With the glass robot, this worked immediately. |
The tests in question are currently skipped when using the AWT robot adapter (see #596), so that one can still build the project without needing to specify this directly. Still, it'll be better to learn more about the issue in the mentioned TestFX issue. |
By default, TestFX uses the "awt" robot adapter. At least on Windows, this results in the SHIFT key not properly handled when selecting text. RichTextFX test cases such as those in the ShiftDown test suite are then failing.
When setting the property
testfx.robot
toglass
, text selection with the pressed shift key works and those test cases succeed.The solution for the gradle build is to add
integrationTest.systemProperty "testfx.robot", "glass"
to the build file. (Will submitt a pull request after checking the same on Linux).See also https://github.com/TomasMikula/RichTextFX/wiki/Test-Automation
The text was updated successfully, but these errors were encountered: