diff --git a/components/src/molecules/InfoScreen/__tests__/InfoScreen.test.tsx b/components/src/molecules/InfoScreen/__tests__/InfoScreen.test.tsx index d248ca2a669..7a48299e7dc 100644 --- a/components/src/molecules/InfoScreen/__tests__/InfoScreen.test.tsx +++ b/components/src/molecules/InfoScreen/__tests__/InfoScreen.test.tsx @@ -37,5 +37,21 @@ describe('InfoScreen', () => { expect(screen.getByLabelText('alert')).toHaveStyle( `color: ${COLORS.grey60}` ) + expect(screen.getByTestId('InfoScreen')).toHaveStyle(`height: 100%`) + }) + + it('should render set height, subContent and backgroundColor', () => { + props = { + ...props, + subContent: 'mock sub content', + backgroundColor: COLORS.blue50, + height: '10rem', + } + render(props) + screen.getByText('mock sub content') + expect(screen.getByTestId('InfoScreen')).toHaveStyle( + `background-color: ${COLORS.blue50}` + ) + expect(screen.getByTestId('InfoScreen')).toHaveStyle(`height: 10rem`) }) }) diff --git a/components/src/molecules/InfoScreen/index.tsx b/components/src/molecules/InfoScreen/index.tsx index a70e2c409d7..d92f7cd64e7 100644 --- a/components/src/molecules/InfoScreen/index.tsx +++ b/components/src/molecules/InfoScreen/index.tsx @@ -16,7 +16,7 @@ export function InfoScreen({ content, subContent, backgroundColor = COLORS.grey30, - height, + height = '100%', }: InfoScreenProps): JSX.Element { return ( )}