From 376a6d3b3645868dbc1bcc83e11bff2107c9b343 Mon Sep 17 00:00:00 2001 From: mehditorabiv Date: Sun, 1 Sep 2024 22:52:59 +0300 Subject: [PATCH] add test case --- .../pages/attestations/StepOne.test.tsx | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/components/pages/attestations/StepOne.test.tsx diff --git a/src/components/pages/attestations/StepOne.test.tsx b/src/components/pages/attestations/StepOne.test.tsx new file mode 100644 index 0000000..2df26ed --- /dev/null +++ b/src/components/pages/attestations/StepOne.test.tsx @@ -0,0 +1,26 @@ +import '@testing-library/jest-dom'; + +import { render, screen } from '@testing-library/react'; +import { MemoryRouter } from 'react-router-dom'; + +import { Provider } from '../../../enums'; + +import StepOne from './StepOne'; + +describe('StepOne Component', () => { + it('renders the component with the correct provider', () => { + render( + + {}} /> + + ); + + expect(screen.getByText('Let’s get started!')).toBeInTheDocument(); + expect( + screen.getByText('Please authenticate with Google to continue.') + ).toBeInTheDocument(); + expect( + screen.getByRole('button', { name: /Authorize with Google/i }) + ).toBeInTheDocument(); + }); +});