You are here

protected function CKEditorIntegrationTest::assertContextMenuItemExists in Drupal 9

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

Asserts that a context menu item exists by aria-label attribute.

Parameters

string $label: The `aria-label` attribute value of the context menu item.

1 call to CKEditorIntegrationTest::assertContextMenuItemExists()
CKEditorIntegrationTest::testLinkability in core/modules/media/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
Tests linkability of the CKEditor widget.

File

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

Class

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

Namespace

Drupal\Tests\media\FunctionalJavascript

Code

protected function assertContextMenuItemExists($label) {
  $this
    ->assertSession()
    ->elementExists('xpath', '//a[@aria-label="' . $label . '"]');
}