Verified Commit 4465497e authored by Alex Pott's avatar Alex Pott
Browse files

Issue #1645328 by Liam Morland, darvanen, shravan sonkar, andregp,...

Issue #1645328 by Liam Morland, darvanen, shravan sonkar, andregp, mandar.harkare, jhedstrom, sun: Add test to ensure fieldset allows any non-empty-string #title

(cherry picked from commit 8915191b)
parent ed8b7ae5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -37,6 +37,10 @@ public function buildForm(array $form, FormStateInterface $form_state, $required
      '#type' => 'textfield',
      '#title' => 'Nest in container element',
    ];
    $form['fieldset_zero'] = [
      '#type' => 'fieldset',
      '#title' => 0,
    ];
    return $form;
  }

+1 −0
Original line number Diff line number Diff line
@@ -144,6 +144,7 @@ public function testGroupElements() {
    $this->assertSession()->elementsCount('xpath', '//div[@id="edit-container"]//div[@class="details-wrapper"]//label', 1);
    $this->drupalGet('form-test/group-fieldset');
    $this->assertSession()->elementsCount('xpath', '//fieldset[@id="edit-fieldset"]//div[@id="edit-meta"]//label', 1);
    $this->assertSession()->elementTextEquals('xpath', '//fieldset[@id="edit-fieldset-zero"]//legend', '0');
    $this->drupalGet('form-test/group-vertical-tabs');
    $this->assertSession()->elementsCount('xpath', '//div[@data-vertical-tabs-panes]//details[@id="edit-meta"]//label', 1);
    $this->assertSession()->elementsCount('xpath', '//div[@data-vertical-tabs-panes]//details[@id="edit-meta-2"]//label', 1);