loyada / dollarx

Other
15 stars 1 forks source link

containing and parentOf seem inconsistent #59

Closed alex-vayu closed 3 years ago

alex-vayu commented 3 years ago

The following highlights 3 elements DebugUtil.highlightAll(BasicPath.element.inside(BasicPath.main) .that(ElementProperties.isAfterSibling(BasicPath.svg)) .containing(BasicPath.header.that(ElementProperties.hasAggregatedTextEqualTo("Page Title"))) )

While this highlights only one DebugUtil.highlightAll(BasicPath.element.inside(BasicPath.main) .containing(BasicPath.header.that(ElementProperties.hasAggregatedTextEqualTo("Page Title"))) .that(ElementProperties.isAfterSibling(BasicPath.svg)) )

This also highlights only one: DebugUtil.highlightAll(BasicPath.element.inside(BasicPath.main) .that(ElementProperties.isAfterSibling(BasicPath.svg)) .parentOf(BasicPath.header.that(ElementProperties.hasAggregatedTextEqualTo("Page Title"))) )

The expected result is just one.

Happy to provide more details

loyada commented 3 years ago

Fixed in 1.2.3