You are here

protected function FeatureContext::getWysiwygInstance in Bear 7

6 calls to FeatureContext::getWysiwygInstance()
FeatureContext::assertContentInWysiwygEditor in tests/features/bootstrap/FeatureContext.php
@Then /^I should see "([^"]*)" in the "([^"]*)" WYSIWYG editor$/
FeatureContext::assertContentNotInWysiwygEditor in tests/features/bootstrap/FeatureContext.php
@Then /^I should not see "([^"]*)" in the "([^"]*)" WYSIWYG editor$/
FeatureContext::iClickTheButtonInTheWysiwygEditor in tests/features/bootstrap/FeatureContext.php
@When /^I click the "([^"]*)" button in the "([^"]*)" WYSIWYG editor$/
FeatureContext::iExpandTheToolbarInTheWysiwygEditor in tests/features/bootstrap/FeatureContext.php
@When /^I expand the toolbar in the "([^"]*)" WYSIWYG editor$/
FeatureContext::iFillInTheWysiwygEditor in tests/features/bootstrap/FeatureContext.php
@When /^I fill in the "([^"]*)" WYSIWYG editor with "([^"]*)"$/

... See full list

File

tests/features/bootstrap/FeatureContext.php, line 220

Class

FeatureContext
Defines application features from the specific context.

Code

protected function getWysiwygInstance($instanceId) {
  $instance = "Drupal.wysiwyg.instances['{$instanceId}']";
  if (!$this
    ->getSession()
    ->evaluateScript("return !!{$instance}")) {
    throw new \Exception(sprintf('The editor "%s" was not found on the page %s', $instanceId, $this
      ->getSession()
      ->getCurrentUrl()));
  }
  return $instance;
}