This is an automated email from the ASF dual-hosted git repository. jonnybot pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/groovy-geb.git
commit 06e589097b129a1642fdd9da773361d6004b5f7b Author: Carl Marcum <[email protected]> AuthorDate: Fri Apr 3 17:09:35 2026 -0400 revert changes to browser in real-browser test config. add license headers to test asset and resource files. update byte sizes in tests. --- buildSrc/src/main/groovy/geb.groovy-module.gradle | 2 -- .../real-browser/src/test/resources/GebConfig.groovy | 4 ++-- gradle/libs.versions.toml | 3 +-- .../geb/testcontainers/DownloadSupportSpec.groovy | 2 +- .../groovy/geb/testcontainers/UploadSpec.groovy | 2 +- .../integration-test/resources/assets/upload-test.txt | 16 ++++++++++++++++ .../src/integration-test/resources/static/index.html | 18 ++++++++++++++++++ .../resources/static/upload-success.html | 18 ++++++++++++++++++ .../src/integration-test/resources/static/upload.html | 18 ++++++++++++++++++ 9 files changed, 75 insertions(+), 8 deletions(-) diff --git a/buildSrc/src/main/groovy/geb.groovy-module.gradle b/buildSrc/src/main/groovy/geb.groovy-module.gradle index bcc3fdd6..f983eb0e 100644 --- a/buildSrc/src/main/groovy/geb.groovy-module.gradle +++ b/buildSrc/src/main/groovy/geb.groovy-module.gradle @@ -80,7 +80,5 @@ tasks.named('rat') { '**/MANIFEST.MF', // TODO: can we remove this? '**/META-INF/services/**', // TODO: can we remove this? '**/META-INF/groovy/**', // TODO: can we remove this? - '**/integration-test/resources/assets/*.txt', // exclude test artifacts - '**/integration-test/resources/static/*.html', // exclude test artifacts ] } \ No newline at end of file diff --git a/doc/manual-snippets/real-browser/src/test/resources/GebConfig.groovy b/doc/manual-snippets/real-browser/src/test/resources/GebConfig.groovy index 3a673b4e..98832ebf 100644 --- a/doc/manual-snippets/real-browser/src/test/resources/GebConfig.groovy +++ b/doc/manual-snippets/real-browser/src/test/resources/GebConfig.groovy @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import org.openqa.selenium.firefox.FirefoxOptions +import org.openqa.selenium.chrome.ChromeOptions import org.testcontainers.Testcontainers import org.testcontainers.containers.BrowserWebDriverContainer import org.testcontainers.utility.ResourceReaper @@ -27,7 +27,7 @@ Testcontainers.exposeHostPorts(8080) driver = { def container = new BrowserWebDriverContainer<>() - .withCapabilities(new FirefoxOptions()) + .withCapabilities(new ChromeOptions()) .withRecordingMode(BrowserWebDriverContainer.VncRecordingMode.SKIP, null) container.start() diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 13dbe7fa..388395a6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -69,12 +69,11 @@ selenium-chrome-driver = { module = "org.seleniumhq.selenium:selenium-chrome-dri selenium-firefox-driver = { module = "org.seleniumhq.selenium:selenium-firefox-driver", version.ref = "selenium" } selenium-edge-driver = { module = "org.seleniumhq.selenium:selenium-edge-driver", version.ref = "selenium" } selenium-remote-driver = { module = "org.seleniumhq.selenium:selenium-remote-driver", version.ref = "remote-driver" } -testcontainers-selenium = { module = "org.testcontainers:selenium", version.ref = "testcontainers" } spock-core = { module = 'org.spockframework:spock-core', version.ref = 'spock' } spockCoreGroovy25 = 'org.spockframework:spock-core:1.3-groovy-2.5' spockCoreGroovy3 = 'org.spockframework:spock-core:2.3-groovy-3.0' systemLambda = 'com.github.stefanbirkner:system-lambda:1.2.1' -# testcontainers-selenium = 'org.testcontainers:selenium:1.20.4' +testcontainers-selenium = { module = "org.testcontainers:selenium", version.ref = "testcontainers" } testng = 'org.testng:testng:7.5.1' threeTen-extra = { module = 'org.threeten:threeten-extra', version.ref = 'threeTen' } diff --git a/integration/geb-testcontainers/src/integration-test/groovy/geb/testcontainers/DownloadSupportSpec.groovy b/integration/geb-testcontainers/src/integration-test/groovy/geb/testcontainers/DownloadSupportSpec.groovy index 2884a554..f257815c 100644 --- a/integration/geb-testcontainers/src/integration-test/groovy/geb/testcontainers/DownloadSupportSpec.groovy +++ b/integration/geb-testcontainers/src/integration-test/groovy/geb/testcontainers/DownloadSupportSpec.groovy @@ -37,7 +37,7 @@ class DownloadSupportSpec extends ContainerGebSpecWithServer { to(HomePage) then: - downloadBytes().length == 247 + downloadBytes().length == 1074 } def cleanup() { diff --git a/integration/geb-testcontainers/src/integration-test/groovy/geb/testcontainers/UploadSpec.groovy b/integration/geb-testcontainers/src/integration-test/groovy/geb/testcontainers/UploadSpec.groovy index 5d24ee36..614bcd33 100644 --- a/integration/geb-testcontainers/src/integration-test/groovy/geb/testcontainers/UploadSpec.groovy +++ b/integration/geb-testcontainers/src/integration-test/groovy/geb/testcontainers/UploadSpec.groovy @@ -78,7 +78,7 @@ class UploadSpec extends ContainerGebSpecWithServer { File fileFromContainer = new File(tempDir.toString(), "upload-test.txt") then: - fileFromContainer.bytes.length == 26 + fileFromContainer.bytes.length == 842 when: uploadPage.fileInput.file = fileInContainer diff --git a/integration/geb-testcontainers/src/integration-test/resources/assets/upload-test.txt b/integration/geb-testcontainers/src/integration-test/resources/assets/upload-test.txt index 0c96d3ba..0f408b01 100644 --- a/integration/geb-testcontainers/src/integration-test/resources/assets/upload-test.txt +++ b/integration/geb-testcontainers/src/integration-test/resources/assets/upload-test.txt @@ -1 +1,17 @@ + # Licensed to the Apache Software Foundation (ASF) under one + # or more contributor license agreements. See the NOTICE file + # distributed with this work for additional information + # regarding copyright ownership. The ASF licenses this file + # to you under the Apache License, Version 2.0 (the + # "License"); you may not use this file except in compliance + # with the License. You may obtain a copy of the License at + * + # https://www.apache.org/licenses/LICENSE-2.0 + * + # Unless required by applicable law or agreed to in writing, + # software distributed under the License is distributed on an + # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + # KIND, either express or implied. See the License for the + # specific language governing permissions and limitations + # under the License. File uploaded successfully \ No newline at end of file diff --git a/integration/geb-testcontainers/src/integration-test/resources/static/index.html b/integration/geb-testcontainers/src/integration-test/resources/static/index.html index 4a8ebbd8..f6b91b4f 100644 --- a/integration/geb-testcontainers/src/integration-test/resources/static/index.html +++ b/integration/geb-testcontainers/src/integration-test/resources/static/index.html @@ -1,3 +1,21 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + --> <!DOCTYPE html> <html lang="en"> <head> diff --git a/integration/geb-testcontainers/src/integration-test/resources/static/upload-success.html b/integration/geb-testcontainers/src/integration-test/resources/static/upload-success.html index 3014deb6..786f1725 100644 --- a/integration/geb-testcontainers/src/integration-test/resources/static/upload-success.html +++ b/integration/geb-testcontainers/src/integration-test/resources/static/upload-success.html @@ -1,3 +1,21 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + --> <!DOCTYPE html> <html lang="en"> <head> diff --git a/integration/geb-testcontainers/src/integration-test/resources/static/upload.html b/integration/geb-testcontainers/src/integration-test/resources/static/upload.html index 3c387652..68397092 100644 --- a/integration/geb-testcontainers/src/integration-test/resources/static/upload.html +++ b/integration/geb-testcontainers/src/integration-test/resources/static/upload.html @@ -1,3 +1,21 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + --> <!DOCTYPE html> <html lang="en"> <head>
