While \Drupal\FunctionalJavascriptTests\JSWebAssert::assertVisibleInViewport()
correctly verifies that the element is actually visible ($element->isVisible()
) before going about calculating whether some or all corners are in the viewport, the opposite assertNotVisibleInViewport()
skips that check, for some reason. If the element is hidden, 0 will be reported for all its rectangle coordinates, making the assertion fail.
Is there any reason for this, or was it just an oversight?
PS: Why is there no "tests system" component? Most of the test code isn't in the Simpletest module anymore, but there's no other test-related component.