From 34502bd004c2522a8f2a217da3adf51586d1dec3 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Thu, 21 Apr 2022 17:03:45 +0200
Subject: chore: add a PageHeader component

---
 src/components/molecules/layout/page-header.test.tsx | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 src/components/molecules/layout/page-header.test.tsx

(limited to 'src/components/molecules/layout/page-header.test.tsx')

diff --git a/src/components/molecules/layout/page-header.test.tsx b/src/components/molecules/layout/page-header.test.tsx
new file mode 100644
index 0000000..329b54c
--- /dev/null
+++ b/src/components/molecules/layout/page-header.test.tsx
@@ -0,0 +1,18 @@
+import { render, screen } from '@test-utils';
+import PageHeader from './page-header';
+
+const title = 'Non nemo amet';
+const intro =
+  'Suscipit omnis minima doloribus commodi. Laudantium similique ut enim voluptatem soluta maxime autem et.';
+
+describe('PageHeader', () => {
+  it('renders a title', () => {
+    render(<PageHeader title={title} intro={intro} />);
+    expect(screen.getByRole('heading', { level: 1 })).toHaveTextContent(title);
+  });
+
+  it('renders an introduction', () => {
+    render(<PageHeader title={title} intro={intro} />);
+    expect(screen.getByText(intro)).toBeInTheDocument();
+  });
+});
-- 
cgit v1.2.3

