public function VarbaseContext::iShouldNotSeeInThePanelRegion in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 8.7
Same name and namespace in other branches
- 8.8 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iShouldNotSeeInThePanelRegion()
- 8.4 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iShouldNotSeeInThePanelRegion()
- 8.5 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iShouldNotSeeInThePanelRegion()
- 8.6 tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iShouldNotSeeInThePanelRegion()
- 9.0.x tests/features/bootstrap/VarbaseContext.php \VarbaseContext::iShouldNotSeeInThePanelRegion()
#varbase: To check if we do not have the text in the selected panel region. using the code name of the panel region. or the html id.
Example 1: Then I should not see "Add new pane" in the "Center" panel region Example 2: Then I should not see "custom pane title" in the "Right side" panel region Example 3: Then I should not see "Add new pane" in the "panels-ipe-regionid-center" panel region
@Then /^I should not see "(?P<text>[^"]*)" in the "(?P<panleRegion>[^"]*)" panel region$/
File
- tests/
features/ bootstrap/ VarbaseContext.php, line 974
Class
- VarbaseContext
- Defines application features from the specific context.
Code
public function iShouldNotSeeInThePanelRegion($text, $panleRegion) {
if (strpos($panleRegion, "panels-ipe-regionid-")) {
$panleRegionId = $panleRegion;
}
else {
$panleRegionId = "panels-ipe-regionid-" . str_replace(' ', '-', strtolower($panleRegion));
}
$elementPanelRegion = $this
->getSession()
->getPage()
->find('xpath', "//*[contains(@id, '{$panleRegionId}')]");
if (empty($elementPanelRegion)) {
throw new Exception('The panle region [ ' . $panleRegion . ' ] is not in the page.');
}
$element = $this
->getSession()
->getPage()
->find('xpath', "//*[contains(@id, '{$panleRegionId}')]//*[text()='{$text}']");
if (!empty($element)) {
throw new Exception('The panle region "' . $panleRegion . '" dose have "' . $text . '" in it.');
}
}