This commit is contained in:
@@ -21,6 +21,12 @@ describe('Button', () => {
|
||||
expect(screen.getByRole('button', { name: 'Details' })).toHaveClass('btn-secondary');
|
||||
});
|
||||
|
||||
it('uses explicit variant when provided', () => {
|
||||
render(<Button label="Danger" type="outlined" variant="important" />);
|
||||
|
||||
expect(screen.getByRole('button', { name: 'Danger' })).toHaveClass('btn-important');
|
||||
});
|
||||
|
||||
it('renders icon-only button and custom aria label', () => {
|
||||
render(<Button type="solid" icon={HomeIcon} ariaLabel="Open home" />);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user