fields
fields copied to clipboard
Does not render tags in view unit tests
Grails: 2.4.2
When using the <f:field> tag on a gsp page and unit testing the page with: @TestMixin(GroovyPageUnitTestMixin)
Rendering the page with render(), I see the <f:field> tag unrendered (meaning it is not transformed to e.g. input with with label). Other built-in Grails tags render correctly on produced output.
All works with run-app, so the problem is with unit tests.
I guess you would have to wire in the taglib yourself. By default Grails only wires in it's own taglibs, not custom taglibs. How this should be done, I'm not sure.
i saw the same thing happens when creating a custom taglib that uses the fields tag internally. Adding support for unit testing with these things would be pretty cool.