Skip to content

Commit

Permalink
test: footer component with jest
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarhenrq committed Oct 5, 2023
1 parent 7f7ab97 commit 7252186
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions src/components/Footer/Footer.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { render, screen } from '@testing-library/react';

import Footer from './Footer';

describe('<Footer />', () => {
beforeEach(() => {
render(<Footer />);
});

it('should render the footer', () => {
screen.getByTestId('footer');
});

it('should render the line', () => {
screen.getByTestId('line');
});

it('should render the logo', () => {
screen.getByTestId('logo');
});

it('should render contact info', () => {
screen.getByTestId('contact-info');
});

it('should render text "Contato e Endereço"', () => {
screen.getByText('Contato e Endereço');
});

it('should render text "4003-5442"', () => {
screen.getByText('4003-5442');
});

it('should render adress info', () => {
screen.getByTestId('contact-info-adress');
});

it('should render the phone icon', () => {
screen.getByTestId('phone-icon');
});

it('should render the email icon', () => {
screen.getByTestId('email-icon');
});

it('should render the location icon', () => {
screen.getByTestId('location-icon');
});

it('should render auth button', () => {
screen.getByTestId('auth-buttons');
});
});

0 comments on commit 7252186

Please sign in to comment.