fields icon indicating copy to clipboard operation
fields copied to clipboard

Does not render tags in view unit tests

Open Arch-vile opened this issue 10 years ago • 2 comments

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.

Arch-vile avatar Aug 31 '14 17:08 Arch-vile

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.

sbglasius avatar Sep 10 '14 16:09 sbglasius

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.

mariodavid avatar Nov 29 '14 08:11 mariodavid