udpated button snapshots
This commit is contained in:
@@ -34,6 +34,13 @@ Primary.args = {
|
|||||||
buttonType: ButtonType.Primary,
|
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({})
|
export const Secondary = Template.bind({})
|
||||||
Secondary.args = {
|
Secondary.args = {
|
||||||
label: 'Secondary',
|
label: 'Secondary',
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import {
|
|||||||
SecondaryWithIcon,
|
SecondaryWithIcon,
|
||||||
Alternate,
|
Alternate,
|
||||||
IconRoundSecondary,
|
IconRoundSecondary,
|
||||||
|
PrimaryWithCustomClass,
|
||||||
} from './Button.stories'
|
} from './Button.stories'
|
||||||
import { render } from '@testing-library/react'
|
import { render } from '@testing-library/react'
|
||||||
|
|
||||||
@@ -48,4 +49,8 @@ describe('Button constructor', (): void => {
|
|||||||
const { container } = render(<Alternate {...Alternate.args} />)
|
const { container } = render(<Alternate {...Alternate.args} />)
|
||||||
expect(container).toMatchSnapshot()
|
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>
|
</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`] = `
|
exports[`Button constructor should render icon round button 1`] = `
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
|
|||||||
Reference in New Issue
Block a user