public function FeatureContext::assertRegionVariationHasLink in Acquia Lift Connector 7
Same name and namespace in other branches
- 7.2 behat-tests/features/bootstrap/FeatureContext.php \FeatureContext::assertRegionVariationHasLink()
@Then :variation_set set :variation variation should have the :link link
Throws
\Exception If the menu or link cannot be found.
1 call to FeatureContext::assertRegionVariationHasLink()
- FeatureContext::assertRegionVariationLinkClick in behat-tests/
features/ bootstrap/ FeatureContext.php - @When I click :link link for the :variation_set set :variation variation
File
- behat-tests/
features/ bootstrap/ FeatureContext.php, line 326
Class
- FeatureContext
- Defines application features from the specific context.
Code
public function assertRegionVariationHasLink($variation_set, $variation, $link) {
$css = $this
->getVariationLinkCss($variation_set, $variation, $link);
// Now find the link and return it.
$element = $this
->findElementInRegion($css, 'lift_tray');
if (empty($element)) {
throw new \Exception(sprintf('Cannot load the link "%s" for set "%s" and variation "%s" on page %s using selector %s.', $link, $variation_set, $variation, $this
->getSession()
->getCurrentUrl(), $css));
}
return $element;
}