aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/layout/page-header.test.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-04-21 17:03:45 +0200
committerArmand Philippot <git@armandphilippot.com>2022-04-21 17:03:45 +0200
commit34502bd004c2522a8f2a217da3adf51586d1dec3 (patch)
tree548ae3e34d6f8e3d2897a126bb8971a7fe2d278b /src/components/molecules/layout/page-header.test.tsx
parent2b51960da1bd907f5855869d3eee53565ca7cbfc (diff)
chore: add a PageHeader component
Diffstat (limited to 'src/components/molecules/layout/page-header.test.tsx')
-rw-r--r--src/components/molecules/layout/page-header.test.tsx18
1 files changed, 18 insertions, 0 deletions
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();
+ });
+});