| "eslint-plugin-react-hooks": "^4.2.0", | "eslint-plugin-react-hooks": "^4.2.0", | ||||
| "jest": "^26.6.0", | "jest": "^26.6.0", | ||||
| "jest-dom": "^4.0.0", | "jest-dom": "^4.0.0", | ||||
| "jest-mock-axios": "^4.7.0-beta4", | |||||
| "prettier": "2.3.1", | "prettier": "2.3.1", | ||||
| "react-test-renderer": "^18.2.0" | "react-test-renderer": "^18.2.0" | ||||
| } | } |
| }); | }); | ||||
| }); | }); | ||||
| // it("should add new comment for canidate", () => { | |||||
| // fetchCandidateSuccess(mockState.candidate.candidate); | |||||
| // expect( | |||||
| // reducer( | |||||
| // undefined, | |||||
| // createCandidateCommentSuccess({ | |||||
| // myObj: { content: "sfsdfsd" }, | |||||
| // user: mockState.user.user, | |||||
| // }) | |||||
| // ) | |||||
| // ).toEqual({ | |||||
| // candidate: mockState.candidate.candidate, | |||||
| // errorMessage: "", | |||||
| // }); | |||||
| // problem with comparing dateOfSending property of two states | |||||
| // it("should add new comment for canidate", () => { | |||||
| // const obj = { | |||||
| // myObj: { content: "sfsdfsd" }, | |||||
| // user: mockState.user.user, | |||||
| // }; | |||||
| // expect( | |||||
| // reducer( | |||||
| // { candidate: mockState.candidate.candidate, errorMessage: "" }, | |||||
| // createCandidateCommentSuccess(obj) | |||||
| // ) | |||||
| // ).toEqual({ | |||||
| // candidate: { ...mockState.candidate.candidate, obj }, | |||||
| // errorMessage: "", | |||||
| // }); | // }); | ||||
| // }); | |||||
| it("should set the state error when deleteCandidateError is called", () => { | it("should set the state error when deleteCandidateError is called", () => { | ||||
| expect(reducer(undefined, deleteCandidateError("Error"))).toEqual({ | expect(reducer(undefined, deleteCandidateError("Error"))).toEqual({ |
| import { | import { | ||||
| scheduleAppointment, | scheduleAppointment, | ||||
| scheduleAppointmentError, | scheduleAppointmentError, | ||||
| clearNotSentEmailsArray | |||||
| clearNotSentEmailsArray, | |||||
| } from "../../../../store/actions/scheduleAppointment/scheduleAppointmentActions"; | } from "../../../../store/actions/scheduleAppointment/scheduleAppointmentActions"; | ||||
| import { mockState } from "../../../../mockState"; | |||||
| describe("patterns reducer", () => { | describe("patterns reducer", () => { | ||||
| it("should return the initial state", () => { | it("should return the initial state", () => { | ||||
| }); | }); | ||||
| it("should set the state success when clearNotSentEmailsArray is called", () => { | it("should set the state success when clearNotSentEmailsArray is called", () => { | ||||
| scheduleAppointment({ notSentEmails: [] }); | |||||
| expect(reducer(undefined, clearNotSentEmailsArray())).toEqual({ | |||||
| expect( | |||||
| reducer( | |||||
| { notSentEmails: [], errorMessage: "" }, | |||||
| clearNotSentEmailsArray() | |||||
| ) | |||||
| ).toEqual({ | |||||
| notSentEmails: null, | notSentEmails: null, | ||||
| errorMessage: "", | errorMessage: "", | ||||
| }); | }); |
| import reducer from "../../../../store/reducers/processes/applicantWithProcessesReducer"; | |||||
| import expect from "expect"; | |||||
| import { | |||||
| setApplicant, | |||||
| setApplicantError | |||||
| } from "../../../../store/actions/processes/applicantAction"; | |||||
| import { mockState } from "../../../../mockState"; | |||||
| describe("createPattern reducer", () => { | |||||
| it("should return the initial state", () => { | |||||
| expect(reducer(undefined, {})).toEqual({ | |||||
| applicant: {}, | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| it("should set the state error", () => { | |||||
| expect(reducer(undefined, setApplicantError("Error"))).toEqual({ | |||||
| applicant: {}, | |||||
| errorMessage: "Error", | |||||
| }); | |||||
| }); | |||||
| it("should set the state success", () => { | |||||
| expect( | |||||
| reducer(undefined, setApplicant(mockState.candidate.candidate)) | |||||
| ).toEqual({ | |||||
| applicant: mockState.candidate.candidate, | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| }); |
| import reducer from "../../../../store/reducers/processes/interviewerUpdateReducer"; | |||||
| import expect from "expect"; | |||||
| import { | |||||
| setUpdateInterviewerSucc, | |||||
| setUpdateInterviewerReq, | |||||
| setUpdateInterviewerErr | |||||
| } from "../../../../store/actions/processes/processAction"; | |||||
| describe("interviewerUpdateReducer reducer", () => { | |||||
| it("should return the initial state", () => { | |||||
| expect(reducer(undefined, {})).toEqual({ | |||||
| updateSuccess: false, | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| it("should set the state error", () => { | |||||
| expect(reducer(undefined, setUpdateInterviewerErr("Error"))).toEqual({ | |||||
| updateSuccess: false, | |||||
| errorMessage: "Error", | |||||
| }); | |||||
| }); | |||||
| it("should set the updateSuccess to true", () => { | |||||
| expect(reducer(undefined, setUpdateInterviewerSucc())).toEqual({ | |||||
| updateSuccess: true, | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| it("should set the updateSuccess to false", () => { | |||||
| expect(reducer(undefined, setUpdateInterviewerReq())).toEqual({ | |||||
| updateSuccess: false, | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| }); |
| import reducer from "../../../../store/reducers/processes/processReducer"; | |||||
| import expect from "expect"; | |||||
| import { | |||||
| setDoneProcess, | |||||
| setDoneProcessError, | |||||
| } from "../../../../store/actions/processes/processAction"; | |||||
| describe("process reducer", () => { | |||||
| it("should return the initial state", () => { | |||||
| expect(reducer(undefined, {})).toEqual({ | |||||
| doneProcess: false, | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| it("should set the state error", () => { | |||||
| expect(reducer(undefined, setDoneProcessError("Error"))).toEqual({ | |||||
| doneProcess: false, | |||||
| errorMessage: "Error", | |||||
| }); | |||||
| }); | |||||
| it("should set the doneProcess to true", () => { | |||||
| expect(reducer(undefined, setDoneProcess(true))).toEqual({ | |||||
| doneProcess: true, | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| it("should set the doneProcess to false", () => { | |||||
| expect(reducer(undefined, setDoneProcess(false))).toEqual({ | |||||
| doneProcess: false, | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| }); |
| import reducer from "../../../../store/reducers/processes/processesReducer"; | |||||
| import expect from "expect"; | |||||
| import { | |||||
| setProcesses, | |||||
| setProcessesError, | |||||
| } from "../../../../store/actions/processes/processesAction"; | |||||
| import { mockState } from "../../../../mockState"; | |||||
| describe("processes reducer", () => { | |||||
| it("should return the initial state", () => { | |||||
| expect(reducer(undefined, {})).toEqual({ | |||||
| processes: [], | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| it("should set the state error", () => { | |||||
| expect(reducer(undefined, setProcessesError("Error"))).toEqual({ | |||||
| processes: [], | |||||
| errorMessage: "Error", | |||||
| }); | |||||
| }); | |||||
| it("should set the state success", () => { | |||||
| expect( | |||||
| reducer(undefined, setProcesses(mockState.patterns.processes)) | |||||
| ).toEqual({ | |||||
| processes: mockState.patterns.processes, | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| }); |
| import reducer from "../../../../store/reducers/processes/statusReducer"; | |||||
| import expect from "expect"; | |||||
| import { | |||||
| setStatuses, | |||||
| setStatusesError, | |||||
| changeStatusIsCheckedValue, | |||||
| } from "../../../../store/actions/processes/statusAction"; | |||||
| describe("status reducer", () => { | |||||
| it("should return the initial state", () => { | |||||
| expect(reducer(undefined, {})).toEqual({ | |||||
| statuses: [], | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| it("should set the state error", () => { | |||||
| expect(reducer(undefined, setStatusesError("Error"))).toEqual({ | |||||
| statuses: [], | |||||
| errorMessage: "Error", | |||||
| }); | |||||
| }); | |||||
| it("should set the state success", () => { | |||||
| expect(reducer(undefined, setStatuses(["option1", "option2"]))).toEqual({ | |||||
| statuses: ["option1", "option2"], | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| it("should not change status because there is no option with name which we send as argument", async () => { | |||||
| expect( | |||||
| reducer( | |||||
| { | |||||
| statuses: [{ name: "option1" }, { name: "option2" }], | |||||
| errorMessage: "", | |||||
| }, | |||||
| changeStatusIsCheckedValue("option3") | |||||
| ) | |||||
| ).toEqual({ | |||||
| statuses: [{ name: "option1" }, { name: "option2" }], | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| it("should not change status because there is option with name which we send as argument", async () => { | |||||
| expect( | |||||
| reducer( | |||||
| { | |||||
| statuses: [ | |||||
| { name: "option1", isChecked: false }, | |||||
| { name: "option2", isChecked: false }, | |||||
| ], | |||||
| errorMessage: "", | |||||
| }, | |||||
| changeStatusIsCheckedValue("option1") | |||||
| ) | |||||
| ).toEqual({ | |||||
| statuses: [ | |||||
| { name: "option1", isChecked: true }, | |||||
| { name: "option2", isChecked: false }, | |||||
| ], | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| }); |
| import reducer from "../../../../store/reducers/processes/statusUpdateReducer"; | |||||
| import expect from "expect"; | |||||
| import { | |||||
| setUpdateStatusReq, | |||||
| setUpdateStatusSucc, | |||||
| setUpdateStatusErr, | |||||
| } from "../../../../store/actions/processes/processAction"; | |||||
| describe("process reducer", () => { | |||||
| it("should return the initial state", () => { | |||||
| expect(reducer(undefined, {})).toEqual({ | |||||
| success: false, | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| it("should set the state error", () => { | |||||
| expect(reducer(undefined, setUpdateStatusErr("Error"))).toEqual({ | |||||
| success: false, | |||||
| errorMessage: "Error", | |||||
| }); | |||||
| }); | |||||
| it("should set the success to true", () => { | |||||
| expect(reducer(undefined, setUpdateStatusSucc())).toEqual({ | |||||
| success: true, | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| it("should set the success to false", () => { | |||||
| expect(reducer(undefined, setUpdateStatusReq())).toEqual({ | |||||
| success: false, | |||||
| errorMessage: "", | |||||
| }); | |||||
| }); | |||||
| }); |
| ); | ); | ||||
| }); | }); | ||||
| // it("Should render mention list after entering @ inside our mention input", async () => { | |||||
| // const { container } = render(cont); | |||||
| // const input = container | |||||
| // .getElementsByClassName("comment-input")[0] | |||||
| // .querySelector("textarea"); | |||||
| // fireEvent.change(input, { target: { value: "@" } }); | |||||
| // await waitFor(() => | |||||
| // expect( | |||||
| // container | |||||
| // .getElementsByClassName("comment-input")[0] | |||||
| // .getElementsByClassName("comment-input_suggestions")[0] | |||||
| // ).toBeDefined() | |||||
| // ); | |||||
| // }); | |||||
| it("Should render mention list after entering @ inside our mention input", async () => { | |||||
| const { container } = render(cont); | |||||
| const input = container | |||||
| .getElementsByClassName("comment-input")[0] | |||||
| .querySelector("textarea"); | |||||
| waitFor(() => { | |||||
| fireEvent.change(input, { target: { value: "@" } }); | |||||
| expect( | |||||
| container | |||||
| .getElementsByClassName("comment-input")[0] | |||||
| .getElementsByClassName("comment-input_suggestions")[0] | |||||
| ).toBeDefined(); | |||||
| }); | |||||
| }); | |||||
| it("Should render first button for sending commment because width of screen is greater than 361", () => { | it("Should render first button for sending commment because width of screen is greater than 361", () => { | ||||
| const { container } = render(cont); | const { container } = render(cont); |
| // it("input for searching by name should be shown after clicking button for first time", async () => { | // it("input for searching by name should be shown after clicking button for first time", async () => { | ||||
| // const { container } = render(cont); | // const { container } = render(cont); | ||||
| // fireEvent.click(container.getElementsByClassName("candidate-btn")[1]); | |||||
| // await waitFor(() => | |||||
| // const button = container.getElementsByClassName("candidate-btn")[1]; | |||||
| // const a = button.innerHTML; | |||||
| // await waitFor(() => { | |||||
| // fireEvent.click(button); | |||||
| // expect( | // expect( | ||||
| // container.getElementsByClassName("proba")[0].style.visibility | // container.getElementsByClassName("proba")[0].style.visibility | ||||
| // ).toBe("vissible") | |||||
| // ); | |||||
| // ).toBe("visible"); | |||||
| // }); | |||||
| // }); | // }); | ||||
| it("Should render TableViewPage component when page is initialy rendered", () => { | it("Should render TableViewPage component when page is initialy rendered", () => { |
| ); | ); | ||||
| expect(screen.getByTestId("day-component-dialog")).toBeDefined(); | expect(screen.getByTestId("day-component-dialog")).toBeDefined(); | ||||
| }); | }); | ||||
| // it("After clicking on right arrow of DayDetailsComponent should be rendered new day", async () => { | |||||
| // const { container } = render(cont); | |||||
| // fireEvent.click( | |||||
| // container.getElementsByClassName("day-component-container")[0] | |||||
| // ); | |||||
| // fireEvent.click(screen.getByTestId("day-details-right-arrow")); | |||||
| // expect(screen.getByTestId("day-details-component-process")).toBeDefined(); | |||||
| // await waitFor(() => | |||||
| // expect(screen.getByTestId("day-details-applicant").textContent).toBe( | |||||
| // "Meris Ahmatovic" | |||||
| // ) | |||||
| // ); | |||||
| // }); | |||||
| }); | }); |
| import history from "../../store/utils/history"; | import history from "../../store/utils/history"; | ||||
| import TableViewPage from "../../pages/CandidatesPage/TableViewPage"; | import TableViewPage from "../../pages/CandidatesPage/TableViewPage"; | ||||
| import { PAGE_SIZE_CANDIDATES } from "../../constants/keyCodeConstants"; | import { PAGE_SIZE_CANDIDATES } from "../../constants/keyCodeConstants"; | ||||
| import axios from "axios"; | |||||
| // import mockAxios from "jest-mock-axios"; | |||||
| import { getCV } from "../../request/candidatesRequest"; | |||||
| describe("TableViewPage render tests", () => { | describe("TableViewPage render tests", () => { | ||||
| var props = { | var props = { | ||||
| await waitFor(() => expect(mockDispatch).toBeCalledTimes(2)); | await waitFor(() => expect(mockDispatch).toBeCalledTimes(2)); | ||||
| }); | }); | ||||
| // How to mock getCV() function ? | |||||
| // it("Should render CV of candidate after clicking on CV name", async () => { | |||||
| // const mockedCall = { data: mockState.candidates.adsCandidates }; | |||||
| // requests.getCV = {} | |||||
| // const { container } = render(cont); | |||||
| // fireEvent.click( | |||||
| // container | |||||
| // .getElementsByClassName("cadidate-row")[0] | |||||
| // .getElementsByTagName("td")[4] | |||||
| // .getElementsByTagName("span")[0] | |||||
| // ); | |||||
| // await waitFor(() => expect(container.getElementsByClassName('candidates-cv')[0].style.opacity).toBe("1")); | |||||
| // }); | |||||
| it("Should render CV of candidate after clicking on CV name", async () => { | |||||
| let catchFn = jest.fn(); | |||||
| const basse64Pdf = `JVBERi0xLjMNCiXi48/TDQoNCjEgMCBvYmoNCjw8DQovVHl | |||||
| wZSAvQ2F0YWxvZw0KL091dGxpbmVzIDIgMCBSDQovUGFnZXMgMyAwIFINCj4+DQplbmRvYmoNCg0KMiAwIG9iag0KPDwNCi9UeXBlIC9PdXR | |||||
| saW5lcw0KL0NvdW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bmQs | |||||
| IGFuZCBqdXN0IGFzIHdlbGwuICkgVGoNCkVUDQplbmRzdHJlYW0NCmVuZG9iag0KDQo4IDAgb2JqDQpbL1BERiAvVGV4dF0NCmVuZG9iag0KDQo5IDAgb2JqDQo8PA0 | |||||
| KL1R5cGUgL0ZvbnQNCi9TdWJ0eXBlIC9UeXBlMQ0KL05hbWUgL0YxDQovQmFzZUZvbnQgL0hlbHZldGljYQ0KL0VuY29kaW5nIC9XaW5BbnNpRW5jb2RpbmcNCj4+D | |||||
| QplbmRvYmoNCg0KMTAgMCBvYmoNCjw8DQovQ3JlYXRvciAoUmF2ZSBcKGh0dHA6Ly93d3cubmV2cm9uYS5jb20vcmF2ZVwpKQ0KL1Byb2R1Y2VyIChOZXZyb25hIER | |||||
| lc2lnbnMpDQovQ3JlYXRpb25EYXRlIChEOjIwMDYwMzAxMDcyODI2KQ0KPj4NCmVuZG9iag0KDQp4cmVmDQowIDExDQowMDAwMDAwMDAwIDY1NTM1IGYNCjAwMDAwM | |||||
| DAwMTkgMDAwMDAgbg0KMDAwMDAwMDA5MyAwMDAwMCBuDQowMDAwMDAwMTQ3IDAwMDAwIG4NCjAwMDAwMDAyMjIgMDAwMDAgbg0KMDAwMDAwMDM5MCAwMDAwMCBuDQow | |||||
| MDAwMDAxNTIyIDAwMDAwIG4NCjAwMDAwMDE2OTAgMDAwMDAgbg0KMDAwMDAwMjQyMyAwMDAwMCBuDQowMDAwMDAyNDU2IDAwMDAwIG4NCjAwMDAwMDI1NzQgMDAwMD | |||||
| Agbg0KDQp0cmFpbGVyDQo8PA0KL1NpemUgMTENCi9Sb290IDEgMCBSDQovSW5mbyAxMCAwIFINCj4+DQoNCnN0YXJ0eHJlZg0KMjcxNA0KJSVFT0YNCg==`; | |||||
| getCV("name od pdf file") | |||||
| .then(() => basse64Pdf) | |||||
| .catch(catchFn); | |||||
| const { container } = render(cont); | |||||
| fireEvent.click( | |||||
| container | |||||
| .getElementsByClassName("cadidate-row")[0] | |||||
| .getElementsByTagName("td")[4] | |||||
| .getElementsByTagName("span")[0] | |||||
| ); | |||||
| waitFor(() => | |||||
| expect( | |||||
| container.getElementsByClassName("candidates-cv")[0].style.opacity | |||||
| ).toBe("1") | |||||
| ); | |||||
| }); | |||||
| }); | }); |
| import React from 'react'; | |||||
| import PropTypes from 'prop-types'; | |||||
| const SectionLoader = ({ children, isLoading }) => ( | |||||
| <div className="c-loader__wrapper"> | |||||
| {children} | |||||
| {isLoading && ( | |||||
| <div className="c-loader"> | |||||
| <div className="c-loader__icon" /> | |||||
| </div> | |||||
| )} | |||||
| </div> | |||||
| ); | |||||
| SectionLoader.propTypes = { | |||||
| children: PropTypes.node, | |||||
| isLoading: PropTypes.bool, | |||||
| }; | |||||
| export default SectionLoader; |