Skip to content

Commit

Permalink
tests(Button.tsx): add data-testid
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Damaceno Santos committed Aug 17, 2023
1 parent f1363ca commit 7a7d6a2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ui/atoms/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ const Button = ({

const Element = ({ children, ...props }: any) =>
as === "a" ? (
<a {...props}>{children}</a>
<a {...props} data-testid="link">
{children}
</a>
) : (
<button {...props}>{children}</button>
<button {...props} data-testid="button">
{children}
</button>
);

return (
Expand Down

0 comments on commit 7a7d6a2

Please sign in to comment.