You are here

public function FeatureContext::assertNotLinkVisibleRegion in Acquia Lift Connector 7

Same name and namespace in other branches
  1. 7.2 behat-tests/features/bootstrap/FeatureContext.php \FeatureContext::assertNotLinkVisibleRegion()

@Then I should not visibly see the link :link in the :region( region)

Throws

\Exception If link is found in region and is visible.

File

behat-tests/features/bootstrap/FeatureContext.php, line 470

Class

FeatureContext
Defines application features from the specific context.

Code

public function assertNotLinkVisibleRegion($link, $region) {
  $result = $this
    ->findLinkInRegion($link, $region);
  if (!empty($result) && $result
    ->isVisible()) {
    throw new \Exception(sprintf('Link to "%s" in the "%s" region on the page %s', $link, $region, $this
      ->getSession()
      ->getCurrentUrl()));
  }
}