Skip to content

Commit

Permalink
fix(DismissibleBanner): Fix typo
Browse files Browse the repository at this point in the history
Dismissible was spelt incorrectly.
  • Loading branch information
thyhjwb6 committed Jan 25, 2022
1 parent de010fc commit 64ea6e5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ describe('DismissibleBanner', () => {
})

it('should render the title', () => {
expect(wrapper.getByTestId('dimissablebanner-title')).toHaveTextContent(
expect(wrapper.getByTestId('dimissiblebanner-title')).toHaveTextContent(
'title'
)
})

it('should render the content', () => {
expect(
wrapper.getByTestId('dimissablebanner-description')
wrapper.getByTestId('dimissiblebanner-description')
).toHaveTextContent('content')
})

Expand All @@ -46,7 +46,7 @@ describe('DismissibleBanner', () => {

describe("when the `Don't show this again` checkbox is clicked before the component is dismissed", () => {
beforeEach(() => {
wrapper.getByTestId('checkbox').click()
wrapper.getByTestId('dimissiblebanner-dontshow').click()
wrapper.getByText('Dismiss').click()
})

Expand All @@ -68,12 +68,12 @@ describe('DismissibleBanner', () => {
})

it('should render the title', () => {
expect(wrapper.queryAllByTestId('dimissablebanner-title')).toHaveLength(0)
expect(wrapper.queryAllByTestId('dimissiblebanner-title')).toHaveLength(0)
})

it('should render the content', () => {
expect(
wrapper.queryAllByTestId('dimissablebanner-description')
wrapper.queryAllByTestId('dimissiblebanner-description')
).toHaveLength(0)
})

Expand Down Expand Up @@ -112,7 +112,7 @@ describe('DismissibleBanner', () => {
})

it('should spread arbitrary props', () => {
expect(wrapper.getByTestId('dimissablebanner-wrapper')).toHaveAttribute(
expect(wrapper.getByTestId('dimissiblebanner-wrapper')).toHaveAttribute(
'data-arbitrary',
'arbitrary'
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ export const DismissibleBanner: React.FC<DismissibleBannerProps> = ({
}

return (
<StyledDismissibleBanner data-testid="dimissablebanner-wrapper" {...rest}>
<StyledDismissibleBanner data-testid="dimissiblebanner-wrapper" {...rest}>
<StyledContent>
{title && (
<>
<StyledTitle data-testid="dimissablebanner-title">
<StyledTitle data-testid="dimissiblebanner-title">
{title}
</StyledTitle>
<StyledDescription data-testid="dimissablebanner-description">
<StyledDescription data-testid="dimissiblebanner-description">
{children}
</StyledDescription>
</>
Expand All @@ -89,13 +89,15 @@ export const DismissibleBanner: React.FC<DismissibleBannerProps> = ({
<StyledFooter>
{hasCheckbox && (
<StyledDontShow
data-testid="dimissiblebanner-dontshow"
label="Don't show this again"
name="dimissablebanner-dontshow"
name="dimissiblebanner-dontshow"
onChange={() => setCanShowAgain(!canShowAgain)}
/>
)}
{!hasCheckbox && <span />}
<Button
data-testid="dimissiblebanner-dismiss"
onClick={onButtonClick}
size={BUTTON_SIZE.SMALL}
variant={BUTTON_VARIANT.SECONDARY}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './DismissableBanner'
export * from './DismissibleBanner'

0 comments on commit 64ea6e5

Please sign in to comment.