Device manager - add settings subsection heading component (#9387)

* add settings subsection heading component

* use named export

* newline
This commit is contained in:
Kerry 2022-10-11 20:12:02 +02:00 committed by GitHub
parent 51d5005efa
commit 03182d03be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 211 additions and 52 deletions

View file

@ -27,6 +27,17 @@ describe('<SettingsSubsection />', () => {
const getComponent = (props = {}): React.ReactElement =>
(<SettingsSubsection {...defaultProps} {...props} />);
it('renders with plain text heading', () => {
const { container } = render(getComponent());
expect(container).toMatchSnapshot();
});
it('renders with react element heading', () => {
const heading = <h3>This is the heading</h3>;
const { container } = render(getComponent({ heading }));
expect(container).toMatchSnapshot();
});
it('renders without description', () => {
const { container } = render(getComponent());
expect(container).toMatchSnapshot();