This is an automated email from the ASF dual-hosted git repository.

matrei pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/grails-core.git


The following commit(s) were added to refs/heads/7.0.x by this push:
     new 5bde82cc64 fix(geb): minor improvements (#15103)
5bde82cc64 is described below

commit 5bde82cc647e08ee46f6cf616b61290519cf1622
Author: Mattias Reichel <[email protected]>
AuthorDate: Tue Sep 30 16:06:18 2025 +0200

    fix(geb): minor improvements (#15103)
---
 .../plugin/geb/GrailsContainerGebExtension.groovy      |  2 +-
 .../grails/plugin/geb/WebDriverContainerHolder.groovy  | 18 +++++++++++-------
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git 
a/grails-geb/src/testFixtures/groovy/grails/plugin/geb/GrailsContainerGebExtension.groovy
 
b/grails-geb/src/testFixtures/groovy/grails/plugin/geb/GrailsContainerGebExtension.groovy
index 953f48228b..3f5d7a7c38 100644
--- 
a/grails-geb/src/testFixtures/groovy/grails/plugin/geb/GrailsContainerGebExtension.groovy
+++ 
b/grails-geb/src/testFixtures/groovy/grails/plugin/geb/GrailsContainerGebExtension.groovy
@@ -138,7 +138,7 @@ class GrailsContainerGebExtension implements 
IGlobalExtension {
     private static boolean validateContainerGebSpec(SpecInfo specInfo) {
         if (!specInfo.annotations.any { it.annotationType() == Integration }) {
             throw new IllegalArgumentException(
-                    'ContainerGebSpec classes must be annotated with 
@Integration'
+                    'ContainerGebSpec classes must be annotated with 
@Integration.'
             )
         }
         return true
diff --git 
a/grails-geb/src/testFixtures/groovy/grails/plugin/geb/WebDriverContainerHolder.groovy
 
b/grails-geb/src/testFixtures/groovy/grails/plugin/geb/WebDriverContainerHolder.groovy
index 3baeee8385..6a0feddc81 100644
--- 
a/grails-geb/src/testFixtures/groovy/grails/plugin/geb/WebDriverContainerHolder.groovy
+++ 
b/grails-geb/src/testFixtures/groovy/grails/plugin/geb/WebDriverContainerHolder.groovy
@@ -106,8 +106,11 @@ class WebDriverContainerHolder {
                     'serverPort'
             )
         } catch (ignored) {
+            // Test class is annotated with @Integration.
+            // This has been verified in 
GrailsContainerGebExtension.visitSpec().
             throw new IllegalStateException(
-                    'Test class must be annotated with @Integration for 
serverPort to be injected'
+                    'The `serverPort` property that should have been ' +
+                    'injected by the @Integration annotation was not found.'
             )
         }
     }
@@ -138,8 +141,9 @@ class WebDriverContainerHolder {
                 dockerImageName = createDockerImageName(customBrowser)
             } else {
                 log.info(
-                        'No \'containerBrowser\' property found in GebConfig. 
' +
-                        "Using default [$DEFAULT_BROWSER] container image."
+                        'No `containerBrowser` property found in GebConfig. ' +
+                        'Using default [{}] container image.',
+                        DEFAULT_BROWSER
                 )
             }
         }
@@ -226,8 +230,8 @@ class WebDriverContainerHolder {
         catch (SessionNotCreatedException e) {
             throw new IllegalStateException(
                     'Failed to create a remote browser session. ' +
-                    'Did you set a \'containerBrowser\' property ' +
-                    'corresponding to the \'driver\' in GebConfig?',
+                    'Did you set a `containerBrowser` property ' +
+                    'corresponding to the `driver` in GebConfig?',
                     e
             )
         }
@@ -338,7 +342,7 @@ class WebDriverContainerHolder {
         container.host != 
ContainerGebConfiguration.DEFAULT_HOSTNAME_FROM_CONTAINER
     }
 
-    private static DockerImageName createDockerImageName(Object browserName) {
+    private static DockerImageName createDockerImageName(String browserName) {
         DockerImageName.parse(
                 "selenium/standalone-$browserName:$seleniumVersion"
         )
@@ -347,7 +351,7 @@ class WebDriverContainerHolder {
     private static void validateDriverConf(Configuration gebConf) {
         if (gebConf.driverConf && !(gebConf.driverConf instanceof Closure)) {
             throw new IllegalStateException(
-                    'The \'driver\' property of GebConfig must be a ' +
+                    'The `driver` property of GebConfig must be a ' +
                     'Closure that returns an instance of RemoteWebDriver.'
             )
         }

Reply via email to