You are here

public function FeatureContext::iClickPostVisibilityDropdown in Open Social 8.4

Same name and namespace in other branches
  1. 8.9 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iClickPostVisibilityDropdown()
  2. 8.3 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iClickPostVisibilityDropdown()
  3. 8.5 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iClickPostVisibilityDropdown()
  4. 8.6 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iClickPostVisibilityDropdown()
  5. 8.7 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iClickPostVisibilityDropdown()
  6. 8.8 tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iClickPostVisibilityDropdown()
  7. 10.3.x tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iClickPostVisibilityDropdown()
  8. 10.0.x tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iClickPostVisibilityDropdown()
  9. 10.1.x tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iClickPostVisibilityDropdown()
  10. 10.2.x tests/behat/features/bootstrap/FeatureContext.php \Drupal\social\Behat\FeatureContext::iClickPostVisibilityDropdown()

@When /^I click the post visibility dropdown/

1 call to FeatureContext::iClickPostVisibilityDropdown()
FeatureContext::iSelectPostVisibility in tests/behat/features/bootstrap/FeatureContext.php
@When I select post visibility :visibility

File

tests/behat/features/bootstrap/FeatureContext.php, line 342

Class

FeatureContext
Defines application features from the specific context.

Namespace

Drupal\social\Behat

Code

public function iClickPostVisibilityDropdown() {
  $locator = 'button#post-visibility';
  $session = $this
    ->getSession();
  $element = $session
    ->getPage()
    ->find('css', $locator);
  if ($element === NULL) {
    throw new \InvalidArgumentException(sprintf('Could not evaluate CSS selector: "%s"', $locator));
  }

  // Now click the element.
  $element
    ->click();
}