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
We should be able to just pass data-testid, which is the common convention (along with permutations data-testId, data-testID and data-testiD which are all valid attributes when using ...byTestId() in testing-library)
dataTestId is unintuitive and some components do not even expose it as an available prop (for example Button)
dataTestPrefixId is even worse, since the order of the words does not even make sense (it should be dataTestIdPrefix)
Since test-id prefixes are not a convention (so there is no reason to use something like data-testid-prefix) I simply sugggest we shorten the prop name to something like testIdPrefix (drop the data part so that one does not assume that since a dataTestIdPrefix exists a dataTestId exists as well)
The text was updated successfully, but these errors were encountered:
We should be able to just pass
data-testid
, which is the common convention (along with permutationsdata-testId
,data-testID
anddata-testiD
which are all valid attributes when using...byTestId()
intesting-library
)dataTestId
is unintuitive and some components do not even expose it as an available prop (for exampleButton
)dataTestPrefixId
is even worse, since the order of the words does not even make sense (it should bedataTestIdPrefix
)Since test-id prefixes are not a convention (so there is no reason to use something like
data-testid-prefix
) I simply sugggest we shorten the prop name to something liketestIdPrefix
(drop thedata
part so that one does not assume that since adataTestIdPrefix
exists adataTestId
exists as well)The text was updated successfully, but these errors were encountered: