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/07/10 20:26:04 UTC
(grails-core) branch chore/remove-jodd-wot created (now 19fc2a11d7)
This is an automated email from the ASF dual-hosted git repository.
jamesfredley pushed a change to branch chore/remove-jodd-wot
in repository https://gitbox.apache.org/repos/asf/grails-core.git
at 19fc2a11d7 Remove jodd-wot from fields tests
This branch includes the following new commits:
new 19fc2a11d7 Remove jodd-wot from fields tests
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(grails-core) 01/01: Remove jodd-wot from fields tests
Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
jamesfredley pushed a commit to branch chore/remove-jodd-wot
in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 19fc2a11d7bd1c026cba87c5d4f9d906a277a573
Author: James Fredley <ja...@users.noreply.github.com>
AuthorDate: Fri Jul 10 16:24:42 2026 -0400
Remove jodd-wot from fields tests
Replace the Jerry-based spec assertions with direct output checks and remove the unused jodd-wot test dependency wiring.
Assisted-by: opencode:gpt-5.5
---
gradle.properties | 1 -
grails-fields/build.gradle | 6 +-
.../formfields/DefaultFieldTemplateSpec.groovy | 78 +++++++++-------------
3 files changed, 33 insertions(+), 52 deletions(-)
diff --git a/gradle.properties b/gradle.properties
index bfcdd8de1a..a9caae06f5 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -39,7 +39,6 @@ gradleToolingApiVersion=9.6.0
greenmailVersion=2.1.2
javassistVersion=3.30.2-GA
jnrPosixVersion=3.1.20
-joddWotVersion=3.3.8
joptSimpleVersion=5.0.4
jspApiVersion=4.0.0
openTest4jVersion=1.3.0
diff --git a/grails-fields/build.gradle b/grails-fields/build.gradle
index 57cf832b32..070dc273fd 100644
--- a/grails-fields/build.gradle
+++ b/grails-fields/build.gradle
@@ -54,10 +54,6 @@ dependencies {
testImplementation project(':grails-testing-support-datamapping')
testImplementation project(':grails-testing-support-web')
testImplementation "org.javassist:javassist:$javassistVersion"
- testImplementation("org.jodd:jodd-wot:$joddWotVersion") {
- exclude module: 'slf4j-api'
- exclude module: 'asm'
- }
testRuntimeOnly 'org.objenesis:objenesis' // Required by Spock for mocking classes without default constructor
}
@@ -66,4 +62,4 @@ apply {
from rootProject.layout.projectDirectory.file('gradle/docs-config.gradle')
from rootProject.layout.projectDirectory.file('gradle/test-config.gradle')
from rootProject.layout.projectDirectory.file('gradle/grails-extension-gradle-config.gradle')
-}
\ No newline at end of file
+}
diff --git a/grails-fields/src/test/groovy/grails/plugin/formfields/DefaultFieldTemplateSpec.groovy b/grails-fields/src/test/groovy/grails/plugin/formfields/DefaultFieldTemplateSpec.groovy
index fe0604d164..3c205cfb78 100644
--- a/grails-fields/src/test/groovy/grails/plugin/formfields/DefaultFieldTemplateSpec.groovy
+++ b/grails-fields/src/test/groovy/grails/plugin/formfields/DefaultFieldTemplateSpec.groovy
@@ -19,13 +19,11 @@
package grails.plugin.formfields
import grails.testing.web.taglib.TagLibUnitTest
-import jodd.lagarto.dom.jerry.Jerry
import spock.lang.Specification
-import static jodd.lagarto.dom.jerry.Jerry.jerry
class DefaultFieldTemplateSpec extends Specification implements TagLibUnitTest<FormFieldsTagLib> {
-
- Map model = [:]
+
+ Map model = [:]
void setup() {
model.invalid = false
@@ -46,54 +44,42 @@ class DefaultFieldTemplateSpec extends Specification implements TagLibUnitTest<F
<%= widget %>
</div>'''
}
-
- static Jerry $(String html) {
- jerry(html).children()
- }
-
- void "default rendering"() {
- when:
- def output = tagLib.renderDefaultField(model)
- then:
- def root = $(output.toString())
- root.is('div.fieldcontain')
+ void "default rendering"() {
+ when:
+ String output = tagLib.renderDefaultField(model).toString()
+
+ then:
+ output.contains('<div class="fieldcontain">')
- and:
- def label = root.find('label')
- label.text() == 'label'
- label.attr('for') == 'property'
-
- and:
- label.next().is('input[name=property]')
- }
+ and:
+ output.contains('<label class="" for="property">label</label>')
+ output.indexOf('<label class="" for="property">label</label>') < output.indexOf('<input name="property">')
+ }
- void "container marked as invalid"() {
- given:
- model.invalid = true
+ void "container marked as invalid"() {
+ given:
+ model.invalid = true
- when:
- def output = tagLib.renderDefaultField(model)
-
- then:
- $(output.toString()).hasClass('error')
- }
+ when:
+ String output = tagLib.renderDefaultField(model).toString()
- void "container marked as required"() {
- given:
- model.required = true
+ then:
+ output.contains('<div class="fieldcontain error">')
+ }
- when:
- def output = tagLib.renderDefaultField(model)
+ void "container marked as required"() {
+ given:
+ model.required = true
- then:
- def root = $(output.toString())
- root.hasClass('required')
-
- and:
- def indicator = root.find('label .required-indicator')
- indicator.size()
- indicator.text() == '*'
- }
+ when:
+ String output = tagLib.renderDefaultField(model).toString()
+
+ then:
+ output.contains('<div class="fieldcontain required">')
+
+ and:
+ output.contains('<span class="required-indicator">*</span>')
+ }
}