diff --git a/src/views/aide-candidat/Actions.js b/src/views/aide-candidat/Actions.js index d262ab4d..87461bb1 100644 --- a/src/views/aide-candidat/Actions.js +++ b/src/views/aide-candidat/Actions.js @@ -2,7 +2,7 @@ import React from 'react'; function Actions() { - const urlFormConseiller = import.meta.env.VITE_APP_FORMS_URL + '/conseiller/new'; + const urlFormConseiller = '/nouveau-formulaire-conseiller'; return (
diff --git a/src/views/candidature-conseiller/CandidatureConseiller.test.jsx b/src/views/candidature-conseiller/CandidatureConseiller.test.jsx index 4c6b112e..eb21b5da 100644 --- a/src/views/candidature-conseiller/CandidatureConseiller.test.jsx +++ b/src/views/candidature-conseiller/CandidatureConseiller.test.jsx @@ -728,9 +728,9 @@ describe('candidature conseiller', () => { it('quand je remplis le formulaire et que je saisi mon lieu d’habitation alors la recherche est lancer à partir de 3 caractères', async () => { // GIVEN vi.useFakeTimers(); - const searchByNameMock = vi.fn(); - vi.spyOn(useGeoApi, "useGeoApi").mockImplementation(() => ({ - searchByName: searchByNameMock, + const searchByNameSpy = vi.fn(); + vi.spyOn(useGeoApi, 'useGeoApi').mockImplementation(() => ({ + searchByName: searchByNameSpy, })); // WHEN @@ -740,16 +740,16 @@ describe('candidature conseiller', () => { // THEN fireEvent.change(adresse, { target: { value: '9' } }); vi.advanceTimersByTime(300); - expect(searchByNameMock).toBeCalledTimes(0); + expect(searchByNameSpy).toHaveBeenCalledTimes(0); fireEvent.change(adresse, { target: { value: '93' } }); vi.advanceTimersByTime(300); - expect(searchByNameMock).toBeCalledTimes(0); + expect(searchByNameSpy).toHaveBeenCalledTimes(0); fireEvent.change(adresse, { target: { value: '931' } }); vi.advanceTimersByTime(300); - expect(searchByNameMock).toBeCalledTimes(1); + expect(searchByNameSpy).toHaveBeenCalledTimes(1); fireEvent.change(adresse, { target: { value: '93100' } }); vi.advanceTimersByTime(300); - expect(searchByNameMock).toBeCalledTimes(2); + expect(searchByNameSpy).toHaveBeenCalledTimes(2); vi.useRealTimers(); });