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
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!
At the moment the text is retrieved recursively and that's pretty much set in stone. Perhaps I could add a config option for Karibu Testing to return the full template html instead?
I am testing a TreeGrid that uses a LitRenderer. I am calling
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
in particular these lines
I see my html in the rendererdLitTemplateHtml value
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!