You are here

protected function ElementContext::assertContextualLink in Lightning Core 8

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

Asserts that an element has a specific contextual link.

Parameters

\Behat\Mink\Element\ElementInterface $element: The element which is expectd to contain the contextual link.

(string) $link_class: The CSS class of the contextual link.

Return value

ElementInterface The contextual link.

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

File

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

Class

ElementContext
Contains miscellaneous step definitions for working with HTML elements.

Namespace

Acquia\LightningExtension\Context

Code

protected function assertContextualLink(ElementInterface $element, $link_class) {
  return $this
    ->assertSession()
    ->elementExists('css', "li.{$link_class}", $this
    ->assertContextualLinks($element));
}