Skip to content
Snippets Groups Projects

Move label to FieldConfigEditForm

Open Srishti Bankar requested to merge issue/drupal-3397711:3397711-move-label-and into 11.x
Compare and
17 files
+ 222
272
Compare changes
  • Side-by-side
  • Inline
Files
17
@@ -158,11 +158,7 @@ public function testCommentFieldCreate() {
];
$this->drupalGet('admin/config/people/accounts/fields/add-field');
$this->submitForm($edit, 'Continue');
$edit = [
'label' => 'User comment',
'field_name' => 'user_comment',
];
$this->submitForm($edit, 'Continue');
$field_name = \Drupal::service('tempstore.private')->get('field_ui')->get('temp_name');
// Try to save the comment field without selecting a comment type.
$edit = [];
@@ -183,7 +179,7 @@ public function testCommentFieldCreate() {
$edit = [
'field_storage[subform][settings][comment_type]' => 'user_comment_type',
];
$this->drupalGet('admin/config/people/accounts/add-field/user/field_user_comment');
$this->drupalGet('admin/config/people/accounts/add-field/user/' . $field_name);
$this->submitForm($edit, 'Update settings');
// We shouldn't get an error message.
$this->assertSession()->pageTextNotContains('The submitted value in the Comment type element is not allowed.');
@@ -191,9 +187,11 @@ public function testCommentFieldCreate() {
// Try to save the comment field with "Comments per page"
// setting value as zero.
$edit = [
'label' => 'User comment',
'field_name' => 'user_comment',
'settings[per_page]' => 0,
];
$this->drupalGet('admin/config/people/accounts/add-field/user/field_user_comment');
$this->drupalGet('admin/config/people/accounts/add-field/user/' . $field_name);
$this->submitForm($edit, 'Save settings');
$this->assertSession()->statusMessageContains('Saved User comment configuration.', 'status');
}
Loading