You are here

protected function CKEditorIntegrationTest::clickPathLinkByTitleAttribute in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php \Drupal\Tests\media\FunctionalJavascript\CKEditorIntegrationTest::clickPathLinkByTitleAttribute()

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.

1 call to CKEditorIntegrationTest::clickPathLinkByTitleAttribute()
CKEditorIntegrationTest::testEditableCaption in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Tests caption editing in the CKEditor widget.

File

core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php, line 1527

Class

CKEditorIntegrationTest
@coversDefaultClass \Drupal\media\Plugin\CKEditorPlugin\DrupalMedia @group media

Namespace

Drupal\Tests\media\FunctionalJavascript

Code

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