Skip to content

Commit

Permalink
Merge pull request #18 from fonteeboa/add-test
Browse files Browse the repository at this point in the history
sonar: ajustando codesmell e removendo arquivos de test do coverage
  • Loading branch information
fonteeboa authored Dec 18, 2023
2 parents e6a6b51 + 17c90b2 commit 3c21798
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions dist/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/bundle.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ sonar.sourceEncoding=UTF-8
sonar.exclusions=src/test
sonar.tests=src/test
sonar.test.inclusions=**/*Test.tsx, **/*Test.ts, **/__tests__/**
sonar.coverage.exclusions=**/*Test.*,**/*Tests.*
1 change: 0 additions & 1 deletion src/test/src/bulkActionsDropdown.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from 'react';
import { render, fireEvent, screen } from '@testing-library/react';
import '@testing-library/jest-dom';
import { BulkActionsDropdown } from '../../components';
import { Menu, Popconfirm } from 'antd';
import { mockActions } from '../mock/bulkActions';

const makeRender = (actions = []) => {
Expand Down
2 changes: 1 addition & 1 deletion src/test/src/multiModal.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { render, fireEvent, screen, waitFor} from '@testing-library/react';
import { render, fireEvent, screen } from '@testing-library/react';
import '@testing-library/jest-dom';
import Modal from 'react-modal';
import { MultiModalFormHandler } from '../../components/baseLayouts/modals/multiModalFormHandler';
Expand Down
9 changes: 3 additions & 6 deletions src/test/src/sidebar.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import React from 'react';
import { render, fireEvent, waitFor, screen } from '@testing-library/react';
import { render } from '@testing-library/react';
import Sidebar from '../../components/layout/sidebar';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import {
faHome
} from '@fortawesome/free-solid-svg-icons';
import { faHome } from '@fortawesome/free-solid-svg-icons';
// Mock para FontAwesomeIcon
jest.mock('@fortawesome/react-fontawesome', () => ({
FontAwesomeIcon: () => <i className="fa-icon-mock"></i>
Expand Down Expand Up @@ -55,7 +52,7 @@ describe('Sidebar', () => {
},
];

const { getByText, container } = render(<Sidebar menuItems={menuItems} />);
const { getByText } = render(<Sidebar menuItems={menuItems} />);

// Verifica se os labels dos itens do menu estão sendo exibidos
expect(getByText('common.overview')).toBeInTheDocument();
Expand Down

0 comments on commit 3c21798

Please sign in to comment.