function CKEditor5TestTrait::assertEditorButtonDisabled
Same name in other branches
- 10 core/modules/ckeditor5/tests/src/Traits/CKEditor5TestTrait.php \Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait::assertEditorButtonDisabled()
- 11.x core/modules/ckeditor5/tests/src/Traits/CKEditor5TestTrait.php \Drupal\Tests\ckeditor5\Traits\CKEditor5TestTrait::assertEditorButtonDisabled()
Asserts a CKEditor button is disabled.
Parameters
string $name: The name of the button, such as `drupallink`, `source`, etc.
1 call to CKEditor5TestTrait::assertEditorButtonDisabled()
- MediaLibraryTest::testButton in core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ MediaLibraryTest.php - Tests using drupalMedia button to embed media into CKEditor 5.
File
-
core/
modules/ ckeditor5/ tests/ src/ Traits/ CKEditor5TestTrait.php, line 86
Class
- CKEditor5TestTrait
- Provides methods to test CKEditor 5.
Namespace
Drupal\Tests\ckeditor5\TraitsCode
protected function assertEditorButtonDisabled($name) {
$button = $this->getEditorButton($name);
$this->assertTrue($button->hasAttribute('aria-disabled'));
$this->assertTrue($button->hasClass('ck-disabled'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.