Skip to content
Snippets Groups Projects
Commit 73306d92 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2782967 by mikeker: FormTest::testFieldFormUnlimitedRequired claims to...

Issue #2782967 by mikeker: FormTest::testFieldFormUnlimitedRequired claims to test for visually-hidden, but doesn't
parent 42828511
No related branches found
No related tags found
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
...@@ -334,7 +334,7 @@ public function testFieldFormUnlimitedRequired() { ...@@ -334,7 +334,7 @@ public function testFieldFormUnlimitedRequired() {
$this->assertTrue(isset($element[0]), 'Required symbol added field label.'); $this->assertTrue(isset($element[0]), 'Required symbol added field label.');
// Check that the label of the field input is visually hidden and contains // Check that the label of the field input is visually hidden and contains
// the field title and an indication of the delta for a11y. // the field title and an indication of the delta for a11y.
$element = $this->xpath('//label[@for=:for and contains(@class, "js-form-required") and contains(text(), :value)]', array(':for' => 'edit-field-unlimited-0-value', ':value' => $this->field['label'] . ' (value 1)')); $element = $this->xpath('//label[@for=:for and contains(@class, "visually-hidden") and contains(text(), :value)]', array(':for' => 'edit-field-unlimited-0-value', ':value' => $this->field['label'] . ' (value 1)'));
$this->assertTrue(isset($element[0]), 'Required symbol not added for field input.'); $this->assertTrue(isset($element[0]), 'Required symbol not added for field input.');
} }
......
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