You are here

public function ModerationContext::assertQuickEditEnabled in Lightning Workflow 8.3

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/ModerationContext.behat.inc, line 193

Class

ModerationContext
Contains miscellaneous step definitions for testing moderation UIs.

Namespace

Acquia\LightningExtension\Context

Code

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