You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today
We can activate this rule, and confiure if warn or error
Proposal
It would be nice to be able to add an optinal second argument to the rule, specifying the attribute name.
It could be :
"cypress/require-data-selectors": {"warn","data-qa"}
Or :
"cypress/require-data-selectors": ["warn","attr-qa"]
This would have the following behaviour
If not specified, today behavoiur (data-* is ok, anything else is KO)
If specified it is used as it (selector should start with [parameter, such as [data-qa *= or [attr-id-test $= or ...)
This would allow team to check it's not based on [data-ga for ex, but also to allow for people using dedicated attributes, but not following w3c (attr-* instead of data-*) to still take advantage of this rule.
The text was updated successfully, but these errors were encountered:
Today
We can activate this rule, and confiure if warn or error
Proposal
It would be nice to be able to add an optinal second argument to the rule, specifying the attribute name.
It could be :
"cypress/require-data-selectors": {"warn","data-qa"}
Or :
"cypress/require-data-selectors": ["warn","attr-qa"]
This would have the following behaviour
This would allow team to check it's not based on [data-ga for ex, but also to allow for people using dedicated attributes, but not following w3c (attr-* instead of data-*) to still take advantage of this rule.
The text was updated successfully, but these errors were encountered: