Skip to content
Snippets Groups Projects
Verified Commit 8915191b 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
parent ad5ff3f6
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment