From 2c610c7cbf830a0dec2264d4b06ddcd0e3bde218 Mon Sep 17 00:00:00 2001
From: Bastien DUMONT <bdumont@grandlyon.com>
Date: Fri, 19 Apr 2024 13:34:20 +0000
Subject: [PATCH] test: remove act warning

---
 .../Action/ActionBegin/ActionBegin.spec.tsx   |  12 +-
 .../Action/ActionCard/ActionCard.spec.tsx     |   9 +-
 .../Action/ActionChoose/ActionChoose.spec.tsx |  16 +-
 .../Action/ActionDone/ActionDone.spec.tsx     |   6 +-
 .../Action/ActionModal/ActionModal.spec.tsx   |   6 +-
 .../ActionOnGoing/ActionOnGoing.spec.tsx      |   9 +-
 .../ElecHalfHourMonthlyAnalysis.spec.tsx      |  17 +-
 .../ElecHalfHourMonthlyAnalysis.tsx           |   2 +-
 .../ElecHalfHourMonthlyAnalysis.spec.tsx.snap |   2 +-
 .../MaxConsumptionCard.spec.tsx               |  29 ++-
 .../ProfileComparator.spec.tsx                |   6 +-
 .../ChallengeCardDone.spec.tsx                |   8 +-
 .../ChallengeCardLast.spec.tsx                |   6 +-
 .../ChallengeCardUnlocked.spec.tsx            |  18 +-
 src/components/Charts/Bar.spec.tsx            |   6 +-
 .../FormNavigation/FormNavigation.spec.tsx    |  10 +-
 .../ExpiredConsentModal.spec.tsx              |  26 +-
 .../Connection/SGEConnect/SgeInit.spec.tsx    |   6 +-
 .../SGEConnect/StepAddress.spec.tsx           |  14 +-
 .../SGEConnect/StepIdentityAndPdl.spec.tsx    |  18 +-
 .../DataloadNoValue.spec.tsx                  |   6 +-
 .../DataloadSectionValue.spec.tsx             |   6 +-
 .../InfoDataConsumptionVisualizer.spec.tsx    |  10 +-
 .../CustomPopup/CustomPopupModal.spec.tsx     |  25 +-
 .../CustomPopupModal.spec.tsx.snap            |   2 +-
 .../DateNavigator/DateNavigator.spec.tsx      |  11 +-
 .../Duel/DuelUnlocked/DuelUnlocked.spec.tsx   |   8 +-
 .../EcogestureEmptyList.spec.tsx              |  21 +-
 .../EcogestureInitModal.spec.tsx              |  10 +-
 .../EcogestureList/EcogestureList.spec.tsx    |  20 +-
 .../EcogestureNotFound.spec.tsx               |   6 +-
 .../Ecogesture/EcogestureTabsView.spec.tsx    |  21 +-
 .../Ecogesture/SingleEcogestureView.spec.tsx  |  28 ++-
 .../EcogestureTabsView.spec.tsx.snap          | 233 ------------------
 .../EcogestureFormEquipment.spec.tsx          |   4 +-
 .../EcogestureFormSingleChoice.spec.tsx       |  10 +-
 .../EcogestureFormView.spec.tsx               |  15 +-
 .../EcogestureLaunchFormModal.spec.tsx        |   6 +-
 .../EcogestureSelectionDetail.spec.tsx        |  18 +-
 .../EcogestureSelectionEnd.spec.tsx           |   6 +-
 .../EcogestureSelectionModal.spec.tsx         |   6 +-
 .../EcogestureSelectionRestart.spec.tsx       |  10 +-
 .../Exploration/ExplorationFinished.spec.tsx  |   6 +-
 .../Feedback/FeedbackModal.spec.tsx           |   6 +-
 .../TimeStepSelector.spec.tsx                 |  10 +-
 src/components/Header/CozyBar.spec.tsx        |  14 +-
 src/components/Header/Header.spec.tsx         |  14 +-
 .../ConnectionNotFound.spec.tsx               |   7 +-
 .../Konnector/KonnectorModal.spec.tsx         |   6 +-
 .../Konnector/KonnectorModalFooter.spec.tsx   |  18 +-
 .../Konnector/KonnectorViewerList.spec.tsx    |   6 +-
 .../Modals/exportDoneModal.spec.tsx           |   6 +-
 .../Modals/exportLoadingModal.spec.tsx        |   6 +-
 .../Modals/exportStartModal.spec.tsx          |   6 +-
 .../ProfileTypeOptions.spec.tsx               |   6 +-
 .../ReportOptions/ReportOptions.spec.tsx      |  14 +-
 .../Options/Unsubscribe/Unsubscribe.spec.tsx  |   6 +-
 .../PartnerIssue/PartnerIssueModal.spec.tsx   |   6 +-
 .../ProfileTypeFinished.spec.tsx              |   6 +-
 .../Quiz/QuizBegin/QuizBegin.spec.tsx         |   6 +-
 .../Quiz/QuizFinish/QuizFinish.spec.tsx       |   6 +-
 .../QuizQuestion/QuizQuestionContent.spec.tsx |   6 +-
 .../QuizQuestionContentCustom.spec.tsx        |  12 +-
 src/components/Splash/SplashRoot.spec.tsx     |   6 +-
 .../Splash/SplashScreenError.spec.tsx         |   6 +-
 .../__snapshots__/SplashRoot.spec.tsx.snap    |   2 +-
 src/components/Terms/TermsView.spec.tsx       |  10 +-
 .../WelcomeModal/WelcomeModal.spec.tsx        |  10 +-
 68 files changed, 436 insertions(+), 479 deletions(-)

diff --git a/src/components/Action/ActionBegin/ActionBegin.spec.tsx b/src/components/Action/ActionBegin/ActionBegin.spec.tsx
index f4e0ba50d..99bab9320 100644
--- a/src/components/Action/ActionBegin/ActionBegin.spec.tsx
+++ b/src/components/Action/ActionBegin/ActionBegin.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen, waitFor } from '@testing-library/react'
+import { act, render, screen, waitFor } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -62,8 +62,7 @@ describe('ActionBegin component', () => {
       </Provider>
     )
     await waitFor(() => null, { container })
-    const title = screen.getByRole('heading')
-    expect(title).toHaveTextContent('Coup de vent')
+    expect(screen.getByText('Coup de vent')).toBeInTheDocument()
   })
   it('should open launch Modal', async () => {
     const store = createMockEcolyoStore({
@@ -71,7 +70,7 @@ describe('ActionBegin component', () => {
       profile: mockProfileState,
     })
 
-    render(
+    const { container } = render(
       <Provider store={store}>
         <ActionBegin
           action={defaultEcogestureData[1]}
@@ -80,7 +79,10 @@ describe('ActionBegin component', () => {
         />
       </Provider>
     )
-    await userEvent.click(await screen.findByText('action.apply'))
+    await waitFor(() => null, { container })
+    await act(async () => {
+      await userEvent.click(screen.getByText('action.apply'))
+    })
     expect(await screen.findByRole('dialog')).toBeInTheDocument()
   })
 })
diff --git a/src/components/Action/ActionCard/ActionCard.spec.tsx b/src/components/Action/ActionCard/ActionCard.spec.tsx
index 6da3d6ac9..44a22ec8a 100644
--- a/src/components/Action/ActionCard/ActionCard.spec.tsx
+++ b/src/components/Action/ActionCard/ActionCard.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen, waitFor } from '@testing-library/react'
+import { act, render, screen, waitFor } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -27,7 +27,7 @@ describe('ActionCard component', () => {
     expect(container).toMatchSnapshot()
   })
   it('should open Ecogesture modal', async () => {
-    render(
+    const { container } = render(
       <Provider store={store}>
         <ActionCard
           setShowList={jest.fn()}
@@ -36,7 +36,10 @@ describe('ActionCard component', () => {
         />
       </Provider>
     )
-    await userEvent.click(await screen.findByRole('button'))
+    await waitFor(() => null, { container })
+    await act(async () => {
+      await userEvent.click(await screen.findByRole('button'))
+    })
     expect(await screen.findByRole('dialog')).toBeInTheDocument()
   })
 })
diff --git a/src/components/Action/ActionChoose/ActionChoose.spec.tsx b/src/components/Action/ActionChoose/ActionChoose.spec.tsx
index c7f251918..936d23c5f 100644
--- a/src/components/Action/ActionChoose/ActionChoose.spec.tsx
+++ b/src/components/Action/ActionChoose/ActionChoose.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen, waitFor } from '@testing-library/react'
+import { act, render, screen, waitFor } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -12,6 +12,9 @@ import {
 import { userChallengeData } from 'tests/__mocks__/userChallengeData.mock'
 import ActionChoose from './ActionChoose'
 
+// jest.mock('components/Action/ActionBegin/ActionBegin', () => 'mock-ActionBegin')
+jest.mock('components/Action/ActionList/ActionList', () => 'mock-ActionList')
+
 jest.mock('services/ecogesture.service', () => {
   return jest.fn(() => ({
     getEcogesturesByIds: jest.fn(() => []),
@@ -65,8 +68,13 @@ describe('ActionChoose component', () => {
         <ActionChoose userChallenge={userChallengeData[1]} />
       </Provider>
     )
-    await userEvent.click(await screen.findByText('action.other'))
-    const elements = container.getElementsByClassName('action-list-container')
-    expect(elements.item(0)).toBeInTheDocument()
+    await waitFor(() => null, { container })
+
+    await act(async () => {
+      await userEvent.click(await screen.findByText('action.other'))
+    })
+
+    const list = container.getElementsByTagName('mock-ActionList')[0]
+    expect(list).toBeInTheDocument()
   })
 })
diff --git a/src/components/Action/ActionDone/ActionDone.spec.tsx b/src/components/Action/ActionDone/ActionDone.spec.tsx
index 09c2d698f..038a6dd20 100644
--- a/src/components/Action/ActionDone/ActionDone.spec.tsx
+++ b/src/components/Action/ActionDone/ActionDone.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -35,7 +35,9 @@ describe('ActionDone component', () => {
         <ActionDone currentChallenge={userChallengeData[1]} />
       </Provider>
     )
-    await userEvent.click(await screen.findByText('action.ok'))
+    await act(async () => {
+      await userEvent.click(screen.getByText('action.ok'))
+    })
     expect(updateChallengeSpy).toHaveBeenCalledTimes(1)
   })
 })
diff --git a/src/components/Action/ActionModal/ActionModal.spec.tsx b/src/components/Action/ActionModal/ActionModal.spec.tsx
index a3c59c54d..138d005c3 100644
--- a/src/components/Action/ActionModal/ActionModal.spec.tsx
+++ b/src/components/Action/ActionModal/ActionModal.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -47,7 +47,9 @@ describe('ActionModal component', () => {
         />
       </Provider>
     )
-    await userEvent.click(await screen.findByText('action_modal.accept'))
+    await act(async () => {
+      await userEvent.click(screen.getByText('action_modal.accept'))
+    })
     expect(updateChallengeSpy).toHaveBeenCalledTimes(1)
   })
 })
diff --git a/src/components/Action/ActionOnGoing/ActionOnGoing.spec.tsx b/src/components/Action/ActionOnGoing/ActionOnGoing.spec.tsx
index 899e6e3cd..ed1789703 100644
--- a/src/components/Action/ActionOnGoing/ActionOnGoing.spec.tsx
+++ b/src/components/Action/ActionOnGoing/ActionOnGoing.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen, waitFor } from '@testing-library/react'
+import { act, render, screen, waitFor } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import { UserActionState } from 'enums'
 import { DateTime } from 'luxon'
@@ -39,13 +39,14 @@ describe('ActionOnGoing component', () => {
       state: UserActionState.ONGOING,
     }
 
-    const { container } = render(
+    render(
       <Provider store={store}>
         <ActionOnGoing userAction={userAction1} />
       </Provider>
     )
-    await waitFor(() => null, { container })
-    await userEvent.click(await screen.findByText('action.details'))
+    await act(async () => {
+      await userEvent.click(screen.getByText('action.details'))
+    })
     expect(screen.findByRole('dialog')).toBeTruthy()
   })
 })
diff --git a/src/components/Analysis/ElecHalfHourMonthlyAnalysis/ElecHalfHourMonthlyAnalysis.spec.tsx b/src/components/Analysis/ElecHalfHourMonthlyAnalysis/ElecHalfHourMonthlyAnalysis.spec.tsx
index 079b98bd5..4c977c174 100644
--- a/src/components/Analysis/ElecHalfHourMonthlyAnalysis/ElecHalfHourMonthlyAnalysis.spec.tsx
+++ b/src/components/Analysis/ElecHalfHourMonthlyAnalysis/ElecHalfHourMonthlyAnalysis.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen, waitFor } from '@testing-library/react'
+import { act, render, screen, waitFor } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import { PerformanceIndicator } from 'models'
 import React from 'react'
@@ -99,8 +99,11 @@ describe('ElecHalfHourMonthlyAnalysis component', () => {
         <ElecHalfHourMonthlyAnalysis perfIndicator={mockPerfIndicator} />
       </Provider>
     )
-    await waitFor(() => null, { container })
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(
+        screen.getByLabelText('consumption.accessibility.button_previous_value')
+      )
+    })
     expect(container.getElementsByClassName('week').length).toBeTruthy()
   })
 
@@ -114,13 +117,15 @@ describe('ElecHalfHourMonthlyAnalysis component', () => {
     )
     mockGetPrices.mockResolvedValue(allLastFluidPrices[0])
 
-    const { container } = render(
+    render(
       <Provider store={store}>
         <ElecHalfHourMonthlyAnalysis perfIndicator={mockPerfIndicator} />
       </Provider>
     )
-    await waitFor(() => null, { container })
-    await userEvent.click(await screen.findByText('special_elec.showModal'))
+
+    await waitFor(async () => {
+      await userEvent.click(screen.getByText('special_elec.showModal'))
+    })
     expect(await screen.findByRole('dialog')).toBeInTheDocument()
   })
 })
diff --git a/src/components/Analysis/ElecHalfHourMonthlyAnalysis/ElecHalfHourMonthlyAnalysis.tsx b/src/components/Analysis/ElecHalfHourMonthlyAnalysis/ElecHalfHourMonthlyAnalysis.tsx
index 40b4223d8..b4a64e77f 100644
--- a/src/components/Analysis/ElecHalfHourMonthlyAnalysis/ElecHalfHourMonthlyAnalysis.tsx
+++ b/src/components/Analysis/ElecHalfHourMonthlyAnalysis/ElecHalfHourMonthlyAnalysis.tsx
@@ -192,7 +192,7 @@ const ElecHalfHourMonthlyAnalysis = ({
               </div>
             </div>
             <IconButton
-              aria-label={t('consumption.accessibility.button_previous_value')}
+              aria-label={t('consumption.accessibility.button_next_value')}
               onClick={handleChangeWeek}
               className="arrow-next"
             >
diff --git a/src/components/Analysis/ElecHalfHourMonthlyAnalysis/__snapshots__/ElecHalfHourMonthlyAnalysis.spec.tsx.snap b/src/components/Analysis/ElecHalfHourMonthlyAnalysis/__snapshots__/ElecHalfHourMonthlyAnalysis.spec.tsx.snap
index e4058feef..381a84602 100644
--- a/src/components/Analysis/ElecHalfHourMonthlyAnalysis/__snapshots__/ElecHalfHourMonthlyAnalysis.spec.tsx.snap
+++ b/src/components/Analysis/ElecHalfHourMonthlyAnalysis/__snapshots__/ElecHalfHourMonthlyAnalysis.spec.tsx.snap
@@ -94,7 +94,7 @@ exports[`ElecHalfHourMonthlyAnalysis component should be rendered correctly when
         </div>
       </div>
       <button
-        aria-label="consumption.accessibility.button_previous_value"
+        aria-label="consumption.accessibility.button_next_value"
         class="MuiButtonBase-root MuiIconButton-root arrow-next"
         tabindex="0"
         type="button"
diff --git a/src/components/Analysis/MaxConsumptionCard/MaxConsumptionCard.spec.tsx b/src/components/Analysis/MaxConsumptionCard/MaxConsumptionCard.spec.tsx
index 18977eb0d..098ee3140 100644
--- a/src/components/Analysis/MaxConsumptionCard/MaxConsumptionCard.spec.tsx
+++ b/src/components/Analysis/MaxConsumptionCard/MaxConsumptionCard.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen, waitFor } from '@testing-library/react'
+import { act, render, screen, waitFor } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import { FluidType } from 'enums'
 import React from 'react'
@@ -48,24 +48,33 @@ describe('MaxConsumptionCard component', () => {
       </Provider>
     )
     await waitFor(() => null, { container })
-    const [prevButton, nextButton] = screen.getAllByRole('button')
+    const prevButton = screen.getByLabelText(
+      'consumption.accessibility.button_previous_value'
+    )
+    const nextButton = screen.getByLabelText(
+      'consumption.accessibility.button_next_value'
+    )
 
     // navigate next
-    await userEvent.click(nextButton)
-    await waitFor(() => null, { container })
+    await act(async () => {
+      await userEvent.click(nextButton)
+    })
     expect(screen.getByText('FLUID.GAS.LABEL')).toBeInTheDocument()
 
-    await userEvent.click(nextButton)
-    await waitFor(() => null, { container })
+    await act(async () => {
+      await userEvent.click(nextButton)
+    })
     expect(screen.getByText('FLUID.ELECTRICITY.LABEL')).toBeInTheDocument()
 
     // navigate prev
-    await userEvent.click(prevButton)
-    await waitFor(() => null, { container })
+    await act(async () => {
+      await userEvent.click(prevButton)
+    })
     expect(screen.getByText('FLUID.GAS.LABEL')).toBeInTheDocument()
 
-    await userEvent.click(prevButton)
-    await waitFor(() => null, { container })
+    await act(async () => {
+      await userEvent.click(prevButton)
+    })
     expect(screen.getByText('FLUID.ELECTRICITY.LABEL')).toBeInTheDocument()
   })
 })
diff --git a/src/components/Analysis/ProfileComparator/ProfileComparator.spec.tsx b/src/components/Analysis/ProfileComparator/ProfileComparator.spec.tsx
index b18f88859..7cb6a0610 100644
--- a/src/components/Analysis/ProfileComparator/ProfileComparator.spec.tsx
+++ b/src/components/Analysis/ProfileComparator/ProfileComparator.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen, waitFor } from '@testing-library/react'
+import { act, render, screen, waitFor } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -97,7 +97,9 @@ describe('AnalysisConsumption component', () => {
     expect(rows.length).toBe(4)
     expect(screen.getByTestId('iconGoToProfile')).toBeInTheDocument()
     expect(screen.queryByTestId('goToProfile')).not.toBeInTheDocument()
-    await userEvent.click(screen.getByTestId('iconGoToProfile'))
+    await act(async () => {
+      await userEvent.click(screen.getByTestId('iconGoToProfile'))
+    })
     expect(mockedNavigate).toHaveBeenCalledWith('/profileType')
   })
 })
diff --git a/src/components/Challenge/ChallengeCardDone/ChallengeCardDone.spec.tsx b/src/components/Challenge/ChallengeCardDone/ChallengeCardDone.spec.tsx
index 56ef37bff..1b2f9d2ea 100644
--- a/src/components/Challenge/ChallengeCardDone/ChallengeCardDone.spec.tsx
+++ b/src/components/Challenge/ChallengeCardDone/ChallengeCardDone.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import ChallengeCardDone from 'components/Challenge/ChallengeCardDone/ChallengeCardDone'
 import React from 'react'
@@ -44,10 +44,10 @@ describe('ChallengeCardDone component', () => {
           <ChallengeCardDone userChallenge={userChallengeData[0]} />
         </Provider>
       )
-      const resetButton = screen.getByRole('button', {
-        name: 'challenge.card_done.reset_defi',
+      const resetButton = screen.getByText('challenge.card_done.reset_defi')
+      await act(async () => {
+        await userEvent.click(resetButton)
       })
-      await userEvent.click(resetButton)
       expect(mockDispatch).toHaveBeenCalledWith({
         type: 'challenge/updateUserChallengeList',
       })
diff --git a/src/components/Challenge/ChallengeCardLast/ChallengeCardLast.spec.tsx b/src/components/Challenge/ChallengeCardLast/ChallengeCardLast.spec.tsx
index 17fb028e9..f4825300a 100644
--- a/src/components/Challenge/ChallengeCardLast/ChallengeCardLast.spec.tsx
+++ b/src/components/Challenge/ChallengeCardLast/ChallengeCardLast.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import ChallengeCardLast from './ChallengeCardLast'
@@ -16,7 +16,9 @@ describe('ChallengeCardLast component', () => {
     global.open = jest.fn()
 
     render(<ChallengeCardLast />)
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(screen.getByText('challenge.card_last.button'))
+    })
     expect(window.open).toHaveBeenCalledTimes(1)
     expect(global.open).toHaveBeenCalledWith(
       `${__SAU_IDEA_DIRECT_LINK__}?version=0.0.0`
diff --git a/src/components/Challenge/ChallengeCardUnlocked/ChallengeCardUnlocked.spec.tsx b/src/components/Challenge/ChallengeCardUnlocked/ChallengeCardUnlocked.spec.tsx
index c68290664..9dae95a5e 100644
--- a/src/components/Challenge/ChallengeCardUnlocked/ChallengeCardUnlocked.spec.tsx
+++ b/src/components/Challenge/ChallengeCardUnlocked/ChallengeCardUnlocked.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import { FluidState, FluidType } from 'enums'
 import React from 'react'
@@ -27,7 +27,9 @@ describe('ChallengeCardUnlocked component', () => {
       </Provider>
     )
     expect(screen.getByText('Simone VEILLE')).toBeInTheDocument()
-    expect(screen.getByRole('button')).toBeInTheDocument()
+    expect(
+      screen.getByText('challenge.card_unlocked.button_launch')
+    ).toBeInTheDocument()
     expect(screen.queryAllByRole('dialog').length).toBeFalsy()
   })
 
@@ -37,7 +39,11 @@ describe('ChallengeCardUnlocked component', () => {
         <ChallengeCardUnlocked userChallenge={userChallengeData[0]} />
       </Provider>
     )
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(
+        screen.getByText('challenge.card_unlocked.button_launch')
+      )
+    })
     expect(screen.queryAllByRole('dialog').length).toBeTruthy()
   })
 
@@ -56,7 +62,11 @@ describe('ChallengeCardUnlocked component', () => {
         <ChallengeCardUnlocked userChallenge={userChallengeData[0]} />
       </Provider>
     )
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(
+        screen.getByText('challenge.card_unlocked.button_launch')
+      )
+    })
     expect(screen.queryAllByRole('dialog').length).toBeFalsy()
     expect(mockStartUserChallenge).toHaveBeenCalledWith(userChallengeData[0])
   })
diff --git a/src/components/Charts/Bar.spec.tsx b/src/components/Charts/Bar.spec.tsx
index adb15d350..73cf573db 100644
--- a/src/components/Charts/Bar.spec.tsx
+++ b/src/components/Charts/Bar.spec.tsx
@@ -1,4 +1,4 @@
-import { render } from '@testing-library/react'
+import { act, render } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import { scaleLinear } from 'd3'
 import { FluidType, TimeStep } from 'enums'
@@ -122,7 +122,9 @@ describe('Bar component test', () => {
         </svg>
       </Provider>
     )
-    await userEvent.click(container.querySelector('rect') as Element)
+    await act(async () => {
+      await userEvent.click(container.querySelector('rect') as Element)
+    })
     expect(setSelectedDateSpy).toHaveBeenCalledTimes(1)
     expect(setSelectedDateSpy).toHaveBeenCalledWith(
       graphData.actualData[0].date
diff --git a/src/components/CommonKit/FormNavigation/FormNavigation.spec.tsx b/src/components/CommonKit/FormNavigation/FormNavigation.spec.tsx
index b9be78286..0584ba26a 100644
--- a/src/components/CommonKit/FormNavigation/FormNavigation.spec.tsx
+++ b/src/components/CommonKit/FormNavigation/FormNavigation.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import FormNavigation from './FormNavigation'
@@ -16,9 +16,13 @@ describe('FormNavigation component', () => {
       />
     )
     const [prevButton, nextButton] = screen.getAllByRole('button')
-    await userEvent.click(prevButton)
+    await act(async () => {
+      await userEvent.click(prevButton)
+    })
     expect(mockHandlePrevious).toHaveBeenCalled()
-    await userEvent.click(nextButton)
+    await act(async () => {
+      await userEvent.click(nextButton)
+    })
     expect(mockHandleNext).toHaveBeenCalled()
   })
 })
diff --git a/src/components/Connection/ExpiredConsentModal/ExpiredConsentModal.spec.tsx b/src/components/Connection/ExpiredConsentModal/ExpiredConsentModal.spec.tsx
index cf6cc0050..58c1ab6dc 100644
--- a/src/components/Connection/ExpiredConsentModal/ExpiredConsentModal.spec.tsx
+++ b/src/components/Connection/ExpiredConsentModal/ExpiredConsentModal.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import { FluidType } from 'enums'
 import React from 'react'
@@ -45,9 +45,11 @@ describe('ExpiredConsentModal component', () => {
         />
       </Provider>
     )
-    await userEvent.click(
-      screen.getByRole('button', { name: 'consent_outdated.go' })
-    )
+    await act(async () => {
+      await userEvent.click(
+        screen.getByRole('button', { name: 'consent_outdated.go' })
+      )
+    })
     expect(mockAppDispatch).toHaveBeenCalledTimes(1)
     expect(mockedNavigate).toHaveBeenCalledTimes(1)
   })
@@ -65,9 +67,11 @@ describe('ExpiredConsentModal component', () => {
         />
       </Provider>
     )
-    await userEvent.click(
-      screen.getByRole('button', { name: 'consent_outdated.go' })
-    )
+    await act(async () => {
+      await userEvent.click(
+        screen.getByRole('button', { name: 'consent_outdated.go' })
+      )
+    })
     expect(mockAppDispatch).toHaveBeenCalledTimes(1)
     expect(mockedNavigate).toHaveBeenCalledTimes(1)
   })
@@ -82,9 +86,11 @@ describe('ExpiredConsentModal component', () => {
         />
       </Provider>
     )
-    await userEvent.click(
-      screen.getByRole('button', { name: 'consent_outdated.later' })
-    )
+    await act(async () => {
+      await userEvent.click(
+        screen.getByRole('button', { name: 'consent_outdated.later' })
+      )
+    })
     expect(mockHandleCloseClick).toHaveBeenCalled()
   })
 })
diff --git a/src/components/Connection/SGEConnect/SgeInit.spec.tsx b/src/components/Connection/SGEConnect/SgeInit.spec.tsx
index 0346c8876..ce86c8ed7 100644
--- a/src/components/Connection/SGEConnect/SgeInit.spec.tsx
+++ b/src/components/Connection/SGEConnect/SgeInit.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -27,7 +27,9 @@ describe('SgeInit component', () => {
         <SgeInit />
       </Provider>
     )
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(mockedNavigate).toHaveBeenCalled()
   })
 })
diff --git a/src/components/Connection/SGEConnect/StepAddress.spec.tsx b/src/components/Connection/SGEConnect/StepAddress.spec.tsx
index d5aae6a3a..e7e1326c2 100644
--- a/src/components/Connection/SGEConnect/StepAddress.spec.tsx
+++ b/src/components/Connection/SGEConnect/StepAddress.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import { mockGlobalState } from 'tests/__mocks__/store'
@@ -30,14 +30,18 @@ describe('StepAddress component', () => {
       const input = screen.getByRole('textbox', {
         name: 'auth.enedissgegrandlyon.address',
       })
-      await userEvent.type(input, 't')
+      await act(async () => {
+        await userEvent.type(input, 't')
+      })
       expect(mockHandleChange).toHaveBeenCalledWith('address', 't')
     })
     it('should change zipCode value', async () => {
       const input = screen.getByRole('spinbutton', {
         name: 'auth.enedissgegrandlyon.zipCode',
       })
-      await userEvent.type(input, '0')
+      await act(async () => {
+        await userEvent.type(input, '0')
+      })
       expect(mockHandleChange).toHaveBeenCalledWith('zipCode', '0', 5)
     })
 
@@ -45,7 +49,9 @@ describe('StepAddress component', () => {
       const input = screen.getByRole('textbox', {
         name: 'auth.enedissgegrandlyon.city',
       })
-      await userEvent.type(input, 'c')
+      await act(async () => {
+        await userEvent.type(input, 'c')
+      })
       expect(mockHandleChange).toHaveBeenCalledWith('city', 'c')
     })
   })
diff --git a/src/components/Connection/SGEConnect/StepIdentityAndPdl.spec.tsx b/src/components/Connection/SGEConnect/StepIdentityAndPdl.spec.tsx
index afb9b5b39..833facf62 100644
--- a/src/components/Connection/SGEConnect/StepIdentityAndPdl.spec.tsx
+++ b/src/components/Connection/SGEConnect/StepIdentityAndPdl.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import React from 'react'
 import { mockGlobalState } from 'tests/__mocks__/store'
@@ -27,19 +27,25 @@ describe('StepIdentityAndPdl component', () => {
     const firstNameInput = screen.getByRole('textbox', {
       name: 'auth.enedissgegrandlyon.firstName',
     })
-    await userEvent.type(firstNameInput, 'n')
+    await act(async () => {
+      await userEvent.type(firstNameInput, 'n')
+    })
     expect(mockHandleChange).toHaveBeenCalledWith('firstName', 'n')
 
     const lastNameInput = screen.getByRole('textbox', {
       name: 'auth.enedissgegrandlyon.lastName',
     })
-    await userEvent.type(lastNameInput, 'n')
+    await act(async () => {
+      await userEvent.type(lastNameInput, 'n')
+    })
     expect(mockHandleChange).toHaveBeenCalledWith('lastName', 'n')
 
     const pdlInput = screen.getByRole('spinbutton', {
       name: 'auth.enedissgegrandlyon.pdlLabel',
     })
-    await userEvent.type(pdlInput, '0')
+    await act(async () => {
+      await userEvent.type(pdlInput, '0')
+    })
     expect(mockHandleChange).toHaveBeenCalledWith('pdl', '0', 14)
   })
 
@@ -53,7 +59,9 @@ describe('StepIdentityAndPdl component', () => {
     const pdlModalButton = screen.getByRole('button', {
       name: 'auth.enedissgegrandlyon.pdlModal.title',
     })
-    await userEvent.click(pdlModalButton)
+    await act(async () => {
+      await userEvent.click(pdlModalButton)
+    })
     expect(screen.getByRole('dialog')).toBeInTheDocument()
   })
 
diff --git a/src/components/ConsumptionVisualizer/DataloadNoValue.spec.tsx b/src/components/ConsumptionVisualizer/DataloadNoValue.spec.tsx
index 4545f197f..6994c6de2 100644
--- a/src/components/ConsumptionVisualizer/DataloadNoValue.spec.tsx
+++ b/src/components/ConsumptionVisualizer/DataloadNoValue.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import { DataloadState, FluidType } from 'enums'
 import React from 'react'
@@ -121,7 +121,9 @@ describe('DataloadNoValue component', () => {
         />
       </Provider>
     )
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(screen.getByRole('button'))
+    })
     expect(mockDispatch).toHaveBeenCalledWith({
       type: 'chart/setShowConnectionDetails',
       payload: true,
diff --git a/src/components/ConsumptionVisualizer/DataloadSectionValue.spec.tsx b/src/components/ConsumptionVisualizer/DataloadSectionValue.spec.tsx
index 4b9d037bb..d86e8db5d 100644
--- a/src/components/ConsumptionVisualizer/DataloadSectionValue.spec.tsx
+++ b/src/components/ConsumptionVisualizer/DataloadSectionValue.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import { DataloadSectionType, FluidType } from 'enums'
 import { Dataload } from 'models'
@@ -88,7 +88,9 @@ describe('DataloadSectionValue component', () => {
           toggleEstimationModal={mockToggleEstimationModal}
         />
       )
-      await userEvent.click(screen.getByRole('button'))
+      await act(async () => {
+        await userEvent.click(screen.getByRole('button'))
+      })
       expect(mockToggleEstimationModal).toHaveBeenCalled()
     })
   })
diff --git a/src/components/ConsumptionVisualizer/InfoDataConsumptionVisualizer.spec.tsx b/src/components/ConsumptionVisualizer/InfoDataConsumptionVisualizer.spec.tsx
index 5c2018b0b..d4aa9992c 100644
--- a/src/components/ConsumptionVisualizer/InfoDataConsumptionVisualizer.spec.tsx
+++ b/src/components/ConsumptionVisualizer/InfoDataConsumptionVisualizer.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import { DataloadState, FluidType } from 'enums'
 import { DateTime } from 'luxon'
@@ -199,7 +199,9 @@ describe('InfoDataConsumptionVisualizer component', () => {
         />
       </Provider>
     )
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(screen.getByRole('button'))
+    })
     expect(screen.getByRole('dialog')).toBeInTheDocument()
   })
 
@@ -214,7 +216,9 @@ describe('InfoDataConsumptionVisualizer component', () => {
         />
       </Provider>
     )
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(screen.getByRole('button'))
+    })
     expect(mockAppDispatch).toHaveBeenCalled()
   })
 })
diff --git a/src/components/CustomPopup/CustomPopupModal.spec.tsx b/src/components/CustomPopup/CustomPopupModal.spec.tsx
index 357565d45..5f3786a07 100644
--- a/src/components/CustomPopup/CustomPopupModal.spec.tsx
+++ b/src/components/CustomPopup/CustomPopupModal.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen, waitFor } from '@testing-library/react'
+import { act, render, screen, waitFor } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import React from 'react'
 import {
@@ -11,13 +11,14 @@ import CustomPopupModal from './CustomPopupModal'
 const mockHandleClose = jest.fn()
 
 describe('CustomPopupModal component', () => {
-  it('should render correctly', () => {
-    const { baseElement } = render(
+  it('should render correctly', async () => {
+    const { baseElement, container } = render(
       <CustomPopupModal
         customPopup={mockCustomPopup}
         handleCloseClick={mockHandleClose}
       />
     )
+    await waitFor(() => null, { container })
     expect(baseElement).toMatchSnapshot()
   })
 
@@ -36,24 +37,26 @@ describe('CustomPopupModal component', () => {
     expect(screen.getByRole('img')).toBeInTheDocument()
   })
 
-  it('should not be rendered, popup not enabled', () => {
-    render(
+  it('should not be rendered, popup not enabled', async () => {
+    const { container } = render(
       <CustomPopupModal
         customPopup={mockCustomPopupOff}
         handleCloseClick={mockHandleClose}
       />
     )
+    await waitFor(() => null, { container })
     const modal = screen.queryByTestId('title')
     expect(modal).not.toBeInTheDocument()
   })
 
-  it('should not be rendered, popup outdated', () => {
-    render(
+  it('should not be rendered, popup outdated', async () => {
+    const { container } = render(
       <CustomPopupModal
         customPopup={mockCustomPopupOutdated}
         handleCloseClick={mockHandleClose}
       />
     )
+    await waitFor(() => null, { container })
     const modal = screen.queryByTestId('title')
     expect(modal).not.toBeInTheDocument()
   })
@@ -65,9 +68,11 @@ describe('CustomPopupModal component', () => {
         handleCloseClick={mockHandleClose}
       />
     )
-    await userEvent.click(
-      screen.getByText('consumption.partner_issue_modal.ok')
-    )
+    await act(async () => {
+      await userEvent.click(
+        screen.getByText('consumption.partner_issue_modal.ok')
+      )
+    })
     expect(mockHandleClose).toHaveBeenCalled()
   })
 })
diff --git a/src/components/CustomPopup/__snapshots__/CustomPopupModal.spec.tsx.snap b/src/components/CustomPopup/__snapshots__/CustomPopupModal.spec.tsx.snap
index e14562314..eaf911248 100644
--- a/src/components/CustomPopup/__snapshots__/CustomPopupModal.spec.tsx.snap
+++ b/src/components/CustomPopup/__snapshots__/CustomPopupModal.spec.tsx.snap
@@ -71,7 +71,7 @@ exports[`CustomPopupModal component should render correctly 1`] = `
             width="100"
           >
             <use
-              xlink:href="#"
+              xlink:href="#test-file-stub"
             />
           </svg>
           <div
diff --git a/src/components/DateNavigator/DateNavigator.spec.tsx b/src/components/DateNavigator/DateNavigator.spec.tsx
index 1708d74e8..2ad781149 100644
--- a/src/components/DateNavigator/DateNavigator.spec.tsx
+++ b/src/components/DateNavigator/DateNavigator.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import { TimeStep } from 'enums'
 import { DateTime } from 'luxon'
@@ -45,10 +45,13 @@ describe('DateNavigator component', () => {
       />
     )
     const [prevIcon, nextIcon] = screen.getAllByRole('button')
-    await userEvent.click(prevIcon)
+    await act(async () => {
+      await userEvent.click(prevIcon)
+    })
     expect(mockHandlePrevDate).toHaveBeenCalledTimes(1)
-
-    await userEvent.click(nextIcon)
+    await act(async () => {
+      await userEvent.click(nextIcon)
+    })
     expect(mockHandleNextDate).toHaveBeenCalledTimes(1)
   })
 
diff --git a/src/components/Duel/DuelUnlocked/DuelUnlocked.spec.tsx b/src/components/Duel/DuelUnlocked/DuelUnlocked.spec.tsx
index 2020acbf2..60e1521ee 100644
--- a/src/components/Duel/DuelUnlocked/DuelUnlocked.spec.tsx
+++ b/src/components/Duel/DuelUnlocked/DuelUnlocked.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import { FluidType, UserChallengeUpdateFlag } from 'enums'
 import React from 'react'
@@ -38,7 +38,7 @@ describe('DuelUnlocked component', () => {
       screen.getByText(userChallengeData[1].duel.title)
     ).toBeInTheDocument()
     expect(screen.getByText(description)).toBeInTheDocument()
-    expect(screen.getByRole('button')).toBeInTheDocument()
+    expect(screen.getByText('duel.button_start')).toBeInTheDocument()
   })
 
   it('should update userChallenge when launching duel with configured fluid', async () => {
@@ -53,7 +53,9 @@ describe('DuelUnlocked component', () => {
         <DuelUnlocked userChallenge={userChallengeData[0]} />
       </Provider>
     )
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(screen.getByText('duel.button_start'))
+    })
     expect(mockUserChallengeUpdateFlag).toHaveBeenCalledWith(
       userChallengeData[0],
       UserChallengeUpdateFlag.DUEL_START
diff --git a/src/components/Ecogesture/EcogestureEmptyList/EcogestureEmptyList.spec.tsx b/src/components/Ecogesture/EcogestureEmptyList/EcogestureEmptyList.spec.tsx
index 700c11a8e..1c4a13ebe 100644
--- a/src/components/Ecogesture/EcogestureEmptyList/EcogestureEmptyList.spec.tsx
+++ b/src/components/Ecogesture/EcogestureEmptyList/EcogestureEmptyList.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import EcogestureEmptyList from './EcogestureEmptyList'
@@ -9,7 +9,6 @@ jest.mock('react-router-dom', () => ({
   useNavigate: () => mockedNavigate,
 }))
 const mockChangeTab = jest.fn()
-const mockHandleClick = jest.fn()
 
 describe('EcogestureEmptyList component', () => {
   it('should be rendered correctly', () => {
@@ -18,7 +17,7 @@ describe('EcogestureEmptyList component', () => {
         setTab={mockChangeTab}
         isObjective={true}
         isSelectionDone={false}
-        handleReinitClick={mockHandleClick}
+        handleReinitClick={jest.fn()}
       />
     )
     expect(container).toMatchSnapshot()
@@ -29,10 +28,12 @@ describe('EcogestureEmptyList component', () => {
         setTab={mockChangeTab}
         isObjective={false}
         isSelectionDone={true}
-        handleReinitClick={mockHandleClick}
+        handleReinitClick={jest.fn()}
       />
     )
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(mockChangeTab).toHaveBeenCalledTimes(1)
   })
   it('should launch ecogesture form', async () => {
@@ -41,10 +42,12 @@ describe('EcogestureEmptyList component', () => {
         setTab={mockChangeTab}
         isObjective={false}
         isSelectionDone={false}
-        handleReinitClick={mockHandleClick}
+        handleReinitClick={jest.fn()}
       />
     )
-    await userEvent.click(screen.getAllByRole('button')[1])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[1])
+    })
     expect(mockedNavigate).toHaveBeenCalledWith('/ecogesture-form')
   })
   it('should render doing text with empty list on completed selection', () => {
@@ -53,7 +56,7 @@ describe('EcogestureEmptyList component', () => {
         setTab={mockChangeTab}
         isObjective={false}
         isSelectionDone={true}
-        handleReinitClick={mockHandleClick}
+        handleReinitClick={jest.fn()}
       />
     )
     expect(
@@ -66,7 +69,7 @@ describe('EcogestureEmptyList component', () => {
         setTab={mockChangeTab}
         isObjective={true}
         isSelectionDone={true}
-        handleReinitClick={mockHandleClick}
+        handleReinitClick={jest.fn()}
       />
     )
     expect(
diff --git a/src/components/Ecogesture/EcogestureInitModal/EcogestureInitModal.spec.tsx b/src/components/Ecogesture/EcogestureInitModal/EcogestureInitModal.spec.tsx
index 6ff90feae..a2abc6d04 100644
--- a/src/components/Ecogesture/EcogestureInitModal/EcogestureInitModal.spec.tsx
+++ b/src/components/Ecogesture/EcogestureInitModal/EcogestureInitModal.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import EcogestureInitModal from './EcogestureInitModal'
@@ -24,7 +24,9 @@ describe('EcogestureInitModal component', () => {
         handleLaunchForm={mockHandleLaunchForm}
       />
     )
-    await userEvent.click(screen.getAllByRole('button')[2])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[2])
+    })
     expect(mockHandleClose).toHaveBeenCalledTimes(1)
   })
   it('should close modal and launch form', async () => {
@@ -35,7 +37,9 @@ describe('EcogestureInitModal component', () => {
         handleLaunchForm={mockHandleLaunchForm}
       />
     )
-    await userEvent.click(screen.getAllByRole('button')[1])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[1])
+    })
     expect(mockHandleLaunchForm).toHaveBeenCalledTimes(1)
   })
 })
diff --git a/src/components/Ecogesture/EcogestureList/EcogestureList.spec.tsx b/src/components/Ecogesture/EcogestureList/EcogestureList.spec.tsx
index b230d0fd1..6ffa54719 100644
--- a/src/components/Ecogesture/EcogestureList/EcogestureList.spec.tsx
+++ b/src/components/Ecogesture/EcogestureList/EcogestureList.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen, waitFor } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -48,7 +48,7 @@ describe('EcogesturesList component', () => {
   })
 
   it('should open the filter menu and select all ecogesture', async () => {
-    const { container } = render(
+    render(
       <Provider store={store}>
         <BrowserRouter>
           <EcogestureList
@@ -60,14 +60,17 @@ describe('EcogesturesList component', () => {
         </BrowserRouter>
       </Provider>
     )
-    await waitFor(() => null, { container })
-    await userEvent.click(screen.getAllByRole('button')[0])
-    await userEvent.click(screen.getAllByRole('menuitem')[1])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('menuitem')[1])
+    })
     expect(updateEcogestureFilter).toHaveBeenCalledTimes(1)
   })
 
   it('should go to "/ecogesture-selection"', async () => {
-    const { container } = render(
+    render(
       <Provider store={store}>
         <BrowserRouter>
           <EcogestureList
@@ -79,8 +82,9 @@ describe('EcogesturesList component', () => {
         </BrowserRouter>
       </Provider>
     )
-    await waitFor(() => null, { container })
-    await userEvent.click(screen.getAllByRole('button')[1])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[1])
+    })
     expect(mockedNavigate).toHaveBeenCalledWith('/ecogesture-selection')
   })
 })
diff --git a/src/components/Ecogesture/EcogestureNotFound/EcogestureNotFound.spec.tsx b/src/components/Ecogesture/EcogestureNotFound/EcogestureNotFound.spec.tsx
index 28d77f7ca..8edf29c77 100644
--- a/src/components/Ecogesture/EcogestureNotFound/EcogestureNotFound.spec.tsx
+++ b/src/components/Ecogesture/EcogestureNotFound/EcogestureNotFound.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import EcogestureNotFound from './EcogestureNotFound'
@@ -22,7 +22,9 @@ describe('EcogestureNotFound component', () => {
   })
   it('should click on button and be redirected', async () => {
     render(<EcogestureNotFound text="test" returnPage="ecogestures" />)
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(screen.getByRole('button'))
+    })
     expect(mockedNavigate).toHaveBeenCalledWith('/ecogestures')
   })
 })
diff --git a/src/components/Ecogesture/EcogestureTabsView.spec.tsx b/src/components/Ecogesture/EcogestureTabsView.spec.tsx
index e5dcabc9b..4dceb4a19 100644
--- a/src/components/Ecogesture/EcogestureTabsView.spec.tsx
+++ b/src/components/Ecogesture/EcogestureTabsView.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen, waitFor } from '@testing-library/react'
+import { act, render, screen, waitFor } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import EcogestureTabsView from 'components/Ecogesture/EcogestureTabsView'
 import { Ecogesture } from 'models'
@@ -70,27 +70,18 @@ describe('EcogestureView component', () => {
 
   it('should render ecogesture init modal', async () => {
     const updateProfileSpy = jest.spyOn(profileActions, 'updateProfile')
-
-    const { container } = render(
+    render(
       <Provider store={store}>
         <EcogestureTabsView />
       </Provider>
     )
-    await waitFor(() => null, { container })
     expect(screen.getByRole('dialog')).toBeInTheDocument()
-    await userEvent.click(screen.getAllByRole('button')[0])
+
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(updateProfileSpy).toHaveBeenCalledWith({
       haveSeenEcogestureModal: true,
     })
   })
-
-  it('should render empty list', async () => {
-    const { container } = render(
-      <Provider store={store}>
-        <EcogestureTabsView />
-      </Provider>
-    )
-    await waitFor(() => null, { container })
-    expect(container).toMatchSnapshot()
-  })
 })
diff --git a/src/components/Ecogesture/SingleEcogestureView.spec.tsx b/src/components/Ecogesture/SingleEcogestureView.spec.tsx
index 5f89c46a4..2d42b995b 100644
--- a/src/components/Ecogesture/SingleEcogestureView.spec.tsx
+++ b/src/components/Ecogesture/SingleEcogestureView.spec.tsx
@@ -24,6 +24,9 @@ jest.mock('services/ecogesture.service', () => {
 })
 
 describe('SingleEcogesture component', () => {
+  beforeEach(() => {
+    jest.clearAllMocks()
+  })
   const store = createMockEcolyoStore()
   it('should be rendered correctly', async () => {
     mockGetEcogesturesByIds.mockResolvedValue([mockedEcogesturesData[0]])
@@ -41,14 +44,14 @@ describe('SingleEcogesture component', () => {
     const updatedEcogesture = { ...mockedEcogesturesData[0], objective: true }
     mockUpdateEcogesture.mockResolvedValueOnce(updatedEcogesture)
 
-    const { container } = render(
+    render(
       <Provider store={store}>
         <SingleEcogestureView />
       </Provider>
     )
-    await waitFor(() => null, { container })
-    const [, objective] = screen.getAllByRole('button')
-    await userEvent.click(objective)
+    await waitFor(async () => {
+      await userEvent.click(screen.getByText('ecogesture.objective'))
+    })
     expect(mockUpdateEcogesture).toHaveBeenCalledWith(updatedEcogesture)
   })
 
@@ -57,28 +60,27 @@ describe('SingleEcogesture component', () => {
     const updatedEcogesture = { ...mockedEcogesturesData[0], doing: true }
     mockUpdateEcogesture.mockResolvedValueOnce(updatedEcogesture)
 
-    const { container } = render(
+    render(
       <Provider store={store}>
         <SingleEcogestureView />
       </Provider>
     )
-    await waitFor(() => null, { container })
-    const [, , doing] = screen.getAllByRole('button')
-    await userEvent.click(doing)
+    await waitFor(async () => {
+      await userEvent.click(screen.getByText('ecogesture.doing'))
+    })
     expect(mockUpdateEcogesture).toHaveBeenCalledWith(updatedEcogesture)
   })
 
   it('should toggle more details', async () => {
     mockGetEcogesturesByIds.mockResolvedValue([mockedEcogesturesData[0]])
-
-    const { container } = render(
+    render(
       <Provider store={store}>
         <SingleEcogestureView />
       </Provider>
     )
-    await waitFor(() => null, { container })
-    const [showMore] = screen.getAllByRole('button')
-    await userEvent.click(showMore)
+    await waitFor(async () => {
+      await userEvent.click(screen.getByText('ecogesture_modal.show_more'))
+    })
     expect(screen.getByText('ecogesture_modal.show_less')).toBeInTheDocument()
   })
 })
diff --git a/src/components/Ecogesture/__snapshots__/EcogestureTabsView.spec.tsx.snap b/src/components/Ecogesture/__snapshots__/EcogestureTabsView.spec.tsx.snap
index e3dd07024..7ccd15138 100644
--- a/src/components/Ecogesture/__snapshots__/EcogestureTabsView.spec.tsx.snap
+++ b/src/components/Ecogesture/__snapshots__/EcogestureTabsView.spec.tsx.snap
@@ -232,236 +232,3 @@ exports[`EcogestureView component should be rendered correctly with 3 clickable
   </mock-content>
 </div>
 `;
-
-exports[`EcogestureView component should render empty list 1`] = `
-<div
-  aria-hidden="true"
->
-  <mock-cozybar
-    titlekey="common.title_ecogestures"
-  />
-  <mock-header
-    desktoptitlekey="common.title_ecogestures"
-  >
-    <div
-      class="MuiTabs-root ecogestures-tabs"
-    >
-      <div
-        class="MuiTabs-scroller MuiTabs-fixed"
-        style="overflow: hidden;"
-      >
-        <div
-          aria-label="ecogestures-tabs"
-          class="MuiTabs-flexContainer MuiTabs-centered"
-          role="tablist"
-        >
-          <button
-            aria-controls="simple-tabpanel-0"
-            aria-selected="true"
-            class="MuiButtonBase-root MuiTab-root MuiTab-textColorInherit single-tab active Mui-selected"
-            id="simple-tab-0"
-            role="tab"
-            tabindex="0"
-            type="button"
-          >
-            <span
-              class="MuiTab-wrapper"
-            >
-              ecogesture.title_tab_0
-              <br />
-              (0)
-            </span>
-            <span
-              class="MuiTouchRipple-root"
-            />
-          </button>
-          <button
-            aria-controls="simple-tabpanel-1"
-            aria-selected="false"
-            class="MuiButtonBase-root MuiTab-root MuiTab-textColorInherit single-tab"
-            id="simple-tab-1"
-            role="tab"
-            tabindex="0"
-            type="button"
-          >
-            <span
-              class="MuiTab-wrapper"
-            >
-              ecogesture.title_tab_1
-              <br />
-              (2)
-            </span>
-            <span
-              class="MuiTouchRipple-root"
-            />
-          </button>
-          <button
-            aria-controls="simple-tabpanel-2"
-            aria-selected="false"
-            class="MuiButtonBase-root MuiTab-root MuiTab-textColorInherit single-tab"
-            id="simple-tab-2"
-            role="tab"
-            tabindex="0"
-            type="button"
-          >
-            <span
-              class="MuiTab-wrapper"
-            >
-              ecogesture.title_tab_2
-              <br />
-              (3)
-            </span>
-            <span
-              class="MuiTouchRipple-root"
-            />
-          </button>
-        </div>
-        <span
-          class="PrivateTabIndicator-root-9 PrivateTabIndicator-colorSecondary-11 indicator-tab"
-          style="left: 0px; width: 0px;"
-        />
-      </div>
-    </div>
-  </mock-header>
-  <mock-content>
-    <div
-      aria-labelledby="simple-tab-0"
-      id="simple-tabpanel-0"
-      role="tabpanel"
-    >
-      <div
-        class="ec-empty-container"
-      >
-        <div
-          class="ec-empty-content"
-        >
-          <svg
-            aria-hidden="true"
-            class="icon-big styles__icon___23x3R"
-            height="150"
-            width="150"
-          >
-            <use
-              xlink:href="#test-file-stub"
-            />
-          </svg>
-          <div
-            class="text-16-normal"
-          >
-            ecogesture.emptyList.obj1
-          </div>
-          <div
-            class="text-16-normal"
-          >
-            ecogesture.emptyList.obj2
-          </div>
-          <div
-            class="buttons"
-          >
-            <button
-              aria-label="ecogesture.emptyList.btn1"
-              class="MuiButtonBase-root MuiButton-root MuiButton-text btnSecondary"
-              tabindex="0"
-              type="button"
-            >
-              <span
-                class="MuiButton-label"
-              >
-                ecogesture.emptyList.btn1
-              </span>
-            </button>
-            <button
-              aria-label="ecogesture.emptyList.btn2"
-              class="MuiButtonBase-root MuiButton-root MuiButton-text btnPrimary"
-              tabindex="0"
-              type="button"
-            >
-              <span
-                class="MuiButton-label"
-              >
-                ecogesture.emptyList.btn2
-              </span>
-            </button>
-          </div>
-        </div>
-      </div>
-    </div>
-    <div
-      aria-labelledby="simple-tab-1"
-      hidden=""
-      id="simple-tabpanel-1"
-      role="tabpanel"
-    >
-      <div
-        class="ec-empty-container"
-      >
-        <div
-          class="ec-empty-content"
-        >
-          <svg
-            aria-hidden="true"
-            class="icon-big styles__icon___23x3R"
-            height="150"
-            width="150"
-          >
-            <use
-              xlink:href="#test-file-stub"
-            />
-          </svg>
-          <div
-            class="text-16-normal"
-          >
-            ecogesture.emptyList.doing1
-          </div>
-          <div
-            class="text-16-normal"
-          >
-            ecogesture.emptyList.doing2
-          </div>
-          <div
-            class="buttons"
-          >
-            <button
-              aria-label="ecogesture.emptyList.btn1"
-              class="MuiButtonBase-root MuiButton-root MuiButton-text btnSecondary"
-              tabindex="0"
-              type="button"
-            >
-              <span
-                class="MuiButton-label"
-              >
-                ecogesture.emptyList.btn1
-              </span>
-            </button>
-            <button
-              aria-label="ecogesture.emptyList.btn2"
-              class="MuiButtonBase-root MuiButton-root MuiButton-text btnPrimary"
-              tabindex="0"
-              type="button"
-            >
-              <span
-                class="MuiButton-label"
-              >
-                ecogesture.emptyList.btn2
-              </span>
-            </button>
-          </div>
-        </div>
-      </div>
-    </div>
-    <div
-      aria-labelledby="simple-tab-2"
-      hidden=""
-      id="simple-tabpanel-2"
-      role="tabpanel"
-    >
-      <mock-ecogesturelist
-        displayselection="false"
-        list="[object Object],[object Object],[object Object]"
-        selectiontotal="0"
-        selectionviewed="0"
-      />
-    </div>
-  </mock-content>
-</div>
-`;
diff --git a/src/components/EcogestureForm/EcogestureFormEquipment/EcogestureFormEquipment.spec.tsx b/src/components/EcogestureForm/EcogestureFormEquipment/EcogestureFormEquipment.spec.tsx
index 59dfa2b6d..2ad4b9d73 100644
--- a/src/components/EcogestureForm/EcogestureFormEquipment/EcogestureFormEquipment.spec.tsx
+++ b/src/components/EcogestureForm/EcogestureFormEquipment/EcogestureFormEquipment.spec.tsx
@@ -56,9 +56,7 @@ describe('EcogestureFormEquipment component', () => {
       container.getElementsByClassName('icons-container').length
     ).toBeTruthy()
     expect(
-      screen.getByRole('button', {
-        name: 'profile_type.accessibility.button_end',
-      })
+      screen.getByLabelText('profile_type.accessibility.button_end')
     ).toBeDisabled()
   })
 })
diff --git a/src/components/EcogestureForm/EcogestureFormSingleChoice/EcogestureFormSingleChoice.spec.tsx b/src/components/EcogestureForm/EcogestureFormSingleChoice/EcogestureFormSingleChoice.spec.tsx
index b7e89d07d..23585af98 100644
--- a/src/components/EcogestureForm/EcogestureFormSingleChoice/EcogestureFormSingleChoice.spec.tsx
+++ b/src/components/EcogestureForm/EcogestureFormSingleChoice/EcogestureFormSingleChoice.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -50,7 +50,9 @@ describe('EcogestureFormSingleChoice component', () => {
     )
     await userEvent.click(screen.getAllByRole('radio')[0])
     const [, next] = screen.getAllByRole('button')
-    await userEvent.click(next)
+    await act(async () => {
+      await userEvent.click(next)
+    })
     expect(mockHandleNextStep).toHaveBeenCalledTimes(1)
   })
   it('should go back', async () => {
@@ -67,7 +69,9 @@ describe('EcogestureFormSingleChoice component', () => {
       </Provider>
     )
     const [prev] = screen.getAllByRole('button')
-    await userEvent.click(prev)
+    await act(async () => {
+      await userEvent.click(prev)
+    })
     expect(mockHandlePreviousStep).toHaveBeenCalledTimes(1)
   })
   it('should keep previous answer', async () => {
diff --git a/src/components/EcogestureForm/EcogestureFormView.spec.tsx b/src/components/EcogestureForm/EcogestureFormView.spec.tsx
index 501a60176..32c980399 100644
--- a/src/components/EcogestureForm/EcogestureFormView.spec.tsx
+++ b/src/components/EcogestureForm/EcogestureFormView.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -69,9 +69,10 @@ describe('EcogestureFormView component', () => {
         <EcogestureFormView />
       </Provider>
     )
-    // await waitFor(() => null, { container })
-    await userEvent.click(screen.getAllByRole('radio')[0])
-    await userEvent.click(screen.getAllByRole('button')[1])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('radio')[0])
+      await userEvent.click(screen.getAllByRole('button')[1])
+    })
     expect(
       container.getElementsByClassName('ecogesture-form-single').length
     ).toBeTruthy()
@@ -84,8 +85,10 @@ describe('EcogestureFormView component', () => {
     )
 
     const [, next] = screen.getAllByRole('button')
-    await userEvent.click(screen.getAllByRole('radio')[0])
-    await userEvent.click(next)
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('radio')[0])
+      await userEvent.click(next)
+    })
 
     expect(
       container.getElementsByClassName('ecogesture-form-single').length
diff --git a/src/components/EcogestureForm/EcogestureLaunchFormModal/EcogestureLaunchFormModal.spec.tsx b/src/components/EcogestureForm/EcogestureLaunchFormModal/EcogestureLaunchFormModal.spec.tsx
index be8c6d25e..91b74191f 100644
--- a/src/components/EcogestureForm/EcogestureLaunchFormModal/EcogestureLaunchFormModal.spec.tsx
+++ b/src/components/EcogestureForm/EcogestureLaunchFormModal/EcogestureLaunchFormModal.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import EcogestureLaunchFormModal from './EcogestureLaunchFormModal'
@@ -21,7 +21,9 @@ describe('EcogestureLaunchFormModal component', () => {
         handleCloseClick={mockHandleClose}
       />
     )
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(mockHandleClose).toHaveBeenCalledTimes(1)
   })
 })
diff --git a/src/components/EcogestureSelection/EcogestureSelectionDetail/EcogestureSelectionDetail.spec.tsx b/src/components/EcogestureSelection/EcogestureSelectionDetail/EcogestureSelectionDetail.spec.tsx
index 4f5261c87..b46581bdb 100644
--- a/src/components/EcogestureSelection/EcogestureSelectionDetail/EcogestureSelectionDetail.spec.tsx
+++ b/src/components/EcogestureSelection/EcogestureSelectionDetail/EcogestureSelectionDetail.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen, waitFor } from '@testing-library/react'
+import { act, render, screen, waitFor } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import { mockedEcogesturesData } from 'tests/__mocks__/ecogesturesData.mock'
@@ -34,24 +34,32 @@ describe('EcogestureSelectionDetail component', () => {
 
     it('should toggle more details', async () => {
       const [showMore] = screen.getAllByRole('button')
-      await userEvent.click(showMore)
+      await act(async () => {
+        await userEvent.click(showMore)
+      })
       expect(screen.getByText('ecogesture_modal.show_less')).toBeInTheDocument()
     })
     it('should call validate with objective to true', async () => {
       const [, objective] = screen.getAllByRole('button')
-      await userEvent.click(objective)
+      await act(async () => {
+        await userEvent.click(objective)
+      })
       expect(mockValidate).toHaveBeenCalledWith(true, false)
     })
 
     it('should call validate with doing to true', async () => {
       const [, , doing] = screen.getAllByRole('button')
-      await userEvent.click(doing)
+      await act(async () => {
+        await userEvent.click(doing)
+      })
       expect(mockValidate).toHaveBeenCalledWith(false, true)
     })
 
     it('should call validate with objective and doing to false', async () => {
       const [, , , skip] = screen.getAllByRole('button')
-      await userEvent.click(skip)
+      await act(async () => {
+        await userEvent.click(skip)
+      })
       expect(mockValidate).toHaveBeenCalledWith(false, false)
     })
   })
diff --git a/src/components/EcogestureSelection/EcogestureSelectionEnd/EcogestureSelectionEnd.spec.tsx b/src/components/EcogestureSelection/EcogestureSelectionEnd/EcogestureSelectionEnd.spec.tsx
index bcf32fb5e..fa12c6b0f 100644
--- a/src/components/EcogestureSelection/EcogestureSelectionEnd/EcogestureSelectionEnd.spec.tsx
+++ b/src/components/EcogestureSelection/EcogestureSelectionEnd/EcogestureSelectionEnd.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import EcogestureSelectionEnd from './EcogestureSelectionEnd'
@@ -21,7 +21,9 @@ describe('EcogestureSelectionEnd component', () => {
 
   it('should close modal and update profile', async () => {
     render(<EcogestureSelectionEnd />)
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(screen.getByRole('button'))
+    })
     expect(mockedNavigate).toHaveBeenCalledWith('/ecogestures?tab=0')
   })
 })
diff --git a/src/components/EcogestureSelection/EcogestureSelectionModal/EcogestureSelectionModal.spec.tsx b/src/components/EcogestureSelection/EcogestureSelectionModal/EcogestureSelectionModal.spec.tsx
index 11801f5c9..816790dae 100644
--- a/src/components/EcogestureSelection/EcogestureSelectionModal/EcogestureSelectionModal.spec.tsx
+++ b/src/components/EcogestureSelection/EcogestureSelectionModal/EcogestureSelectionModal.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import React from 'react'
 import EcogestureSelectionModal from './EcogestureSelectionModal'
@@ -22,7 +22,9 @@ describe('EcogestureInitModal component', () => {
         handleCloseClick={mockHandleClose}
       />
     )
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(mockHandleClose).toHaveBeenCalledTimes(1)
   })
 })
diff --git a/src/components/EcogestureSelection/EcogestureSelectionRestart/EcogestureSelectionRestart.spec.tsx b/src/components/EcogestureSelection/EcogestureSelectionRestart/EcogestureSelectionRestart.spec.tsx
index 0a5e78b16..6512e87b6 100644
--- a/src/components/EcogestureSelection/EcogestureSelectionRestart/EcogestureSelectionRestart.spec.tsx
+++ b/src/components/EcogestureSelection/EcogestureSelectionRestart/EcogestureSelectionRestart.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import React from 'react'
 import EcogestureSelectionRestart from './EcogestureSelectionRestart'
@@ -20,13 +20,17 @@ describe('EcogestureSelectionRestart component', () => {
 
   it('should call go to the ecogesture view when user click on the button', async () => {
     render(<EcogestureSelectionRestart listLength={10} restart={mockRestart} />)
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(mockedNavigate).toHaveBeenCalledWith('/ecogestures?tab=0')
   })
 
   it('should call the restart when user click on the button', async () => {
     render(<EcogestureSelectionRestart listLength={10} restart={mockRestart} />)
-    await userEvent.click(screen.getAllByRole('button')[1])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[1])
+    })
     expect(mockRestart).toHaveBeenCalledTimes(1)
   })
 })
diff --git a/src/components/Exploration/ExplorationFinished.spec.tsx b/src/components/Exploration/ExplorationFinished.spec.tsx
index 132eae243..903d26852 100644
--- a/src/components/Exploration/ExplorationFinished.spec.tsx
+++ b/src/components/Exploration/ExplorationFinished.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -26,7 +26,9 @@ describe('ExplorationFinished', () => {
     expect(
       screen.getByText(userChallengeData[0].exploration.message_success)
     ).toBeInTheDocument()
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(screen.getByRole('button'))
+    })
     expect(mockNavigate).toHaveBeenCalledWith(-1)
   })
 })
diff --git a/src/components/Feedback/FeedbackModal.spec.tsx b/src/components/Feedback/FeedbackModal.spec.tsx
index 192d36b49..d1ab681bc 100644
--- a/src/components/Feedback/FeedbackModal.spec.tsx
+++ b/src/components/Feedback/FeedbackModal.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import FeedbackModal from 'components/Feedback/FeedbackModal'
 import React from 'react'
@@ -38,7 +38,9 @@ describe('FeedbackModal component', () => {
         <FeedbackModal />
       </Provider>
     )
-    await userEvent.click(screen.getAllByRole('button')[2])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[2])
+    })
     expect(window.open).toHaveBeenCalledTimes(1)
     expect(global.open).toHaveBeenCalledWith(`${__SAU_LINK__}?version=0.0.0`)
   })
diff --git a/src/components/FluidChart/TimeStepSelector/TimeStepSelector.spec.tsx b/src/components/FluidChart/TimeStepSelector/TimeStepSelector.spec.tsx
index 60ddf0fed..1492e2a2c 100644
--- a/src/components/FluidChart/TimeStepSelector/TimeStepSelector.spec.tsx
+++ b/src/components/FluidChart/TimeStepSelector/TimeStepSelector.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import TimeStepSelector from 'components/FluidChart/TimeStepSelector/TimeStepSelector'
 import { FluidType, TimeStep } from 'enums'
@@ -66,7 +66,9 @@ describe('TimeStepSelector component', () => {
         <TimeStepSelector fluidType={FluidType.WATER} />
       </Provider>
     )
-    await userEvent.click(screen.getAllByRole('listitem')[2])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('listitem')[2])
+    })
     expect(setCurrentTimeStepSpy).toHaveBeenCalledTimes(1)
     expect(setCurrentTimeStepSpy).toHaveBeenCalledWith(TimeStep.DAY)
     expect(setCurrentIndexSpy).toHaveBeenCalledTimes(1)
@@ -85,7 +87,9 @@ describe('TimeStepSelector component', () => {
         <TimeStepSelector fluidType={FluidType.WATER} />
       </Provider>
     )
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(setCurrentTimeStepSpy).toHaveBeenCalledTimes(1)
     expect(setCurrentTimeStepSpy).toHaveBeenCalledWith(TimeStep.WEEK)
     expect(setCurrentIndexSpy).toHaveBeenCalledTimes(1)
diff --git a/src/components/Header/CozyBar.spec.tsx b/src/components/Header/CozyBar.spec.tsx
index 3f747796d..4686fce25 100644
--- a/src/components/Header/CozyBar.spec.tsx
+++ b/src/components/Header/CozyBar.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import CozyBar from 'components/Header/CozyBar'
 import { ScreenType } from 'enums'
@@ -44,7 +44,9 @@ describe('CozyBar component', () => {
         </Provider>
       )
       expect(container).toMatchSnapshot()
-      await userEvent.click(screen.getAllByRole('button')[0])
+      await act(async () => {
+        await userEvent.click(screen.getAllByRole('button')[0])
+      })
       expect(mockedNavigate).toHaveBeenCalled()
     })
 
@@ -56,7 +58,9 @@ describe('CozyBar component', () => {
         </Provider>
       )
       expect(container).toMatchSnapshot()
-      await userEvent.click(screen.getAllByRole('button')[0])
+      await act(async () => {
+        await userEvent.click(screen.getAllByRole('button')[0])
+      })
       expect(mockBackFunction).toHaveBeenCalled()
     })
   })
@@ -68,7 +72,9 @@ describe('CozyBar component', () => {
       </Provider>
     )
     const updateModalSpy = jest.spyOn(ModalAction, 'openFeedbackModal')
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(screen.getByRole('button'))
+    })
     expect(updateModalSpy).toHaveBeenCalledWith(true)
   })
 
diff --git a/src/components/Header/Header.spec.tsx b/src/components/Header/Header.spec.tsx
index 89b692b1e..60d6586be 100644
--- a/src/components/Header/Header.spec.tsx
+++ b/src/components/Header/Header.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import Header from 'components/Header/Header'
 import React from 'react'
@@ -56,7 +56,9 @@ describe('Header component', () => {
           <Header desktopTitleKey="KEY" displayBackArrow={true} />
         </Provider>
       )
-      await userEvent.click(screen.getAllByRole('button')[0])
+      await act(async () => {
+        await userEvent.click(screen.getAllByRole('button')[0])
+      })
       expect(mockedNavigate).toHaveBeenCalled()
     })
     it('should call custom back fn when back button is clicked', async () => {
@@ -70,7 +72,9 @@ describe('Header component', () => {
           />
         </Provider>
       )
-      await userEvent.click(screen.getAllByRole('button')[0])
+      await act(async () => {
+        await userEvent.click(screen.getAllByRole('button')[0])
+      })
       expect(mockBack).toHaveBeenCalled()
     })
   })
@@ -82,7 +86,9 @@ describe('Header component', () => {
       </Provider>
     )
     const updateModalSpy = jest.spyOn(ModalAction, 'openFeedbackModal')
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(updateModalSpy).toHaveBeenCalledWith(true)
   })
 })
diff --git a/src/components/Konnector/ConnectionNotFound/ConnectionNotFound.spec.tsx b/src/components/Konnector/ConnectionNotFound/ConnectionNotFound.spec.tsx
index 1d4cf06cb..14ae6c3e8 100644
--- a/src/components/Konnector/ConnectionNotFound/ConnectionNotFound.spec.tsx
+++ b/src/components/Konnector/ConnectionNotFound/ConnectionNotFound.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import ConnectionNotFound from './ConnectionNotFound'
@@ -16,8 +16,9 @@ describe('ConnectionNotFound component test', () => {
   it('should open konnector url when button is clicked', async () => {
     global.open = jest.fn()
     render(<ConnectionNotFound konnectorSlug={konnectorSlug} />)
-    await userEvent.click(screen.getByRole('button'))
-
+    await act(async () => {
+      await userEvent.click(screen.getByRole('button'))
+    })
     expect(global.open).toHaveBeenCalledWith(
       'http://localhost/#/discover/enedissgegrandlyon',
       '_blank'
diff --git a/src/components/Konnector/KonnectorModal.spec.tsx b/src/components/Konnector/KonnectorModal.spec.tsx
index 306d498d7..f453c7ea5 100644
--- a/src/components/Konnector/KonnectorModal.spec.tsx
+++ b/src/components/Konnector/KonnectorModal.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import { FluidType, KonnectorError } from 'enums'
 import React from 'react'
@@ -67,7 +67,9 @@ describe('KonnectorModal component', () => {
         />
       </Provider>
     )
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(screen.getByRole('button'))
+    })
     expect(mockHandleCloseClick).toHaveBeenCalled()
   })
   it('should render login error', async () => {
diff --git a/src/components/Konnector/KonnectorModalFooter.spec.tsx b/src/components/Konnector/KonnectorModalFooter.spec.tsx
index 60d45605a..4b926d096 100644
--- a/src/components/Konnector/KonnectorModalFooter.spec.tsx
+++ b/src/components/Konnector/KonnectorModalFooter.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import { ERROR_EVENT } from 'cozy-harvest-lib/dist/models/flowEvents'
 import { KonnectorError } from 'enums'
@@ -105,7 +105,9 @@ describe('KonnectorModalFooter component', () => {
         />
       </Provider>
     )
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(screen.getByRole('button'))
+    })
     expect(mockClose).toHaveBeenCalled()
   })
   it('should go back to login', async () => {
@@ -121,7 +123,9 @@ describe('KonnectorModalFooter component', () => {
         />
       </Provider>
     )
-    await userEvent.click(screen.getAllByRole('button')[1])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[1])
+    })
     expect(mockDelete).toHaveBeenCalled()
     expect(mockedNavigate).toHaveBeenCalledTimes(1)
   })
@@ -138,7 +142,9 @@ describe('KonnectorModalFooter component', () => {
         />
       </Provider>
     )
-    await userEvent.click(screen.getAllByRole('button')[1])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[1])
+    })
     expect(mockDelete).toHaveBeenCalled()
     expect(mockedNavigate).toHaveBeenCalledTimes(1)
   })
@@ -155,7 +161,9 @@ describe('KonnectorModalFooter component', () => {
         />
       </Provider>
     )
-    await userEvent.click(screen.getAllByRole('button')[1])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[1])
+    })
     expect(mockedNavigate).toHaveBeenCalledTimes(1)
     expect(mockDelete).toHaveBeenCalledTimes(0)
   })
diff --git a/src/components/Konnector/KonnectorViewerList.spec.tsx b/src/components/Konnector/KonnectorViewerList.spec.tsx
index 810bd21bb..19b4ed1c4 100644
--- a/src/components/Konnector/KonnectorViewerList.spec.tsx
+++ b/src/components/Konnector/KonnectorViewerList.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -28,7 +28,9 @@ describe('KonnectorViewerList component', () => {
         <KonnectorViewerList />
       </Provider>
     )
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(mockedNavigate).toHaveBeenCalled()
   })
 })
diff --git a/src/components/Options/ExportData/Modals/exportDoneModal.spec.tsx b/src/components/Options/ExportData/Modals/exportDoneModal.spec.tsx
index dc0bd5588..c1641e0cf 100644
--- a/src/components/Options/ExportData/Modals/exportDoneModal.spec.tsx
+++ b/src/components/Options/ExportData/Modals/exportDoneModal.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import React from 'react'
 import ExportDoneModal from './exportDoneModal'
@@ -27,7 +27,9 @@ describe('exportDoneModal component', () => {
         handleCloseClick={mockHandleClose}
       />
     )
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(mockHandleClose).toHaveBeenCalledTimes(1)
   })
 })
diff --git a/src/components/Options/ExportData/Modals/exportLoadingModal.spec.tsx b/src/components/Options/ExportData/Modals/exportLoadingModal.spec.tsx
index 06371f31a..3adc903b9 100644
--- a/src/components/Options/ExportData/Modals/exportLoadingModal.spec.tsx
+++ b/src/components/Options/ExportData/Modals/exportLoadingModal.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import { allFluids } from 'utils/utils'
@@ -27,7 +27,9 @@ describe('ExportLoadingModal component', () => {
         selectedFluids={allFluids}
       />
     )
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(mockHandleClose).toHaveBeenCalledTimes(1)
   })
 })
diff --git a/src/components/Options/ExportData/Modals/exportStartModal.spec.tsx b/src/components/Options/ExportData/Modals/exportStartModal.spec.tsx
index 36a16b1b1..05e7e8aa8 100644
--- a/src/components/Options/ExportData/Modals/exportStartModal.spec.tsx
+++ b/src/components/Options/ExportData/Modals/exportStartModal.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import React from 'react'
 import ExportStartModal from './exportStartModal'
@@ -24,7 +24,9 @@ describe('exportStartModal component', () => {
         handleDownloadClick={jest.fn()}
       />
     )
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(mockHandleClose).toHaveBeenCalledTimes(1)
   })
 })
diff --git a/src/components/Options/ProfileTypeOptions/ProfileTypeOptions.spec.tsx b/src/components/Options/ProfileTypeOptions/ProfileTypeOptions.spec.tsx
index e5c67e980..a7b953d89 100644
--- a/src/components/Options/ProfileTypeOptions/ProfileTypeOptions.spec.tsx
+++ b/src/components/Options/ProfileTypeOptions/ProfileTypeOptions.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import ProfileTypeOptions from 'components/Options/ProfileTypeOptions/ProfileTypeOptions'
 import {
@@ -31,7 +31,9 @@ describe('ProfileTypeOptions component', () => {
       </Provider>
     )
     expect(container.getElementsByClassName('profile-icon').length).toBeTruthy()
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(screen.getByRole('button'))
+    })
     expect(mockedNavigate).toHaveBeenCalled()
   })
   it('should be rendered when user complete profile type form', () => {
diff --git a/src/components/Options/ReportOptions/ReportOptions.spec.tsx b/src/components/Options/ReportOptions/ReportOptions.spec.tsx
index 008e75540..14752d0b2 100644
--- a/src/components/Options/ReportOptions/ReportOptions.spec.tsx
+++ b/src/components/Options/ReportOptions/ReportOptions.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import ReportOptions from 'components/Options/ReportOptions/ReportOptions'
 import React from 'react'
@@ -41,7 +41,9 @@ describe('ReportOptions component', () => {
         <ReportOptions />
       </Provider>
     )
-    await userEvent.click(screen.getAllByRole('checkbox')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('checkbox')[0])
+    })
     expect(updateProfileSpy).toHaveBeenCalledTimes(1)
     expect(updateProfileSpy).toHaveBeenCalledWith({
       sendAnalysisNotification: false,
@@ -57,7 +59,9 @@ describe('ReportOptions component', () => {
         <ReportOptions />
       </Provider>
     )
-    await userEvent.click(screen.getAllByRole('checkbox')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('checkbox')[0])
+    })
     expect(updateProfileSpy).toHaveBeenCalledTimes(1)
     expect(updateProfileSpy).toHaveBeenCalledWith({
       sendAnalysisNotification: true,
@@ -76,7 +80,9 @@ describe('ReportOptions component', () => {
         </Provider>
       )
       expect(screen.getAllByRole('checkbox')[1]).not.toBeChecked()
-      await userEvent.click(screen.getAllByRole('checkbox')[1])
+      await act(async () => {
+        await userEvent.click(screen.getAllByRole('checkbox')[1])
+      })
       expect(updateProfileSpy).toHaveBeenCalledTimes(1)
       expect(updateProfileSpy).toHaveBeenCalledWith({
         sendConsumptionAlert: true,
diff --git a/src/components/Options/Unsubscribe/Unsubscribe.spec.tsx b/src/components/Options/Unsubscribe/Unsubscribe.spec.tsx
index a014ff8cb..6586523d7 100644
--- a/src/components/Options/Unsubscribe/Unsubscribe.spec.tsx
+++ b/src/components/Options/Unsubscribe/Unsubscribe.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen, waitFor } from '@testing-library/react'
+import { act, render, screen, waitFor } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import Unsubscribe from './Unsubscribe'
@@ -21,7 +21,9 @@ describe('Unsubscribe component', () => {
     const { container } = render(<Unsubscribe />)
     await waitFor(() => null, { container })
     const [subscribeBtn] = screen.getAllByRole('button')
-    await userEvent.click(subscribeBtn)
+    await act(async () => {
+      await userEvent.click(subscribeBtn)
+    })
     expect(mockUpdateProfile).toHaveBeenCalled()
 
     // then should only display one button
diff --git a/src/components/PartnerIssue/PartnerIssueModal.spec.tsx b/src/components/PartnerIssue/PartnerIssueModal.spec.tsx
index be3c84076..5a3967476 100644
--- a/src/components/PartnerIssue/PartnerIssueModal.spec.tsx
+++ b/src/components/PartnerIssue/PartnerIssueModal.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import { FluidType } from 'enums'
 import React from 'react'
@@ -49,7 +49,9 @@ describe('PartnerIssueModal component', () => {
         issuedFluid={FluidType.ELECTRICITY}
       />
     )
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(mockHandleClose).toHaveBeenCalled()
   })
 
diff --git a/src/components/ProfileType/ProfileTypeFinished/ProfileTypeFinished.spec.tsx b/src/components/ProfileType/ProfileTypeFinished/ProfileTypeFinished.spec.tsx
index 402a3a0bf..03c6f736f 100644
--- a/src/components/ProfileType/ProfileTypeFinished/ProfileTypeFinished.spec.tsx
+++ b/src/components/ProfileType/ProfileTypeFinished/ProfileTypeFinished.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -45,7 +45,9 @@ describe('ProfileTypeFinished component', () => {
         <ProfileTypeFinished profileType={mockProfileType} />
       </Provider>
     )
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(mockedNavigate).toHaveBeenCalledWith('/ecogesture-selection')
   })
 })
diff --git a/src/components/Quiz/QuizBegin/QuizBegin.spec.tsx b/src/components/Quiz/QuizBegin/QuizBegin.spec.tsx
index aa5330b3c..8b3ffacff 100644
--- a/src/components/Quiz/QuizBegin/QuizBegin.spec.tsx
+++ b/src/components/Quiz/QuizBegin/QuizBegin.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import { UserChallengeUpdateFlag } from 'enums'
 import React from 'react'
@@ -23,7 +23,9 @@ describe('QuizBegin component', () => {
       </Provider>
     )
     expect(container.getElementsByClassName('quiz-icon')[0]).toBeInTheDocument()
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(screen.getByRole('button'))
+    })
     expect(mockUserChallengeUpdateFlag).toHaveBeenCalledWith(
       userChallengeData[0],
       UserChallengeUpdateFlag.QUIZ_START
diff --git a/src/components/Quiz/QuizFinish/QuizFinish.spec.tsx b/src/components/Quiz/QuizFinish/QuizFinish.spec.tsx
index 8b2dc272d..75761dee6 100644
--- a/src/components/Quiz/QuizFinish/QuizFinish.spec.tsx
+++ b/src/components/Quiz/QuizFinish/QuizFinish.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -28,7 +28,9 @@ describe('QuizFinish', () => {
       </Provider>
     )
     expect(container.getElementsByClassName('quiz-icon')[0]).toBeInTheDocument()
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(mockUserChallengeUpdateFlag).toHaveBeenCalled()
     expect(mockedNavigate).toHaveBeenCalledWith('/challenges')
   })
diff --git a/src/components/Quiz/QuizQuestion/QuizQuestionContent.spec.tsx b/src/components/Quiz/QuizQuestion/QuizQuestionContent.spec.tsx
index aa80b5f09..707db20c9 100644
--- a/src/components/Quiz/QuizQuestion/QuizQuestionContent.spec.tsx
+++ b/src/components/Quiz/QuizQuestion/QuizQuestionContent.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -51,7 +51,9 @@ describe('QuizQuestionContent component', () => {
         />
       </Provider>
     )
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(mockedNavigate).toHaveBeenCalledWith('/challenges')
   })
 })
diff --git a/src/components/Quiz/QuizQuestion/QuizQuestionContentCustom.spec.tsx b/src/components/Quiz/QuizQuestion/QuizQuestionContentCustom.spec.tsx
index 12809ef89..818bded68 100644
--- a/src/components/Quiz/QuizQuestion/QuizQuestionContentCustom.spec.tsx
+++ b/src/components/Quiz/QuizQuestion/QuizQuestionContentCustom.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -42,7 +42,9 @@ describe('QuizCustomQuestionContent component', () => {
         />
       </Provider>
     )
-    await userEvent.click(screen.getAllByRole('button')[0])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('button')[0])
+    })
     expect(mockHistoryPush).toHaveBeenCalledWith('/challenges')
     expect(screen.getByText(questionEntity.questionLabel)).toBeInTheDocument()
     expect(screen.getAllByRole('radio').length).toBe(3)
@@ -73,8 +75,10 @@ describe('QuizCustomQuestionContent component', () => {
         />
       </Provider>
     )
-    await userEvent.click(screen.getAllByRole('radio')[0])
-    await userEvent.click(screen.getAllByRole('button')[1])
+    await act(async () => {
+      await userEvent.click(screen.getAllByRole('radio')[0])
+      await userEvent.click(screen.getAllByRole('button')[1])
+    })
     expect(mockUpdateUserQuiz).toHaveBeenCalledWith(
       userChallengeData[0].quiz,
       questionEntity.answers[0].isTrue
diff --git a/src/components/Splash/SplashRoot.spec.tsx b/src/components/Splash/SplashRoot.spec.tsx
index a948480c9..3f57b513a 100644
--- a/src/components/Splash/SplashRoot.spec.tsx
+++ b/src/components/Splash/SplashRoot.spec.tsx
@@ -1,5 +1,4 @@
-import { render, screen, waitFor } from '@testing-library/react'
-import { userEvent } from '@testing-library/user-event'
+import { render, waitFor } from '@testing-library/react'
 import React from 'react'
 import { Provider } from 'react-redux'
 import { createMockEcolyoStore } from 'tests/__mocks__/store'
@@ -22,7 +21,7 @@ describe('SplashRoot component', () => {
     expect(container).toMatchSnapshot()
   })
 
-  it('should render the error screen and click on the reload button', async () => {
+  it('should render the error screen', async () => {
     const { container } = render(
       <Provider store={store}>
         <SplashRoot>children</SplashRoot>
@@ -30,6 +29,5 @@ describe('SplashRoot component', () => {
     )
     await waitFor(() => null, { container })
     expect(container).toMatchSnapshot()
-    await userEvent.click(screen.getByRole('button'))
   })
 })
diff --git a/src/components/Splash/SplashScreenError.spec.tsx b/src/components/Splash/SplashScreenError.spec.tsx
index fdc4e5fa5..2aefa0711 100644
--- a/src/components/Splash/SplashScreenError.spec.tsx
+++ b/src/components/Splash/SplashScreenError.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import { userEvent } from '@testing-library/user-event'
 import { InitStepsErrors } from 'models/initialisationSteps.model'
 import React from 'react'
@@ -24,7 +24,9 @@ describe('SplashScreenError component', () => {
   })
   it('should reload the page', async () => {
     render(<SplashScreenError error={InitStepsErrors.CONSENT_ERROR} />)
-    await userEvent.click(screen.getByRole('button'))
+    await act(async () => {
+      await userEvent.click(screen.getByRole('button'))
+    })
     expect(window.location.reload).toHaveBeenCalled()
   })
 })
diff --git a/src/components/Splash/__snapshots__/SplashRoot.spec.tsx.snap b/src/components/Splash/__snapshots__/SplashRoot.spec.tsx.snap
index 4addaf3b6..d2a67d764 100644
--- a/src/components/Splash/__snapshots__/SplashRoot.spec.tsx.snap
+++ b/src/components/Splash/__snapshots__/SplashRoot.spec.tsx.snap
@@ -50,7 +50,7 @@ exports[`SplashRoot component should be rendered correctly 1`] = `
 </div>
 `;
 
-exports[`SplashRoot component should render the error screen and click on the reload button 1`] = `
+exports[`SplashRoot component should render the error screen 1`] = `
 <div>
   <div
     class="splash-root"
diff --git a/src/components/Terms/TermsView.spec.tsx b/src/components/Terms/TermsView.spec.tsx
index 037b93924..8d4ae3d90 100644
--- a/src/components/Terms/TermsView.spec.tsx
+++ b/src/components/Terms/TermsView.spec.tsx
@@ -54,11 +54,13 @@ describe('TermsView component', () => {
     expect(mockUpdateProfile).toHaveBeenCalledTimes(0)
 
     const [boxGCU, boxLegal] = screen.getAllByRole('checkbox')
-    await userEvent.click(boxGCU)
-    await userEvent.click(boxLegal)
-    await userEvent.click(acceptButton)
+    await act(async () => {
+      await userEvent.click(boxGCU)
+      await userEvent.click(boxLegal)
+      await userEvent.click(acceptButton)
+    })
 
-    expect(mockAppDispatch).toHaveBeenCalledTimes(4)
+    expect(mockAppDispatch).toHaveBeenCalledTimes(3)
   })
 
   it('should open CGU modal', async () => {
diff --git a/src/components/WelcomeModal/WelcomeModal.spec.tsx b/src/components/WelcomeModal/WelcomeModal.spec.tsx
index f94a2e6f0..0d7dade73 100644
--- a/src/components/WelcomeModal/WelcomeModal.spec.tsx
+++ b/src/components/WelcomeModal/WelcomeModal.spec.tsx
@@ -1,4 +1,4 @@
-import { render, screen } from '@testing-library/react'
+import { act, render, screen } from '@testing-library/react'
 import userEvent from '@testing-library/user-event'
 import React from 'react'
 import { Provider } from 'react-redux'
@@ -70,7 +70,9 @@ describe('WelcomeModal component', () => {
       )
     })
     it('should send mail and update profile when user click on the ok button', async () => {
-      await userEvent.click(screen.getAllByRole('button')[1])
+      await act(async () => {
+        await userEvent.click(screen.getAllByRole('button')[1])
+      })
       expect(mockSendMail).toHaveBeenCalled()
       expect(updateProfileSpy).toHaveBeenCalledWith({
         isFirstConnection: false,
@@ -81,7 +83,9 @@ describe('WelcomeModal component', () => {
     })
 
     it('should send mail and update profile when modal is closed by user', async () => {
-      await userEvent.click(screen.getAllByRole('button')[0])
+      await act(async () => {
+        await userEvent.click(screen.getAllByRole('button')[0])
+      })
       expect(mockSendMail).toHaveBeenCalled()
       expect(updateProfileSpy).toHaveBeenCalledWith({
         isFirstConnection: false,
-- 
GitLab