public function ElementContext::assertBlockExists in Lightning Core 8
Same name and namespace in other branches
- 8.5 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockExists()
 - 8.2 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockExists()
 - 8.3 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockExists()
 - 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
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 450  
Class
- ElementContext
 - Contains miscellaneous step definitions for working with HTML elements.
 
Namespace
Acquia\LightningExtension\ContextCode
public function assertBlockExists($plugin_id) {
  return $this
    ->assertSession()
    ->elementExists('css', "[data-block-plugin-id='{$plugin_id}']");
}