test(pages): wiring mocks track the new gallery-provider and weather-anchor contracts

This commit is contained in:
Maurice
2026-09-01 16:32:10 +02:00
committed by Maurice
parent 2d6454976e
commit 5f63736b5d
2 changed files with 4 additions and 3 deletions
@@ -99,6 +99,7 @@ function buildHook(over: Record<string, unknown> = {}): Record<string, unknown>
showSettings: false, setShowSettings: vi.fn(),
hideSkeletons: false, setHideSkeletons: vi.fn(),
mapRef: { current: null }, fullMapRef: { current: null }, galleryUploadRef: { current: null },
galleryProviders: [], setGalleryProviders: vi.fn(), galleryBrowseRef: { current: null },
activeLocationId: null, handleMarkerClick: vi.fn(), handleLocationClick: vi.fn(),
mapEntries: [], sidebarMapItems: [], tripDates: new Set<string>(), isMobile: false,
feedEdge: { atTop: true, atBottom: true }, scrollFeedTo: vi.fn(),
@@ -592,11 +592,11 @@ describe('TripPlannerPage — day detail and inspector', () => {
expect(hookState.loadAccommodations).toHaveBeenCalled()
})
it('FE-PAGE-TPW-025: a day without geo stops falls back to any place with coordinates', () => {
it('FE-PAGE-TPW-025: a day without geo stops gets no weather anchor from other days (#2167)', () => {
renderPage({ showDayDetail: { ...day, id: 99 }, assignments: {} })
expect(props('dayDetail').lat).toBe(34.9)
expect(props('dayDetail').lng).toBe(135.7)
expect(props('dayDetail').lat).toBeNull()
expect(props('dayDetail').lng).toBeNull()
})
it('FE-PAGE-TPW-026: the desktop inspector edits, deletes and rates through the hook', async () => {