Skip to content
Snippets Groups Projects
Commit 81a7636d authored by derrabauke's avatar derrabauke Committed by Lucendio
Browse files

Adds a simple test for Signup component

parent 582d8c3f
No related branches found
No related tags found
No related merge requests found
import React from 'react';
import { render, getByText } from '@testing-library/react';
import Signup from './Signup';
describe('<Signup /> component', () => {
it('renders a Signup contents', () => {
const { container, getByText } = render(<Signup />);
const main_container = container.querySelector('.login-todo-main')
expect(main_container).toBeVisible();
expect(main_container).toHaveTextContent('Your name');
expect(main_container).toHaveTextContent('Your email');
expect(main_container).toHaveTextContent('Your password');
const button_create = getByText('Create User');
expect(button_create).toBeVisible();
const button_singin = getByText('Sign-in');
expect(button_singin).toBeVisible();
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment