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
Given a list of DOM nodes with texts, we'd like to assert that the texts of the elements matches an array of strings we have in Java.
For attributes, there is extractingAttribute which makes this easy for attributes.
We'd like to have an extractingText there to do the same for element texts.
We would like to write the following test (we are testing an XSL-FO document):
assertThat(letterDocument)
.withNamespaceContext(XSL_FO_NAMESPACE_CONTEXT)
.nodesByXPath("//fo:block[@id='recipient-address']/fo:block")
.extractingText()
.containsExactly("John Doo",
"Street 213423",
"2944 AA Amsterdam",
"The Netherlands");
So far I am unable to write well-written assertions to test this.
Maybe I am missing something?
Would you accept a PR for such an extractingText() method?
The text was updated successfully, but these errors were encountered:
keesvandieren
changed the title
MultipleNodeAssert: asserting node values or node text() of all nodes
MultipleNodeAssert: asserting node text of all nodes
Jul 23, 2020
Given a list of DOM nodes with texts, we'd like to assert that the texts of the elements matches an array of strings we have in Java.
For attributes, there is extractingAttribute which makes this easy for attributes.
We'd like to have an
extractingText
there to do the same for element texts.We would like to write the following test (we are testing an XSL-FO document):
So far I am unable to write well-written assertions to test this.
Maybe I am missing something?
Would you accept a PR for such an extractingText() method?
The text was updated successfully, but these errors were encountered: