diff --git a/client/src/components/Planner/DayPlanSidebar.test.tsx b/client/src/components/Planner/DayPlanSidebar.test.tsx
index 58b49957c..ecaa3fdc1 100644
--- a/client/src/components/Planner/DayPlanSidebar.test.tsx
+++ b/client/src/components/Planner/DayPlanSidebar.test.tsx
@@ -194,6 +194,7 @@ const emptyDataTransfer = { setData: vi.fn(), effectAllowed: '', getData: vi.fn(
beforeEach(() => {
resetAllStores()
vi.clearAllMocks()
+ Element.prototype.scrollTo = vi.fn()
mockPermissions.canEdit = true
mockPermissions.denied.clear()
// clearAllMocks keeps implementations, so tests that swap the router out would
@@ -1374,6 +1375,8 @@ describe('DayPlanSidebar', () => {
render()
await waitFor(() => expect(onSelectDay).toHaveBeenCalledWith(days[1].id, true))
+ await act(async () => { await new Promise(resolve => requestAnimationFrame(() => resolve())) })
+ expect(Element.prototype.scrollTo).toHaveBeenCalled()
})
it('FE-PLANNER-DAYPLAN-196: a trip that is not running is left alone', async () => {