You are here

public function QuickEditContext::assertBlock in Lightning Workflow 8.2

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

Asserts that a block exists with a Quick Edit contextual link.

@Then I should see a :plugin block with Quick Edit

Parameters

string $plugin: The block plugin ID.

File

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

Class

QuickEditContext
Contains step definitions for interacting with Quick Edit.

Namespace

Acquia\LightningExtension\Context

Code

public function assertBlock($plugin) {
  $assert = $this
    ->assertSession();
  $block = $assert
    ->elementExists('css', 'div[data-block-plugin-id="' . $plugin . '"]');
  $links = $assert
    ->elementExists('css', 'ul.contextual-links', $block);
  $assert
    ->elementExists('named', [
    'link',
    'Quick edit',
  ], $links);
}