From 92181cdefbab221a87d860f381e91cae266b9e12 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sun, 18 Oct 2026 20:49:38 +0200 Subject: [PATCH] test(trips): the suites follow the settings dialog's areas and the journal link The dialog's nav buttons are named by their area alone (aria-label), so a hint line naming invites no longer matches the invite button. The sharing cases open the Sharing area first, the wiring and More sheet tests drive the settings button and row, the hook test reads the toasts as keys (renderHook loads no locale), and the lazy list and store registry know the journal panel and store. --- .../src/components/Trips/TripMembersModal.test.tsx | 4 ++++ client/src/components/Trips/TripShareDialog.tsx | 2 +- .../src/components/Trips/useTripJournalLink.test.ts | 12 ++++++------ client/src/pages/TripPlannerPage.wiring.test.tsx | 4 ++-- client/src/pages/tripPlanner/plannerLazy.test.ts | 2 ++ client/tests/helpers/storeRegistry.ts | 1 + client/tests/unit/mobile/trip/MMehrSheet.test.tsx | 10 +++++----- 7 files changed, 21 insertions(+), 14 deletions(-) diff --git a/client/src/components/Trips/TripMembersModal.test.tsx b/client/src/components/Trips/TripMembersModal.test.tsx index bda4467cc..89e338b88 100644 --- a/client/src/components/Trips/TripMembersModal.test.tsx +++ b/client/src/components/Trips/TripMembersModal.test.tsx @@ -291,6 +291,7 @@ describe('TripMembersModal', () => { ); render(); + await user.click(await screen.findByRole('button', { name: 'Sharing' })); const createBtn = await screen.findByText('Create link'); await user.click(createBtn); @@ -689,6 +690,7 @@ describe('TripMembersModal', () => { http.delete('/api/trips/1/invite-link', () => HttpResponse.json({ success: true })), ); const view = render(); + await user.click(await screen.findByRole('button', { name: 'Sharing' })); const createBtn = await screen.findByRole('button', { name: /Create invite link/i }); fireEvent.click(createBtn); @@ -719,6 +721,7 @@ describe('TripMembersModal', () => { asShareOwner(); server.use(http.post('/api/trips/1/invite-link', () => HttpResponse.json({}, { status: 500 }))); render(); + await user.click(await screen.findByRole('button', { name: 'Sharing' })); await user.click(await screen.findByRole('button', { name: /Create invite link/i })); @@ -734,6 +737,7 @@ describe('TripMembersModal', () => { http.delete('/api/trips/1/invite-link', () => HttpResponse.json({}, { status: 500 })), ); render(); + await user.click(await screen.findByRole('button', { name: 'Sharing' })); await user.click(await screen.findByRole('button', { name: /Disable/i })); diff --git a/client/src/components/Trips/TripShareDialog.tsx b/client/src/components/Trips/TripShareDialog.tsx index 6562a7e07..0e5d7053e 100644 --- a/client/src/components/Trips/TripShareDialog.tsx +++ b/client/src/components/Trips/TripShareDialog.tsx @@ -133,7 +133,7 @@ function AreaNav({ areas, current, onPick }: { areas: typeof AREAS; current: Are {areas.map(a => { const on = a.id === current return ( -