Open
Description
I am testing a TreeGrid that uses a LitRenderer. I am calling
GridKt._getFormattedRow()
on my expected row, but am getting back only the extracted text portions. This particular renderer conditionally includes an anchor tag, based on some business logic. When I debug into
Renderers._getPresentationValue
in particular these lines
val renderedLitTemplateHtml: String = renderLitTemplate(templateExpression, valueProviders, rowObject)
Jsoup.parse(renderedLitTemplateHtml).textRecursively
I see my html in the rendererdLitTemplateHtml value
<vaadin-grid-tree-toggle @click=${onClick} .leaf=true .expanded=${model.expanded} .level=${model.level}><img src='svg/myobj.svg' alt=''> <span class='tree-node-labels'> <a href='myobj/2' target='_blank'>FOO</a> <span class='tree-node-labels-subheader target-node'>Bar</span> <span class='tree-node-labels-subheader ' hidden=true>Inactive</span></span></vaadin-grid-tree-toggle>
but then the Jsoup parsing returns only a minimal String representation, i.e. FOO Bar Inactive
. What I'd like to be able to do is assert on whether there is an anchor tag in the rendereredLitTemplateHtml variable String. Any thoughts on this, other than trying to roll my own method? Thanks!
Activity