public function ElementContext::assertBlockHasContextual in Lightning Core 8.2
Same name and namespace in other branches
- 8.5 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockHasContextual()
- 8 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockHasContextual()
- 8.3 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockHasContextual()
- 8.4 tests/contexts/ElementContext.behat.inc \Acquia\LightningExtension\Context\ElementContext::assertBlockHasContextual()
Asserts that a block has contextual link(s).
@Then the :plugin_id block should have contextual links @Then the :plugin_id block should have a :link_class contextual link @Then I should see a :plugin_id block with contextual links @Then I should see a :plugin_id block with a :link_class contextual link
Parameters
string $plugin_id: The block plugin ID.
string $link_class: (optional) The CSS class of a specific contextual link.
See also
::assertContextualLinks()
::assertContextualLink()
::assertBlockExists()
File
- tests/
contexts/ ElementContext.behat.inc, line 534
Class
- ElementContext
- Contains miscellaneous step definitions for working with HTML elements.
Namespace
Acquia\LightningExtension\ContextCode
public function assertBlockHasContextual($plugin_id, $link_class = NULL) {
$element = $this
->assertBlockExists($plugin_id);
return $link_class ? $this
->assertContextualLink($element, $link_class) : $this
->assertContextualLinks($element);
}