-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
51dc11b
commit 12438c4
Showing
3 changed files
with
34 additions
and
26 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,40 @@ | ||
import { render, screen } from '@testing-library/react'; | ||
import '@testing-library/jest-dom/extend-expect'; | ||
import React from 'react'; | ||
import AboutUs from '../../pages/AboutUs' | ||
import { MemoryRouter } from 'react-router-dom'; // Importe o MemoryRouter | ||
import AboutUs from '../../pages/AboutUs'; | ||
|
||
describe('Testando a página AboutUs', () => { | ||
test('verifica se o título "Quem Somos" está sendo renderizado', () => { | ||
render(<AboutUs />); | ||
const title = screen.getByText(/Quem Somos/i); | ||
expect(title).toBeInTheDocument(); | ||
}); | ||
|
||
test('verifica se o logo da Polícia Civil está sendo renderizado', () => { | ||
render(<AboutUs />); | ||
render( | ||
<MemoryRouter> | ||
<AboutUs /> | ||
</MemoryRouter> | ||
); | ||
const logo = screen.getByAltText(/PoliciaCivilLogo/i); | ||
expect(logo).toBeInTheDocument(); | ||
}); | ||
|
||
test('verifica se o primeiro parágrafo está sendo renderizado', () => { | ||
render(<AboutUs />); | ||
render( | ||
<MemoryRouter> | ||
<AboutUs /> | ||
</MemoryRouter> | ||
); | ||
const paragraph1 = screen.getByText(/O PrintGO tem a finalidade de corrigir o problema chave que foi definido junto com a visão do produto,/i); | ||
expect(paragraph1).toBeInTheDocument(); | ||
}); | ||
|
||
test('verifica se o segundo parágrafo está sendo renderizado', () => { | ||
render(<AboutUs />); | ||
render( | ||
<MemoryRouter> | ||
<AboutUs /> | ||
</MemoryRouter> | ||
); | ||
const paragraph2 = screen.getByText(/A aplicação web foi feita sob encomenda para a Polícia Civil do estado do Goiás pela Universidade de Brasília,/i); | ||
expect(paragraph2).toBeInTheDocument(); | ||
}); | ||
|
||
test('verifica se a elipse está sendo renderizada', () => { | ||
render(<AboutUs />); | ||
const ellipse = screen.getByAltText(''); | ||
expect(ellipse).toBeInTheDocument(); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters