Skip to content

Commit

Permalink
fix: fix gradle task GebTest (#92129)
Browse files Browse the repository at this point in the history
* fixed value rendered for geb system property `geb.build.reportsDir`
* fixed URL creation for browser driver download
  • Loading branch information
skiesewetter-intershop committed Jan 24, 2024
1 parent de7d6e1 commit 9fd6584
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import org.gradle.api.tasks.TaskAction
import java.io.File
import java.io.FileOutputStream
import java.io.IOException
import java.net.URI
import java.nio.file.Paths
import javax.inject.Inject

Expand Down Expand Up @@ -60,7 +61,7 @@ open class GebDriverDownload @Inject constructor(objectFactory: ObjectFactory,
val targetFile = File(targetDir, "driver.${extension.get()}")

try {
Paths.get(url.get()).toUri().toURL().openStream().use { input ->
URI.create(url.get()).toURL().openStream().use { input ->
FileOutputStream(targetFile).use { output ->
input.copyTo(output)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ abstract class GebTest : Test() {
}

systemProperty("geb.env", gebEnvironment.get())
systemProperty("geb.build.reportsDir", project.layout.buildDirectory.dir("geb-reports/${gebEnvironment.get()}"))
systemProperty("geb.build.reportsDir", project.layout.buildDirectory.dir("geb-reports/${gebEnvironment.get()}").get().asFile.absolutePath)

useJUnitPlatform()

Expand Down

0 comments on commit 9fd6584

Please sign in to comment.