Skip to content
Snippets Groups Projects
Commit aca1ec38 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2321621 by swentel: Fixed Use signatures checkbox on User config page doesn't appear.

parent 3b8307bc
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -445,6 +445,9 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
$this->config('system.site')
->set('mail_notification', $form_state->getValue('mail_notification_address'))
->save();
// Clear field definition cache for signatures.
\Drupal::entityManager()->clearCachedFieldDefinitions();
}
}
......@@ -21,7 +21,7 @@ class UserSignatureTest extends WebTestBase {
*
* @var array
*/
public static $modules = array('node', 'comment');
public static $modules = array('node', 'comment', 'field_ui');
protected function setUp() {
parent::setUp();
......@@ -62,7 +62,7 @@ protected function setUp() {
// Create regular and administrative users.
$this->web_user = $this->drupalCreateUser(array('post comments'));
$admin_permissions = array('post comments', 'administer comments');
$admin_permissions = array('post comments', 'administer comments', 'administer user form display', 'administer account settings');
foreach (filter_formats() as $format) {
if ($permission = $format->getPermissionName()) {
$admin_permissions[] = $permission;
......@@ -129,5 +129,14 @@ function testUserSignature() {
// Verify that the user signature's text format's cache tag is present.
$this->drupalGet('node/' . $node->id());
$this->assertTrue(in_array('filter_format:filtered_html_format', explode(' ', $this->drupalGetHeader('X-Drupal-Cache-Tags'))));
// Verify the signature field is available on Manage form display page.
\Drupal::config('user.settings')->set('signatures', 0)->save();
\Drupal::entityManager()->clearCachedFieldDefinitions();
$this->drupalGet('admin/config/people/accounts/form-display');
$this->assertNoText('Signature settings');
$this->drupalPostForm('admin/config/people/accounts', array('user_signatures' => TRUE), t('Save configuration'));
$this->drupalGet('admin/config/people/accounts/form-display');
$this->assertText('Signature settings');
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment