Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jiayu --> Demi_move_test_cases #1847

Merged
merged 7 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import thunk from 'redux-thunk';
import configureStore from 'redux-mock-store';
import AssignBadgePopup from 'components/Badge/AssignBadgePopup';
import { Provider } from 'react-redux';
import { themeMock } from './mockStates';
import { themeMock } from '../../../__tests__/mockStates';

const mockStore = configureStore([thunk]);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { renderWithProvider, renderWithRouterMatch } from './utils.js';
import { renderWithProvider, renderWithRouterMatch } from '../../../__tests__/utils.js';
import '@testing-library/jest-dom/extend-expect';
import React from 'react';
import mockState from './mockAdminState.js';
import mockState from '../../../__tests__/mockAdminState.js';
import { createMemoryHistory } from 'history';
import { rest } from 'msw';
import { setupServer } from 'msw/node';
import { ENDPOINTS } from '../utils/URL';
import { ENDPOINTS } from '../../../utils/URL.js';
import { render, screen, fireEvent, waitFor } from '@testing-library/react';
import routes from './../routes';
import { ForcePasswordUpdate } from '../components/ForcePasswordUpdate/ForcePasswordUpdate';
import { forcePasswordUpdate as fPU } from './../actions/updatePassword';
import { clearErrors } from './../actions/errorsActions';
import routes from '../../../routes.js';
import { ForcePasswordUpdate } from '../ForcePasswordUpdate.jsx';
import { forcePasswordUpdate as fPU } from '../../../actions/updatePassword.js';
import { clearErrors } from '../../../actions/errorsActions.js';
import { shallow } from 'enzyme';

describe('Force Password Update page structure', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ exports[`Force Password Update page structure should match the snapshot 1`] = `
</form>
</div>
</DocumentFragment>
`;
`;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, screen } from '@testing-library/react';
import Overview from './Overview';
import Overview from '../Overview';

describe('Overview Component', () => {
it('renders correctly with props', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { render, screen, fireEvent } from '@testing-library/react';
import AddWBS from './AddWBS';
import AddWBS from '../AddWBS';
import userEvent from '@testing-library/user-event'
import { Provider } from 'react-redux';
import configureMockStore from 'redux-mock-store'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { shallow, mount } from 'enzyme';
import { Projects } from './Projects';
import { Projects } from '../Projects';
import { createMemoryHistory } from 'history';
import {
PROJECTS,
Expand All @@ -9,7 +9,7 @@ import {
ACTIVE,
MEMBERS,
WBS,
} from './../../languages/en/ui';
} from '../../../languages/en/ui';

import { Router } from 'react-router-dom';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { mount } from 'enzyme';
import { Provider } from 'react-redux';
import { MemoryRouter } from 'react-router-dom';
import configureMockStore from 'redux-mock-store';
import TeamTable from '../components/Reports/TeamTable.jsx';
import TeamTable from '../../Reports/TeamTable.jsx';
import thunk from 'redux-thunk';

const middlewares = [thunk];
Expand Down
111 changes: 0 additions & 111 deletions src/components/UserManagement/__test__/UserSearchPanel.test.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import FeaturedBadges from '../FeaturedBadges';
import mockProps from './mockData'
import mockProps from '../__mocks__/mockData'

describe('FeaturedBadges Component', () => {
it('renders correctly with badges data', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, fireEvent, screen } from '@testing-library/react';
import { WeeklySummaryContentTooltip, MediaURLTooltip } from '../../components/WeeklySummary/WeeklySummaryTooltips'; // Adjust the import path as needed
import { WeeklySummaryContentTooltip, MediaURLTooltip } from '../WeeklySummaryTooltips'; // Adjust the import path as needed

describe('WeeklySummaryContentTooltip Component Tests', () => {
it('renders without crashing', () => {
Expand All @@ -10,7 +10,7 @@ describe('WeeklySummaryContentTooltip Component Tests', () => {
it('toggles tooltip on icon click', () => {
render(<WeeklySummaryContentTooltip tabId="testId" />);
const icon = screen.getByTestId('summary-content-tooltip-icon');
fireEvent.mouseOver(icon)
fireEvent.mouseOver(icon);
});
});

Expand Down
Loading