You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@grails.apache.org by ja...@apache.org on 2026/09/30 21:13:46 UTC
(grails-core) branch feature/grails-geb-playwright-local updated: point the Playwright Geb proof at geb-playwright
This is an automated email from the ASF dual-hosted git repository.
jamesfredley pushed a commit to branch feature/grails-geb-playwright-local
in repository https://gitbox.apache.org/repos/asf/grails-core.git
The following commit(s) were added to refs/heads/feature/grails-geb-playwright-local by this push:
new 843dc0b215 point the Playwright Geb proof at geb-playwright
843dc0b215 is described below
commit 843dc0b21539b67013e301a3aa93f1ba9f66b1ff
Author: James Fredley <ja...@users.noreply.github.com>
AuthorDate: Wed Sep 30 17:13:22 2026 -0400
point the Playwright Geb proof at geb-playwright
Use the experimental geb-playwright artifact and geb.playwright package.
Name the BOM entry geb-spock-playwright so publication still resolves geb-spock.version.
---
build-logic/docs-core/build.gradle | 3 ++
.../tasks/bom/PropertyNameCalculatorSpec.groovy | 54 ++++++++++++++++++++++
dependencies.gradle | 3 +-
grails-geb/README.md | 2 +-
grails-geb/build.gradle | 2 +-
.../plugin/geb/PlaywrightBrowserHolder.groovy | 2 +-
.../groovy/org/demo/spock/GebConfigSpec.groovy | 2 +-
.../integration-test/resources/GebConfig.groovy | 2 +-
8 files changed, 64 insertions(+), 6 deletions(-)
diff --git a/build-logic/docs-core/build.gradle b/build-logic/docs-core/build.gradle
index 794cc42fc9..953b8dfeee 100644
--- a/build-logic/docs-core/build.gradle
+++ b/build-logic/docs-core/build.gradle
@@ -55,6 +55,9 @@ dependencies {
transitive = false
}
+ // PropertyNameCalculator references Gradle API types, so this spec needs them on the test classpath.
+ testImplementation gradleApi()
+
testImplementation "org.apache.groovy:groovy-test-junit5:${GroovySystem.version}"
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.12.2'
testImplementation 'org.junit.platform:junit-platform-suite:1.12.2'
diff --git a/build-logic/docs-core/src/test/groovy/org/apache/grails/gradle/tasks/bom/PropertyNameCalculatorSpec.groovy b/build-logic/docs-core/src/test/groovy/org/apache/grails/gradle/tasks/bom/PropertyNameCalculatorSpec.groovy
new file mode 100644
index 0000000000..f28b408022
--- /dev/null
+++ b/build-logic/docs-core/src/test/groovy/org/apache/grails/gradle/tasks/bom/PropertyNameCalculatorSpec.groovy
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+package org.apache.grails.gradle.tasks.bom
+
+import spock.lang.Specification
+
+class PropertyNameCalculatorSpec extends Specification {
+
+ void "geb-playwright shares the geb-spock version property"() {
+ given:
+ PropertyNameCalculator calculator = calculator(
+ 'geb-spock': 'org.apache.groovy.geb:geb-spock:8.0.2-SNAPSHOT',
+ 'geb-spock-playwright': 'org.apache.groovy.geb:geb-playwright:8.0.2-SNAPSHOT'
+ )
+
+ expect:
+ calculator.calculate('org.apache.groovy.geb', 'geb-playwright', '8.0.2-SNAPSHOT', false)
+ .versionPropertyName == 'geb-spock.version'
+ }
+
+ void "a key that does not prefix a known version property fails"() {
+ given:
+ PropertyNameCalculator calculator = calculator(
+ 'geb-playwright': 'org.apache.groovy.geb:geb-playwright:8.0.2-SNAPSHOT'
+ )
+
+ when:
+ calculator.calculate('org.apache.groovy.geb', 'geb-playwright', '8.0.2-SNAPSHOT', false)
+
+ then:
+ Exception failure = thrown(Exception)
+ failure.message.contains('Could not determine artifact property key')
+ }
+
+ private static PropertyNameCalculator calculator(Map<String, String> dependencies) {
+ new PropertyNameCalculator([:], dependencies, ['geb-spock.version': '8.0.2-SNAPSHOT'])
+ }
+}
diff --git a/dependencies.gradle b/dependencies.gradle
index 2406acee32..6efbf646c9 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -118,7 +118,8 @@ ext {
'commons-codec' : "commons-codec:commons-codec:${bomDependencyVersions['commons-codec.version']}",
'commons-lang3' : "org.apache.commons:commons-lang3:${bomDependencyVersions['commons-lang3.version']}",
'geb-spock' : "org.apache.groovy.geb:geb-spock:${bomDependencyVersions['geb-spock.version']}",
- 'geb-direct' : "org.apache.groovy.geb:geb-direct:${bomDependencyVersions['geb-spock.version']}",
+ // Prefix geb-spock so BOM generation resolves geb-spock.version. The artifact id stays geb-playwright.
+ 'geb-spock-playwright' : "org.apache.groovy.geb:geb-playwright:${bomDependencyVersions['geb-spock.version']}",
'graphql-java' : "com.graphql-java:graphql-java:${bomDependencyVersions['graphql-java.version']}",
'graphql-java-extended-scalars': "com.graphql-java:graphql-java-extended-scalars:${bomDependencyVersions['graphql-java-extended-scalars.version']}",
'groovy' : "org.apache.groovy:groovy:${bomDependencyVersions['groovy.version']}",
diff --git a/grails-geb/README.md b/grails-geb/README.md
index 763c8080fc..08e9b8a5e7 100644
--- a/grails-geb/README.md
+++ b/grails-geb/README.md
@@ -56,7 +56,7 @@ There are two ways to use this plugin. Either extend your test classes with the
### PlaywrightGebSpec
-`PlaywrightGebSpec` runs Geb against a local headless Playwright Chromium browser, without a Testcontainers browser or a container runtime. Add `geb-direct` alongside the Grails Geb test fixtures, install Chromium with `npx playwright install chromium`, and annotate the integration specification with `@Integration`:
+`PlaywrightGebSpec` runs Geb against a local headless Playwright Chromium browser, without a Testcontainers browser or a container runtime. Add the experimental `geb-playwright` module alongside the Grails Geb test fixtures, install Chromium with `npx playwright install chromium`, and annotate the integration specification with `@Integration`:
```groovy
import grails.plugin.geb.PlaywrightGebSpec
diff --git a/grails-geb/build.gradle b/grails-geb/build.gradle
index 62d046074f..b322e57e2a 100644
--- a/grails-geb/build.gradle
+++ b/grails-geb/build.gradle
@@ -48,7 +48,7 @@ dependencies {
testFixturesCompileOnly 'org.slf4j:slf4j-simple' // Remove compilation warning about missing slf4j impl
testFixturesApi 'org.apache.groovy.geb:geb-spock'
- testFixturesApi 'org.apache.groovy.geb:geb-direct'
+ testFixturesApi 'org.apache.groovy.geb:geb-playwright'
testFixturesApi project(':grails-testing-support-core')
testFixturesApi project(':grails-datamapping-core')
testFixturesApi "org.testcontainers:testcontainers-selenium"
diff --git a/grails-geb/src/testFixtures/groovy/grails/plugin/geb/PlaywrightBrowserHolder.groovy b/grails-geb/src/testFixtures/groovy/grails/plugin/geb/PlaywrightBrowserHolder.groovy
index b392a3ea18..6850bfcd54 100644
--- a/grails-geb/src/testFixtures/groovy/grails/plugin/geb/PlaywrightBrowserHolder.groovy
+++ b/grails-geb/src/testFixtures/groovy/grails/plugin/geb/PlaywrightBrowserHolder.groovy
@@ -24,7 +24,7 @@ import groovy.transform.CompileStatic
import geb.Browser
import geb.ConfigurationLoader
-import geb.direct.PlaywrightDriver
+import geb.playwright.PlaywrightDriver
import geb.spock.SpockGebTestManagerBuilder
import geb.test.GebTestManager
import org.spockframework.runtime.extension.IMethodInvocation
diff --git a/grails-test-examples/geb-gebconfig/src/integration-test/groovy/org/demo/spock/GebConfigSpec.groovy b/grails-test-examples/geb-gebconfig/src/integration-test/groovy/org/demo/spock/GebConfigSpec.groovy
index 128b8fc168..cb73ac9801 100644
--- a/grails-test-examples/geb-gebconfig/src/integration-test/groovy/org/demo/spock/GebConfigSpec.groovy
+++ b/grails-test-examples/geb-gebconfig/src/integration-test/groovy/org/demo/spock/GebConfigSpec.groovy
@@ -19,7 +19,7 @@
package org.demo.spock
-import geb.direct.PlaywrightWebDriver
+import geb.playwright.PlaywrightWebDriver
import org.demo.spock.pages.HomePage
import grails.plugin.geb.PlaywrightGebSpec
diff --git a/grails-test-examples/geb-gebconfig/src/integration-test/resources/GebConfig.groovy b/grails-test-examples/geb-gebconfig/src/integration-test/resources/GebConfig.groovy
index b1234e1345..907576e30a 100644
--- a/grails-test-examples/geb-gebconfig/src/integration-test/resources/GebConfig.groovy
+++ b/grails-test-examples/geb-gebconfig/src/integration-test/resources/GebConfig.groovy
@@ -19,7 +19,7 @@
import geb.report.ReportState
import geb.report.Reporter
-import geb.direct.PlaywrightDriver
+import geb.playwright.PlaywrightDriver
import geb.report.ReportingListener
driver = PlaywrightDriver.config {