From 64ea6e51f68d140f888fb2fc9149c885f0a2afa6 Mon Sep 17 00:00:00 2001 From: thyhjwb6 <56078793+thyhjwb6@users.noreply.github.com> Date: Fri, 21 Jan 2022 15:45:34 +0000 Subject: [PATCH] fix(DismissibleBanner): Fix typo Dismissible was spelt incorrectly. --- ...ner.stories.tsx => DismissibleBanner.stories.tsx} | 0 ...bleBanner.test.tsx => DismissibleBanner.test.tsx} | 12 ++++++------ .../{DismissableBanner.tsx => DismissibleBanner.tsx} | 10 ++++++---- .../src/components/DismissibleBanner/index.ts | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) rename packages/react-component-library/src/components/DismissibleBanner/{DismissableBanner.stories.tsx => DismissibleBanner.stories.tsx} (100%) rename packages/react-component-library/src/components/DismissibleBanner/{DismissableBanner.test.tsx => DismissibleBanner.test.tsx} (88%) rename packages/react-component-library/src/components/DismissibleBanner/{DismissableBanner.tsx => DismissibleBanner.tsx} (89%) diff --git a/packages/react-component-library/src/components/DismissibleBanner/DismissableBanner.stories.tsx b/packages/react-component-library/src/components/DismissibleBanner/DismissibleBanner.stories.tsx similarity index 100% rename from packages/react-component-library/src/components/DismissibleBanner/DismissableBanner.stories.tsx rename to packages/react-component-library/src/components/DismissibleBanner/DismissibleBanner.stories.tsx diff --git a/packages/react-component-library/src/components/DismissibleBanner/DismissableBanner.test.tsx b/packages/react-component-library/src/components/DismissibleBanner/DismissibleBanner.test.tsx similarity index 88% rename from packages/react-component-library/src/components/DismissibleBanner/DismissableBanner.test.tsx rename to packages/react-component-library/src/components/DismissibleBanner/DismissibleBanner.test.tsx index e6596eddf6..fa32de3691 100644 --- a/packages/react-component-library/src/components/DismissibleBanner/DismissableBanner.test.tsx +++ b/packages/react-component-library/src/components/DismissibleBanner/DismissibleBanner.test.tsx @@ -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') }) @@ -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() }) @@ -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) }) @@ -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' ) diff --git a/packages/react-component-library/src/components/DismissibleBanner/DismissableBanner.tsx b/packages/react-component-library/src/components/DismissibleBanner/DismissibleBanner.tsx similarity index 89% rename from packages/react-component-library/src/components/DismissibleBanner/DismissableBanner.tsx rename to packages/react-component-library/src/components/DismissibleBanner/DismissibleBanner.tsx index 83567d4224..4881ac3e14 100644 --- a/packages/react-component-library/src/components/DismissibleBanner/DismissableBanner.tsx +++ b/packages/react-component-library/src/components/DismissibleBanner/DismissibleBanner.tsx @@ -72,14 +72,14 @@ export const DismissibleBanner: React.FC = ({ } return ( - + {title && ( <> - + {title} - + {children} @@ -89,13 +89,15 @@ export const DismissibleBanner: React.FC = ({ {hasCheckbox && ( setCanShowAgain(!canShowAgain)} /> )} {!hasCheckbox && }