React HeaderMenu does not render data-* attributes #9134
Labels
good first issue 👋
Used by GitHub to elevate contribution opportunities
severity: 3
https://ibm.biz/carbon-severity
type: bug 🐛
Brief description
When integrating Carbon with automated UI testing tools such as Cypress or Selenium, the recommended approach is to use
data-*
attributes such asdata-cy
to allow the UI testing framework to select the correct element for automation. The React<HeaderMenu>
component does not correctly renderdata-*
attributes.By contrast other react components (such as
<Header>
) do correctly propagatedata-*
attributes.What package(s) are you using?
carbon-components
carbon-components-react
Detailed description
Using the following markup
The expectation is that the rendered HTML for the
<HeaderMenu>
will contain the attributedata-cy="entity"
; instead the markup is missing.Yes - HeaderMenu. I can see the feature working for other components (such as Header), but I have not made an explicit survey of the full toolkit.
See above.
N/A - issue is visible by inspecting the raw HTML.
GHHS SPM AI Sept 2021.
Steps to reproduce the issue
See above.
Issue is visible by inspecting the markup generated in this code sandbox:
https://codesandbox.io/s/vibrant-gareth-m5q2g?file=/src/index.js
The text was updated successfully, but these errors were encountered: