From 522da24af141935de0227c207048cc1237cf81e6 Mon Sep 17 00:00:00 2001 From: James Daugherty Date: Mon, 9 Dec 2024 14:05:21 -0500 Subject: [PATCH] Fix test name to include specification & feature name --- .../grails/plugin/geb/ContainerGebTestDescription.groovy | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/testFixtures/groovy/grails/plugin/geb/ContainerGebTestDescription.groovy b/src/testFixtures/groovy/grails/plugin/geb/ContainerGebTestDescription.groovy index ab72c14..e20f857 100644 --- a/src/testFixtures/groovy/grails/plugin/geb/ContainerGebTestDescription.groovy +++ b/src/testFixtures/groovy/grails/plugin/geb/ContainerGebTestDescription.groovy @@ -32,7 +32,13 @@ class ContainerGebTestDescription implements TestDescription { String filesystemFriendlyName ContainerGebTestDescription(IterationInfo testInfo) { - testId = testInfo.displayName + testId = [ + testInfo.feature.spec.displayName, + testInfo.feature.displayName, + testInfo.displayName != testInfo.feature.displayName ? testInfo.displayName : null, + testInfo.displayName != testInfo.feature.displayName ? testInfo.iterationIndex : null + ].findAll(/* Remove nulls */).join(' ') + String safeName = testId.replaceAll('\\W+', '_') filesystemFriendlyName = safeName }