udpated button snapshots
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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(<Alternate {...Alternate.args} />)
|
||||
expect(container).toMatchSnapshot()
|
||||
})
|
||||
test('should render custom css class name', (): void => {
|
||||
const { container } = render(<Primary {...PrimaryWithCustomClass.args} />)
|
||||
expect(container).toMatchSnapshot()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -12,6 +12,18 @@ exports[`Button constructor should render alternate button 1`] = `
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Button constructor should render custom css class name 1`] = `
|
||||
<div>
|
||||
<button
|
||||
class="n-button with-label custom-class-name Primary"
|
||||
>
|
||||
<span>
|
||||
Primary Custom
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Button constructor should render icon round button 1`] = `
|
||||
<div>
|
||||
<button
|
||||
|
||||
Reference in New Issue
Block a user