Skip to content

Commit

Permalink
Make UI tests run in a real window on Windows platforms
Browse files Browse the repository at this point in the history
Since headless TestFX is broken on Windows: javafxports/openjdk-jfx#66
  • Loading branch information
SamCarlberg committed Jul 31, 2018
1 parent 0300e98 commit 6327306
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,28 @@ allprojects {

tasks.withType<Test> {
useJUnitPlatform()
jvmArgs = listOf(
if (System.getProperty("os.name").toLowerCase().startsWith("windows")) {
println("Detected a Windows platform; UI tests will not run headless. See: https://github.com/javafxports/openjdk-jfx/issues/66")
jvmArgs = listOf(
// Disable headless tests on Windows due to a bug in headless test rendering on Windows
// See: https://github.com/javafxports/openjdk-jfx/issues/66
// "-Djava.awt.headless=true",
// "-Dtestfx.robot=glass",
// "-Dtestfx.headless=true",
// "-Dprism.order=sw",
// "-Dprism.text=t2k",
"--add-exports", "javafx.controls/com.sun.javafx.scene.control.inputmap=ALL-UNNAMED"
)
} else {
jvmArgs = listOf(
"-Djava.awt.headless=true",
"-Dtestfx.robot=glass",
"-Dtestfx.headless=true",
"-Dprism.order=sw",
"-Dprism.text=t2k"
)
"-Dprism.text=t2k",
"--add-exports", "javafx.controls/com.sun.javafx.scene.control.inputmap=ALL-UNNAMED"
)
}
}

tasks.withType<Javadoc> {
Expand Down

0 comments on commit 6327306

Please sign in to comment.