Skip to content

Commit

Permalink
feat(Checkbox): add testid tests for Checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
chentsulin committed Feb 26, 2019
1 parent 080be48 commit 3c1530a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/tailor-ui/src/Checkbox/__tests__/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ describe('Checkbox', () => {

expect(onChange).toBeCalled();
});

it('should support data-testid', () => {
const { getByTestId } = render(
<Checkbox checked data-testid="my-checkbox">
Checkbox
</Checkbox>
);

expect(getByTestId('my-checkbox')).toHaveAttribute('checked');
});
});

describe('Checkbox.Group', () => {
Expand Down

0 comments on commit 3c1530a

Please sign in to comment.