Skip to content

Commit

Permalink
refactor: ajustes nos parametros e testes removidos
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavogularte committed Sep 16, 2024
1 parent 776b181 commit cd7bac8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/components/TextInput/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const renderTextInput = (parameters) => render(new TextInput(parameters));
describe('TextInput', () => {
it('renders with props', () => {
renderTextInput(propsMock);
const textInput = screen.getByPlaceholderText('Write something');
const textInput = screen.getByPlaceholderText(propsMock.placeholder);

expect(textInput).toBeInTheDocument();
});
Expand Down Expand Up @@ -76,6 +76,6 @@ describe('TextInput', () => {
expect(element).toBeDisabled();

textInput.enable();
expect(element).toBeEnabled(false);
expect(element).toBeEnabled();
});
});
5 changes: 0 additions & 5 deletions src/components/UploadImage/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,8 @@ describe('UploadImage', () => {
it('renders correctly', () => {
renderUploadImage();
const uploadInput = screen.getByLabelText('Carregar imagem');
const buttonIcon = screen.getByAltText('Botão com ícone');
const imagePreview = screen.getByLabelText('Carregar imagem');

expect(uploadInput).toBeInTheDocument();
expect(buttonIcon).toBeInTheDocument();
expect(imagePreview).toBeInTheDocument();
});

describe('Upload input', () => {
Expand All @@ -29,7 +25,6 @@ describe('UploadImage', () => {
await user.upload(uploadInput, file);

expect(uploadInput.files[0]).toBe(file);
expect(uploadInput.files.item(0)).toBe(file);
});
});

Expand Down

0 comments on commit cd7bac8

Please sign in to comment.