You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While running unit test EditModelWidgetRenderSpec in grails 3, the following test fails:
def "the input renderer should include the html5 maxlength attribute and a placeholder if a maxSize validation rule is defined"() {
setup:
ctx = ctxBuilder().model([source:'myText', type:'text']).validationString("required,maxSize[100]").build()
when:
editModelWidgetRenderer.renderText(ctx)
then:
TestUtils.compareHtml(ctx.writer, """<input type="text" data-bind="value:${ctx.model.source}" class="input-small" maxlength="100" placeholder="(maximum 100 characters)" data-validation-engine="validate[${ctx.dataModel.validate}]"></textarea>""")
}
[Fatal Error] :1:206: Attribute "class" was already specified for element "input".
Condition failed with Exception:
TestUtils.compareHtml(ctx.writer, """<input type="text" data-bind="value:${ctx.model.source}" class="input-small" maxlength="100" placeholder="(maximum 100 characters)" data-validation-engine="validate[${ctx.dataModel.validate}]"></textarea>""")
| | | | | | | | |
| | | | | myText | | required,maxSize[100]
| | | | [type:text, source:myText] | [name:myText, validate:required,maxSize[100]]
| | | au.org.ala.ecodata.forms.WidgetRenderContext@f146392 au.org.ala.ecodata.forms.WidgetRenderContext@f146392
| | <input class="input-small" maxlength="100" placeholder="(maximum 100 characters)" data-bind='value:myText' data-validation-engine='validate[required,maxSize[100]]' type='text' class='input-small'/>
| au.org.ala.ecodata.forms.WidgetRenderContext@f146392
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 206; Attribute "class" was already specified for element "input".
Condition failed with Exception:
TestUtils.compareHtml(ctx.writer, """<input type="text" data-bind="value:${ctx.model.source}" class="input-small" maxlength="100" placeholder="(maximum 100 characters)" data-validation-engine="validate[${ctx.dataModel.validate}]"></textarea>""")
| | | | | | | | |
| | | | | myText | | required,maxSize[100]
| | | | [type:text, source:myText] | [name:myText, validate:required,maxSize[100]]
| | | au.org.ala.ecodata.forms.WidgetRenderContext@f146392 au.org.ala.ecodata.forms.WidgetRenderContext@f146392
| | <input class="input-small" maxlength="100" placeholder="(maximum 100 characters)" data-bind='value:myText' data-validation-engine='validate[required,maxSize[100]]' type='text' class='input-small'/>
| au.org.ala.ecodata.forms.WidgetRenderContext@f146392
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 206; Attribute "class" was already specified for element "input".
at au.org.ala.ecodata.forms.EditModelWidgetRenderSpec.the input renderer should include the html5 maxlength attribute and a placeholder if a maxSize validation rule is defined(EditModelWidgetRenderSpec.groovy:100)
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 206; Attribute "class" was already specified for element "input".
at groovy.util.XmlSlurper.parse(XmlSlurper.java:205)
at groovy.util.XmlSlurper.parse(XmlSlurper.java:258)
at au.org.ala.ecodata.forms.TestUtils.compareHtml(TestUtils.groovy:39)
at au.org.ala.ecodata.forms.TestUtils.compareHtml(TestUtils.groovy:28)
... 1 more
The editModelWidgetRenderer.renderText(ctx) currently is generating 2 input class and SAXParser is now more strict about this.
The text was updated successfully, but these errors were encountered:
While running unit test EditModelWidgetRenderSpec in grails 3, the following test fails:
The editModelWidgetRenderer.renderText(ctx) currently is generating 2 input class and SAXParser is now more strict about this.
The text was updated successfully, but these errors were encountered: