Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e28859f
project chart showing correct hours
JatinAgrawal94 Feb 17, 2025
437868e
fixed tasks graph
JatinAgrawal94 Feb 22, 2025
e5df86c
made changes to the custom percentage fir graphs
JatinAgrawal94 Feb 23, 2025
c823998
dark mode text issues resolved
JatinAgrawal94 Mar 3, 2025
a7ed488
fixed issues with darkMode
JatinAgrawal94 Mar 5, 2025
5edf711
fixed filter functions
JatinAgrawal94 Mar 5, 2025
7f7f163
fixed badge summary dialog box
JatinAgrawal94 Mar 14, 2025
5debe3d
fix reset pass
suaniii Nov 10, 2024
34ad733
resolve comments
suaniii Apr 5, 2025
f1a62d5
fix ut
suaniii Apr 5, 2025
593597a
fix ut
suaniii Apr 5, 2025
1ad1cce
some changes
JatinAgrawal94 Apr 8, 2025
308d304
Updated all files under common and EmailSubscribeForm off linting errors
Amalesh-A Apr 8, 2025
9014bc5
sundar_lint_PeopleTasksPieChart.test.jsx_and_src/actions/**
sundarmachani Apr 9, 2025
c57d75b
remove state, use props
suaniii Apr 9, 2025
8ef88a2
some changes"
JatinAgrawal94 Apr 10, 2025
ef564b9
made some changes to selectors.js
JatinAgrawal94 Apr 10, 2025
e8990aa
Merge branch 'development' into jatin_fix_projects_and_task_hours
JatinAgrawal94 Apr 10, 2025
fe3a70a
fixed merge conflicts
JatinAgrawal94 Apr 10, 2025
6c17289
fixed all lint issues
JatinAgrawal94 Apr 11, 2025
8bb69ff
fixed test cases
JatinAgrawal94 Apr 11, 2025
bd2483b
fixed css issues with that
JatinAgrawal94 Apr 11, 2025
f86d703
now the replace button clicks update team code the inactive users as …
Apr 11, 2025
b3a63a6
fixed linting of the branch
Apr 11, 2025
8794ac9
Merge pull request #3193 from OneCommunityGlobal/jatin_fix_projects_a…
one-community Apr 11, 2025
e5ff552
User management Ui fix
CodewithKoushica Apr 11, 2025
2260e56
BellNotification issue fix
CodewithKoushica Apr 11, 2025
e088847
BellNotification issue fix
CodewithKoushica Apr 11, 2025
894f20d
Merge pull request #3401 from OneCommunityGlobal/Koushica_hotfix_Bell…
one-community Apr 12, 2025
0dd8441
Merge branch 'development' into amalesh-linting-pr
Amalesh-A Apr 12, 2025
0d2ea6e
Resolved Merge Conflicts
Amalesh-A Apr 12, 2025
b4bae9d
Merge pull request #3380 from OneCommunityGlobal/amalesh-linting-pr
EvianTan Apr 12, 2025
e22ee07
Merge branch 'development' into sundar_lint_PeopleTasksPieChartTest_a…
EvianTan Apr 12, 2025
d16ac51
Merge pull request #3385 from OneCommunityGlobal/sundar_lint_PeopleTa…
EvianTan Apr 12, 2025
cabc01f
Merge pull request #3398 from OneCommunityGlobal/bhavpreet_teamCode_r…
one-community Apr 12, 2025
a62c099
Merge pull request #2860 from OneCommunityGlobal/yili_fix_reset_password
one-community Apr 13, 2025
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
5 changes: 1 addition & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
# Ignore build folders
/node_modules/
/public/
/build/

# Ignore test files inside /src/components
src/__tests__/**
Expand All @@ -19,14 +20,10 @@ src/components/BMDashboard/_tests_/BMDashboard.test.jsx
src/components/Login/ForgotPassword.test.jsx
src/components/Login/LoginPage.test.js
src/components/PermissionsManagement/PermissionsManagement.test.js
src/components/Reports/PeopleReport/components/PeopleTasksPieChart.test.jsx

# Ignore folders in /src
src/actions/**
src/components/Badge/**
src/components/common/**
src/components/Dashboard/**
src/components/EmailSubscribeForm/**
src/components/Projects/**
src/components/SummaryManagement/**
src/components/TaskEditSuggestions/**
Expand Down
62 changes: 46 additions & 16 deletions src/actions/__tests__/allTeamsAction.js.test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,39 @@
// Import the necessary action creators and constants from the respective files
import { teamMembersFectchACtion, userTeamsUpdateAction, addNewTeam, teamsDeleteAction, updateTeamAction, teamUsersFetchAction, teamUsersFetchCompleteAction, teamUsersFetchErrorAction, teamMemberDeleteAction, teamMemberAddAction, updateVisibilityAction, fetchAllTeamCodeSucess, fetchAllTeamCodeFailure, getAllUserTeams, postNewTeam, deleteTeam } from '../allTeamsAction';
import { RECEIVE_ALL_USER_TEAMS, USER_TEAMS_UPDATE, ADD_NEW_TEAM, TEAMS_DELETE, UPDATE_TEAM, FETCH_TEAM_USERS_START, RECEIVE_TEAM_USERS, FETCH_TEAM_USERS_ERROR, TEAM_MEMBER_DELETE, TEAM_MEMBER_ADD, UPDATE_TEAM_MEMBER_VISIBILITY, FETCH_ALL_TEAM_CODE_SUCCESS, FETCH_ALL_TEAM_CODE_FAILURE } from '../../constants/allTeamsConstants';
import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import {
RECEIVE_ALL_USER_TEAMS,
USER_TEAMS_UPDATE,
ADD_NEW_TEAM,
TEAMS_DELETE,
UPDATE_TEAM,
FETCH_TEAM_USERS_START,
RECEIVE_TEAM_USERS,
FETCH_TEAM_USERS_ERROR,
TEAM_MEMBER_DELETE,
TEAM_MEMBER_ADD,
UPDATE_TEAM_MEMBER_VISIBILITY,
FETCH_ALL_TEAM_CODE_SUCCESS,
} from '../../constants/allTeamsConstants';
import {
teamMembersFectchACtion,
userTeamsUpdateAction,
addNewTeam,
teamsDeleteAction,
updateTeamAction,
teamUsersFetchAction,
teamUsersFetchCompleteAction,
teamUsersFetchErrorAction,
teamMemberDeleteAction,
teamMemberAddAction,
updateVisibilityAction,
fetchAllTeamCodeSucess,
getAllUserTeams,
postNewTeam,
deleteTeam,
} from '../allTeamsAction';
import { ENDPOINTS } from '../../utils/URL';

const middlewares = [thunk];
Expand All @@ -16,7 +45,10 @@ describe('teamMembersFectchACtion', () => {
// Test case for creating an action to set all user teams
it('should create an action to set all user teams', () => {
// Define the payload for the action
const payload = [{ id: 1, name: 'Team 1' }, { id: 2, name: 'Team 2' }];
const payload = [
{ id: 1, name: 'Team 1' },
{ id: 2, name: 'Team 2' },
];
// Define the expected action object
const expectedAction = {
type: RECEIVE_ALL_USER_TEAMS,
Expand Down Expand Up @@ -109,7 +141,10 @@ describe('teamUsersFetchAction', () => {
// Describe block for the teamUsersFetchCompleteAction tests
describe('teamUsersFetchCompleteAction', () => {
it('should create an action to set team users', () => {
const payload = [{ id: 1, name: 'User 1' }, { id: 2, name: 'User 2' }];
const payload = [
{ id: 1, name: 'User 1' },
{ id: 2, name: 'User 2' },
];
const expectedAction = {
type: RECEIVE_TEAM_USERS,
payload,
Expand Down Expand Up @@ -198,18 +233,18 @@ describe('fetchAllTeamCodeSucess', () => {
});
});


// Describe block for the getAllUserTeams tests
describe('getAllUserTeams', () => {
// Test case for fetching all user teams
it('should fetch all user teams and dispatch RECEIVE_ALL_USER_TEAMS action', async () => {
// Mock the API response
const responseData = [{ id: 1, name: 'Team 1' }, { id: 2, name: 'Team 2' }];
const responseData = [
{ id: 1, name: 'Team 1' },
{ id: 2, name: 'Team 2' },
];
mock.onGet(ENDPOINTS.TEAM).reply(200, responseData);

const expectedActions = [
{ type: RECEIVE_ALL_USER_TEAMS, payload: responseData },
];
const expectedActions = [{ type: RECEIVE_ALL_USER_TEAMS, payload: responseData }];

const store = mockStore({});
await store.dispatch(getAllUserTeams());
Expand All @@ -225,9 +260,7 @@ describe('postNewTeam', () => {
const responseData = { id: 3, name: 'New Team' };
mock.onPost(ENDPOINTS.TEAM).reply(200, responseData);

const expectedActions = [
{ type: ADD_NEW_TEAM, payload: responseData, status: true },
];
const expectedActions = [{ type: ADD_NEW_TEAM, payload: responseData, status: true }];

const store = mockStore({});
await store.dispatch(postNewTeam('New Team', true));
Expand All @@ -243,13 +276,10 @@ describe('deleteTeam', () => {
const teamId = 1;
mock.onDelete(ENDPOINTS.TEAM_DATA(teamId)).reply(200);

const expectedActions = [
{ type: TEAMS_DELETE, team: teamId },
];
const expectedActions = [{ type: TEAMS_DELETE, team: teamId }];

const store = mockStore({});
await store.dispatch(deleteTeam(teamId));
expect(store.getActions()).toEqual(expectedActions);
});
});

8 changes: 3 additions & 5 deletions src/actions/__tests__/authActions.js.test.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import configureMockStore from 'redux-mock-store'; // Import mock store configuration
import thunk from 'redux-thunk'; // Import thunk middleware
import jwtDecode from 'jwt-decode'; // Import jwtDecode
import axios from 'axios'; // Import axios
import httpService from '../../services/httpService'; // Import httpService
import {
loginUser, // Import loginUser action
loginBMUser, // Import loginBMUser action
getHeaderData, // Import getHeaderData action
logoutUser, // Import logoutUser action
refreshToken as refreshUserToken, // Import refreshToken action and rename it to avoid conflict
setCurrentUser, // Import setCurrentUser action
setHeaderData, // Import setHeaderData action
} from '../authActions'; // Import actions from authActions
import { SET_CURRENT_USER, GET_ERRORS, SET_HEADER_DATA } from '../../constants/auth'; // Import constants
import jwtDecode from 'jwt-decode'; // Import jwtDecode
import axios from 'axios'; // Import axios
import { SET_CURRENT_USER, SET_HEADER_DATA } from '../../constants/auth'; // Import constants

const middlewares = [thunk]; // Define middlewares
const mockStore = configureMockStore(middlewares); // Create mock store with middlewares
Expand Down Expand Up @@ -106,5 +105,4 @@ describe('authActions', () => {

expect(setHeaderData(data)).toEqual(expectedAction); // Assert the action
});

});
5 changes: 4 additions & 1 deletion src/actions/__tests__/blueSquareEmailBCCAction.js.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import axios from 'axios'; // Import axios for making HTTP requests
import configureMockStore from 'redux-mock-store'; // Import redux-mock-store for creating a mock store
import thunk from 'redux-thunk'; // Import redux-thunk for handling asynchronous actions
import * as types from '../../constants/BluequareEmailBccConstants'; // Import the action type constants
import { setBlueSquareEmailAssignement, deleteBlueSquareEmailAssignement } from '../blueSquareEmailBCCAction'; // Import the action creator
import {
setBlueSquareEmailAssignement,
deleteBlueSquareEmailAssignement,
} from '../blueSquareEmailBCCAction'; // Import the action creator

// Mock axios to control its behavior in tests
jest.mock('axios');
Expand Down
10 changes: 4 additions & 6 deletions src/actions/__tests__/dashboardActions.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import {
incrementDashboardTaskCount,
INCREMENT_DASHBOARD_TASK_COUNT,
} from '../dashboardActions';
import { toast } from 'react-toastify';
import { incrementDashboardTaskCount, INCREMENT_DASHBOARD_TASK_COUNT } from '../dashboardActions';

describe('incrementDashboardTaskCount action creator', () => {
it('should create an action to increment the dashboard task count', () => {
Expand All @@ -12,12 +10,12 @@ describe('incrementDashboardTaskCount action creator', () => {
};

// Spy on console.log
console.log = jest.fn();
toast.info = jest.fn();

const action = incrementDashboardTaskCount(taskId);

expect(action).toEqual(expectedAction);
expect(console.log).toHaveBeenCalledWith(
expect(toast.info).toHaveBeenCalledWith(
`Dispatching incrementDashboardTaskCount for task ID: ${taskId}`,
);
});
Expand Down
2 changes: 1 addition & 1 deletion src/actions/__tests__/followUpActions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('followUpActions', () => {

expect(axios.post).toHaveBeenCalledWith(
ENDPOINTS.SET_USER_FOLLOWUP(userId, taskId),
updateData
updateData,
);
expect(dispatch).toHaveBeenCalledWith({
type: types.SET_FOLLOWUP,
Expand Down
Loading