fixed duplicate handling in tests' HTML parsing

URIs are unique, labels are not
refactored tests to use HTML parsing helper

cf. 06f3e343cd8fbbd9a7d3b5343e8e3c2009228347

this makes the returned data easier to reason about by removing layers
of interpretation, thus reducing cognitive strain and making it easier
to review the assertions (some of which are currently wrong)

@cdent might appreciate that this makes it more likely that those issues
will be fixed