You are here

public function ElementContext::assertBlockExists in Lightning Core 8.5

Same name and namespace in other branches
  1. 8 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockExists()
  2. 8.2 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockExists()
  3. 8.3 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockExists()
  4. 8.4 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockExists()

Asserts that a block with a specific plugin ID is present.

@Then I should see a :plugin_id block

Parameters

string $plugin_id: The block plugin ID.

Return value

\Behat\Mink\Element\ElementInterface The block element.

1 call to ElementContext::assertBlockExists()
ElementContext::assertBlockHasContextual in tests/contexts/ElementContext.behat.inc
Asserts that a block has contextual link(s).

File

tests/contexts/ElementContext.behat.inc, line 471

Class

ElementContext
Contains miscellaneous step definitions for working with HTML elements.

Namespace

Acquia\LightningExtension\Context

Code

public function assertBlockExists($plugin_id) {
  return $this
    ->assertSession()
    ->elementExists('css', "[data-block-plugin-id='{$plugin_id}']");
}