Follow up to #2702233: [backport] Add JavaScript tests for Form API #states: required, visible, invisible, expanded, checked, unchecked to track which states are covered
The following states may be applied to an element with the issue that provides the tests
- enabled
- disabled
- required #2702233: [backport] Add JavaScript tests for Form API #states: required, visible, invisible, expanded, checked, unchecked
- optional
- visible: #2702233: [backport] Add JavaScript tests for Form API #states: required, visible, invisible, expanded, checked, unchecked
- invisible: #2702233: [backport] Add JavaScript tests for Form API #states: required, visible, invisible, expanded, checked, unchecked
- checked: #2702233: [backport] Add JavaScript tests for Form API #states: required, visible, invisible, expanded, checked, unchecked
- unchecked: #2702233: [backport] Add JavaScript tests for Form API #states: required, visible, invisible, expanded, checked, unchecked
- expanded: #2702233: [backport] Add JavaScript tests for Form API #states: required, visible, invisible, expanded, checked, unchecked
- collapsed
- relevant
- irrelevant
- valid
- invalid
- touched
- untouched
- readwrite
- readonly: #2866383: Readonly doesn't work on #States
here are currently a number of issues regarding states that are blocked on the core gate for testing and could benefit greatly from the tests.
#2871794: #states attribute does not work for managed_file
#2700667: Notice: Undefined index: #type in Drupal\Core\Form\FormHelper::processStates()
#2226405: FAPI #states: dependent element added via AJAX initializes incorrectly if dependee has been initialized earlier
#1149078: States API doesn't work with multiple select fields
#2847425: #states not affecting visibility/requirement of managed_file
#736182: Match States API required fields theming with Forms API
#994360: #states cannot check/uncheck checkboxes elements
#2820586: #states not applied to link elements