Skip to content

Commit

Permalink
Quand on supprime, on est redirigé vers la liste d'inventaires
Browse files Browse the repository at this point in the history
  • Loading branch information
NerOcrO committed May 14, 2024
1 parent bc75568 commit c38d979
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/IndicateursCles/IndicateursCles.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe('page des indicateurs clés', () => {
await waitFor(() => {
expect(repositoryInventaires.supprimerUnInventaireRepository).toHaveBeenCalledWith('Hopital de Paris$$00000001K', 'Centre hospitalier')
})
expect(spyNextNavigation.useRouter.push).toHaveBeenCalledWith('/')
expect(spyNextNavigation.useRouter.push).toHaveBeenCalledWith('/inventaires')
expect(spyNextNavigation.useRouter.refresh).toHaveBeenCalledWith()
const titreModale = within(modale).queryByRole('heading', { level: 1, name: 'Supprimer l’inventaire' })
expect(titreModale).not.toBeInTheDocument()
Expand Down
2 changes: 1 addition & 1 deletion src/components/ListeEquipements/ListeEquipements.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe('page liste d’équipements', () => {
await waitFor(() => {
expect(repositoryInventaires.supprimerUnInventaireRepository).toHaveBeenCalledWith('Hopital de Paris$$00000001K', 'Centre hospitalier')
})
expect(spyNextNavigation.useRouter.push).toHaveBeenCalledWith('/')
expect(spyNextNavigation.useRouter.push).toHaveBeenCalledWith('/inventaires')
expect(spyNextNavigation.useRouter.refresh).toHaveBeenCalledWith()
const titreModale = within(modale).queryByRole('heading', { level: 1, name: 'Supprimer l’inventaire' })
expect(titreModale).not.toBeInTheDocument()
Expand Down
2 changes: 1 addition & 1 deletion src/components/sharedComponents/SupprimerUnInventaire.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function SupprimerUnInventaire({ fermerLaModale, isOpen, nomInven
const supprimerInventaire = async () => {
await supprimerInventaireAction(nomEtablissement, nomInventaire)

router.push('/')
router.push('/inventaires')
router.refresh()
fermerLaModale()
}
Expand Down

0 comments on commit c38d979

Please sign in to comment.