diff --git a/src/components/Button/__tests__/Button.stories.tsx b/src/components/Button/__tests__/Button.stories.tsx index 3ad6341..730f953 100644 --- a/src/components/Button/__tests__/Button.stories.tsx +++ b/src/components/Button/__tests__/Button.stories.tsx @@ -34,6 +34,13 @@ Primary.args = { buttonType: ButtonType.Primary, } +export const PrimaryWithCustomClass = Template.bind({}) +PrimaryWithCustomClass.args = { + label: 'Primary Custom', + buttonType: ButtonType.Primary, + customClassName: 'custom-class-name', +} + export const Secondary = Template.bind({}) Secondary.args = { label: 'Secondary', diff --git a/src/components/Button/__tests__/Button.test.tsx b/src/components/Button/__tests__/Button.test.tsx index 30d2710..8be4eeb 100644 --- a/src/components/Button/__tests__/Button.test.tsx +++ b/src/components/Button/__tests__/Button.test.tsx @@ -6,6 +6,7 @@ import { SecondaryWithIcon, Alternate, IconRoundSecondary, + PrimaryWithCustomClass, } from './Button.stories' import { render } from '@testing-library/react' @@ -48,4 +49,8 @@ describe('Button constructor', (): void => { const { container } = render() expect(container).toMatchSnapshot() }) + test('should render custom css class name', (): void => { + const { container } = render() + expect(container).toMatchSnapshot() + }) }) diff --git a/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap b/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap index cd62fb5..816de6a 100644 --- a/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap +++ b/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap @@ -12,6 +12,18 @@ exports[`Button constructor should render alternate button 1`] = ` `; +exports[`Button constructor should render custom css class name 1`] = ` +
+ +
+`; + exports[`Button constructor should render icon round button 1`] = `