diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-15 22:20:09 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-15 22:31:17 +0200 |
| commit | edea15c845b33848b7b4f63616841e675b74d572 (patch) | |
| tree | 8b9d9bc0ae8db49b13c76e80a4ed2d3e3a247573 /src/components/organisms/layout/overview.test.tsx | |
| parent | 52295600772281d83885a49f57d5d2092fcc8397 (diff) | |
chore: add an Overview component
Diffstat (limited to 'src/components/organisms/layout/overview.test.tsx')
| -rw-r--r-- | src/components/organisms/layout/overview.test.tsx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/components/organisms/layout/overview.test.tsx b/src/components/organisms/layout/overview.test.tsx new file mode 100644 index 0000000..0738d3f --- /dev/null +++ b/src/components/organisms/layout/overview.test.tsx @@ -0,0 +1,29 @@ +import { render, screen } from '@test-utils'; +import Overview from './overview'; + +const cover = { + alt: 'Incidunt unde quam', + height: 480, + src: 'http://placeimg.com/640/480/cats', + width: 640, +}; + +const meta = { + publication: { name: 'Illo ut odio:', value: 'Sequi et excepturi' }, + update: { + name: 'Perspiciatis vel laudantium:', + value: 'Dignissimos ratione veritatis', + }, +}; + +describe('Overview', () => { + it('renders some meta', () => { + render(<Overview meta={meta} />); + expect(screen.getByText(meta['publication'].name)).toBeInTheDocument(); + }); + + it('renders a cover', () => { + render(<Overview meta={meta} cover={cover} />); + expect(screen.getByRole('img', { name: cover.alt })).toBeInTheDocument(); + }); +}); |
