public function FeatureContext::iSelectPostVisibility in Open Social 10.2.x
Same name and namespace in other branches
- 8.9 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iSelectPostVisibility()
- 8.3 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iSelectPostVisibility()
- 8.4 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iSelectPostVisibility()
- 8.5 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iSelectPostVisibility()
- 8.6 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iSelectPostVisibility()
- 8.7 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iSelectPostVisibility()
- 8.8 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iSelectPostVisibility()
- 10.3.x tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iSelectPostVisibility()
- 10.0.x tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iSelectPostVisibility()
- 10.1.x tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iSelectPostVisibility()
@When I select post visibility :visibility
File
- tests/
behat/ features/ bootstrap/ FeatureContext.php, line 219
Class
- FeatureContext
- Defines application features from the specific context.
Namespace
Drupal\social\BehatCode
public function iSelectPostVisibility($visibility) {
// First make post visibility setting visible.
$this
->iClickPostVisibilityDropdown();
// Click the label of the readio button with the visibility. The radio
// button itself can't be clicked because it's invisible.
$page = $this
->getSession()
->getPage();
$field = $page
->findField($visibility);
if (null === $field) {
throw new ElementNotFoundException($this
->getDriver(), 'form field', 'id|name|label|value|placeholder', $visibility);
}
$field
->getParent()
->click();
}