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
{{ message }}
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.
For us, we can make Canner more reliable. For developers, they can also test their CMSes.
Proposed Solution
As mentioned by the article above, using data-* is better than className or id. Since antd is not fully supported data-* attributes, I think to add this attribute on our title HOC(which wraps every component) is OK, so whether the component is customized or imported from other UI frameworks, they will be wrapped in a <div data-testid="">.
DIscussion
The data-* attributes should be data-testid, data-e2e or others?
What should the value of the attributes be?
I think it can be data-testid=${refId.toString()}, so every component will have its own testId like posts/0/info/name.
Why
For us, we can make Canner more reliable. For developers, they can also test their CMSes.
Proposed Solution
As mentioned by the article above, using
data-*
is better thanclassName
orid
. Since antd is not fully supporteddata-*
attributes, I think to add this attribute on our title HOC(which wraps every component) is OK, so whether the component is customized or imported from other UI frameworks, they will be wrapped in a<div data-testid="">
.DIscussion
data-*
attributes should bedata-testid
,data-e2e
or others?data-testid=${refId.toString()}
, so every component will have its own testId likeposts/0/info/name
.cc @wwwy3y3, @chilijung, @FrankYang0529
The text was updated successfully, but these errors were encountered: