diff --git a/malty/atoms/Headline/Headline.test.tsx b/malty/atoms/Headline/Headline.test.tsx index 620152fc8..2a64a85c1 100644 --- a/malty/atoms/Headline/Headline.test.tsx +++ b/malty/atoms/Headline/Headline.test.tsx @@ -4,10 +4,22 @@ import React from 'react'; import { Headline } from './Headline'; const text = 'this is a headline'; +const testId = 'headline'; + describe('Headline component', () => { it('should render with the correct text', () => { render({text}); + const rendered = screen.getByText(text); + + expect(rendered).toBeInTheDocument(); + }); + + it('should have the assigned data test id', () => { + render({text}); + + const rendered = screen.getByTestId(testId); + expect(rendered).toBeInTheDocument(); }); });