public function ElementContext::assertBlockExists in Lightning Core 8.4
Same name and namespace in other branches
- 8.5 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockExists()
- 8 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()
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\ContextCode
public function assertBlockExists($plugin_id) {
return $this
->assertSession()
->elementExists('css', "[data-block-plugin-id='{$plugin_id}']");
}