2019-01-03 16:00:55 +03:00
|
|
|
import React from 'react';
|
2021-10-22 07:18:03 +03:00
|
|
|
import { render } from '@testing-library/react';
|
2019-01-03 16:00:55 +03:00
|
|
|
import { Toolbar, Divider, Spacer, Button } from '../src';
|
|
|
|
|
2020-08-08 23:26:39 +03:00
|
|
|
describe('Toolbar', function () {
|
2019-01-03 16:00:55 +03:00
|
|
|
it('renders correctly', () => {
|
2021-10-22 07:18:03 +03:00
|
|
|
const { container } = render(
|
2019-01-03 16:00:55 +03:00
|
|
|
<Toolbar>
|
|
|
|
<Button>1</Button>
|
|
|
|
<Divider />
|
|
|
|
<Spacer />
|
|
|
|
<Button>2</Button>
|
|
|
|
</Toolbar>
|
|
|
|
);
|
2021-10-22 07:18:03 +03:00
|
|
|
expect(container.firstChild).toMatchSnapshot();
|
2019-01-03 16:00:55 +03:00
|
|
|
});
|
|
|
|
|
|
|
|
it('renders with props', () => {
|
2021-10-22 07:18:03 +03:00
|
|
|
const { container } = render(<Toolbar borderPosition="top" />);
|
|
|
|
expect(container.firstChild).toMatchSnapshot();
|
2019-01-03 16:00:55 +03:00
|
|
|
});
|
|
|
|
});
|