From 3986649f129c2863e9596696d6d6664ba12ceaef Mon Sep 17 00:00:00 2001 From: James Daugherty Date: Mon, 16 Dec 2024 19:43:01 -0500 Subject: [PATCH] fix setup() methods being called --- .../grails/plugin/geb/GebRecordingTestListener.groovy | 3 --- .../grails/plugin/geb/GrailsContainerGebExtension.groovy | 6 ++++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/testFixtures/groovy/grails/plugin/geb/GebRecordingTestListener.groovy b/src/testFixtures/groovy/grails/plugin/geb/GebRecordingTestListener.groovy index a4bbf05..2586d65 100644 --- a/src/testFixtures/groovy/grails/plugin/geb/GebRecordingTestListener.groovy +++ b/src/testFixtures/groovy/grails/plugin/geb/GebRecordingTestListener.groovy @@ -19,9 +19,6 @@ import groovy.transform.CompileStatic import org.spockframework.runtime.AbstractRunListener import org.spockframework.runtime.model.ErrorInfo import org.spockframework.runtime.model.IterationInfo -import org.spockframework.runtime.model.SpecInfo - -import java.time.LocalDateTime /** * A test listener that reports the test result to {@link org.testcontainers.containers.BrowserWebDriverContainer} so diff --git a/src/testFixtures/groovy/grails/plugin/geb/GrailsContainerGebExtension.groovy b/src/testFixtures/groovy/grails/plugin/geb/GrailsContainerGebExtension.groovy index 3a60fe1..8538d23 100644 --- a/src/testFixtures/groovy/grails/plugin/geb/GrailsContainerGebExtension.groovy +++ b/src/testFixtures/groovy/grails/plugin/geb/GrailsContainerGebExtension.groovy @@ -86,9 +86,11 @@ class GrailsContainerGebExtension implements IGlobalExtension { invocation.proceed() } - spec.addSetupInterceptor { + spec.addSetupInterceptor { invocation -> // Grails will be initialized by this point, so setup the browser url correctly - holder.setupBrowserUrl(it) + holder.setupBrowserUrl(invocation) + + invocation.proceed() } spec.addInterceptor { invocation ->