Created
October 21, 2024 09:27
-
-
Save arbaaz/90feab070502a735501c1ddc29a419c8 to your computer and use it in GitHub Desktop.
Data Test ID Explainer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const H1 = ({ children }) => { | |
return <h1>{children}</h1>; | |
}; | |
const Checkbox = ({ dataTestId }) => { | |
return <input type="checkbox" data-testid={dataTestId} />; | |
}; | |
export default function App() { | |
return ( | |
<div className="App"> | |
<h1 data-test-id="headline">Hello CodeSandbox</h1> | |
<h2>Start editing to see some magic happen!</h2> | |
<input data-testid="checkbox" type="checkbox" /> | |
<Checkbox /> | |
<H1 data-test-id="world">Hello world</H1> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment