Problem/Motivation

The Form API #states have been around since D7, and pre-date our functional javascript testing. This don't have any test coverage yet.

Proposed resolution

Write tests for each of the JS states behaviour.

Examples of what could be tested:

  • The expected values of attributes which change
  • The syntax of various aria-* properties. Notably, the boolean ARIA properties use the words "true" and "false" as their values, which is different to the HTML boolean attribute syntax.

Remaining tasks

?

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

andrewmacpherson created an issue. See original summary.

andrewmacpherson’s picture

Issue summary: View changes
Related issues: +#3029614: Fix aria-required in states.js

AFAIK there isn't any test coverage of FAPI #states yet - my first-pass survey amounted to typing "state" in the filter field at admin/config/development/testing.

Examples of what could be tested:

  • The expected values of attributes which change
  • The syntax of various aria-* properties. Notably, the boolean ARIA properties use the words "true" and "false" as their values, which is different to the HTML boolean attribute syntax. I filed this issue as a follow-up to #3029614: Fix aria-required in states.js, where the incorrect aria-required="aria-required" was discovered.
idebr’s picture

andrewmacpherson’s picture

Status: Active » Closed (duplicate)

Yes, thanks. Let's close this one quickly, the other issue has child issues with patches already.