You are here

protected function MediaImageTest::clickPathLinkByTitleAttribute in Entity Embed 8

Clicks a link in the editor's path links with the given title text.

Parameters

string $text: The title attribute of the link to click.

Throws

\Behat\Mink\Exception\ElementNotFoundException

1 call to MediaImageTest::clickPathLinkByTitleAttribute()
MediaImageTest::testCkeditorWidgetHasEditableCaption in tests/src/FunctionalJavascript/MediaImageTest.php
Tests caption editing in the CKEditor widget.

File

tests/src/FunctionalJavascript/MediaImageTest.php, line 845

Class

MediaImageTest
Test Media Image specific functionality.

Namespace

Drupal\Tests\entity_embed\FunctionalJavascript

Code

protected function clickPathLinkByTitleAttribute($text) {
  $this
    ->getSession()
    ->switchToIFrame();
  $selector = '//span[@id="cke_1_path"]//a[@title="' . $text . '"]';
  $this
    ->assertSession()
    ->elementExists('xpath', $selector)
    ->click();
}