// The heading plugin config form should be present.
$assert_session->
elementExists('css', '[data-drupal-selector="edit-editor-settings-plugins-ckeditor5-heading"]'
);
// Remove the heading plugin from the toolbar.
$this->
triggerKeyUp('.ckeditor5-toolbar-item-heading', 'ArrowUp'
);
$assert_session->
assertWaitOnAjaxRequest();
// The heading plugin config form should no longer be present.
$assert_session->
elementNotExists('css', '[data-drupal-selector="edit-editor-settings-plugins-ckeditor5-heading"]'
);
// The plugin settings wrapper should still be present, but empty.
$assert_session->
elementExists('css', '#plugin-settings-wrapper'
);
$assert_session->
elementNotContains('css', '#plugin-settings-wrapper', '<div'
);
// Enable the source plugin.
$this->
triggerKeyUp('.ckeditor5-toolbar-item-sourceEditing', 'ArrowDown'
);
$assert_session->
assertWaitOnAjaxRequest();
// The source plugin config form should be present.
$assert_session->
elementExists('css', '[data-drupal-selector="edit-editor-settings-plugins-ckeditor5-sourceediting"]'
);
// The filter-dependent configurable plugin should not be present.
$assert_session->
elementNotExists('css', '[data-drupal-selector="edit-editor-settings-plugins-media-media"]'
);