You are here

public function QuickEditContext::assertEnabled in Lightning Workflow 8

Same name and namespace in other branches
  1. 8.2 tests/contexts/QuickEditContext.behat.inc \Acquia\LightningExtension\Context\QuickEditContext::assertEnabled()

Asserts that Quick Edit is enabled for at least one entity on the page.

@Then Quick Edit should be enabled

Throws

\Behat\Mink\Exception\ExpectationException if Quick Edit is disabled on the current page.

File

tests/contexts/QuickEditContext.behat.inc, line 21

Class

QuickEditContext
Contains step definitions for interacting with Quick Edit.

Namespace

Acquia\LightningExtension\Context

Code

public function assertEnabled() {
  $session = $this
    ->getSession();
  $victory = $session
    ->wait(10000, 'Drupal.quickedit.collections.entities.length > 0');
  if (empty($victory)) {
    throw new ExpectationException('Expected Quick Edit to be enabled, but it is not.', $session
      ->getDriver());
  }
}