public function FeatureContext::assertNoRegion in Acquia Lift Connector 7.2
Same name and namespace in other branches
- 7 behat-tests/features/bootstrap/FeatureContext.php \FeatureContext::assertNoRegion()
Helper function to assert that a particular region is not visible.
Parameters
$region_id: The id for the region defined in the behat.yml configuration file.
$region_name: A human readable name for the region
Throws
Exception If the region is visible on the page.
3 calls to FeatureContext::assertNoRegion()
- FeatureContext::assertNoModalWindow in behat-tests/
features/ bootstrap/ FeatureContext.php - @Then /^I should not see the modal$/
- FeatureContext::assertNoVariationTypeDialogWindow in behat-tests/
features/ bootstrap/ FeatureContext.php - @Then /^I should not see the variation type dialog$/
- FeatureContext::assertNoVariationTypeFormDialogWindow in behat-tests/
features/ bootstrap/ FeatureContext.php - @Then /^I should not see the variation type form dialog$/
File
- behat-tests/
features/ bootstrap/ FeatureContext.php, line 986
Class
- FeatureContext
- Defines application features from the specific context.
Code
public function assertNoRegion($region_id, $region_name) {
try {
$region = $this
->getRegion($region_id);
} catch (\Exception $e) {
// If the region was not found that is good.
return;
}
if ($region && $region
->isVisible()) {
throw new \Exception(sprintf('The %s was found on the page %s', strtolower($region_name), $this
->getSession()
->getCurrentUrl()));
}
}