From 4bd651b9e32c568d86b30463858c20ef290d8c07 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 7 Apr 2022 22:54:27 +0200 Subject: chore: add a HeadingButton component --- .../molecules/buttons/heading-button.test.tsx | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/components/molecules/buttons/heading-button.test.tsx (limited to 'src/components/molecules/buttons/heading-button.test.tsx') diff --git a/src/components/molecules/buttons/heading-button.test.tsx b/src/components/molecules/buttons/heading-button.test.tsx new file mode 100644 index 0000000..be3865a --- /dev/null +++ b/src/components/molecules/buttons/heading-button.test.tsx @@ -0,0 +1,32 @@ +import { render, screen } from '@test-utils'; +import HeadingButton from './heading-button'; + +describe('HeadingButton', () => { + it('renders a button to collapse.', () => { + render( + null} + /> + ); + expect( + screen.getByRole('button', { name: 'Collapse The accordion title' }) + ).toBeInTheDocument(); + }); + + it('renders a button to expand.', () => { + render( + null} + /> + ); + expect( + screen.getByRole('button', { name: 'Expand The accordion title' }) + ).toBeInTheDocument(); + }); +}); -- cgit v1.2.3