From edea15c845b33848b7b4f63616841e675b74d572 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 15 Apr 2022 22:20:09 +0200
Subject: chore: add an Overview component

---
 src/components/organisms/layout/overview.test.tsx | 29 +++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 src/components/organisms/layout/overview.test.tsx

(limited to 'src/components/organisms/layout/overview.test.tsx')

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();
+  });
+});
-- 
cgit v1.2.3

