function CKEditor5Test::enableDisabledToolbarItem
Same name in other branches
- 10 core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php \Drupal\Tests\ckeditor5\FunctionalJavascript\CKEditor5Test::enableDisabledToolbarItem()
- 11.x core/modules/ckeditor5/tests/src/FunctionalJavascript/CKEditor5Test.php \Drupal\Tests\ckeditor5\FunctionalJavascript\CKEditor5Test::enableDisabledToolbarItem()
Enables a disabled CKEditor 5 toolbar item.
Parameters
string $toolbar_item_id: The toolbar item to enable.
1 call to CKEditor5Test::enableDisabledToolbarItem()
- CKEditor5Test::testActiveTabsMaintained in core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ CKEditor5Test.php - Confirms active tab status is intact after AJAX refresh.
File
-
core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ CKEditor5Test.php, line 358
Class
- CKEditor5Test
- Tests for CKEditor 5.
Namespace
Drupal\Tests\ckeditor5\FunctionalJavascriptCode
protected function enableDisabledToolbarItem(string $toolbar_item_id) : void {
$assert_session = $this->assertSession();
$assert_session->elementExists('css', ".ckeditor5-toolbar-disabled .ckeditor5-toolbar-item-{$toolbar_item_id}");
$this->triggerKeyUp(".ckeditor5-toolbar-item-{$toolbar_item_id}", 'ArrowDown');
$assert_session->elementNotExists('css', ".ckeditor5-toolbar-disabled .ckeditor5-toolbar-item-{$toolbar_item_id}");
$assert_session->elementExists('css', ".ckeditor5-toolbar-active .ckeditor5-toolbar-item-{$toolbar_item_id}");
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.