Skip to main content
All components pass through props to the top-level element. Add data-testid or other test attributes for use with testing tools like Playwright, Cypress, or Selenium:
<Button data-testid="submit-btn" onClick={handleSubmit}>
  Submit
</Button>

<TextField data-testid="email-input" data-cy="email-field" />
For reusable test IDs, add them in the component’s wrapper index.tsx so they’re included by default.
Last modified on June 19, 2026