OH10: mock useRouter in cell overlay unit tests

Advisors hybrid conflict path needs next/navigation; overlay container
specs render without the App Router.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
This commit is contained in:
Cursor Agent 2026-08-02 01:43:25 +00:00
parent daeff53bf4
commit 13793e3092
No known key found for this signature in database

View file

@ -13,6 +13,14 @@ import { MunicipalityPortfolioCell } from '@/components/campaign/shared/Municipa
import { TooltipProvider } from '@/components/ui/tooltip' import { TooltipProvider } from '@/components/ui/tooltip'
import { toVoteEstimateScenarioViewModel } from '@/lib/voteEstimate' import { toVoteEstimateScenarioViewModel } from '@/lib/voteEstimate'
vi.mock('next/navigation', () => ({
useRouter: () => ({
refresh: vi.fn(),
push: vi.fn(),
replace: vi.fn(),
}),
}))
/** /**
* B42: the quick-edit cells of `/campanha/municipios` share one container * B42: the quick-edit cells of `/campanha/municipios` share one container
* (`CampaignCellEditOverlay`) that is a Popover in the desktop table and a * (`CampaignCellEditOverlay`) that is a Popover in the desktop table and a