test(tours): fix assignment test validation

This commit is contained in:
elmocito
2026-10-06 15:16:23 +02:00
parent a05855ee2b
commit b1289c67b8
3 changed files with 3 additions and 3 deletions
@@ -80,7 +80,7 @@ describe('CustomSelect consumer contracts', () => {
planner={planner({ saveOutcome: tour, editingPlaceId: 42 })}
tours={[tour]} days={days} loading={false} onAssignToDay={onAssignToDay} onViewGpxTour={vi.fn()}
/></TranslationProvider>)
const saveBanner = screen.getByText('Tour saved').closest('[role="status"]')!
const saveBanner = screen.getByText('Tour saved').closest('[role="status"]') as HTMLElement
expect(within(saveBanner).getByRole('button', { name: 'Plan another' })).toBeInTheDocument()
expect(within(saveBanner).queryByRole('button', { name: 'Assign to a day' })).not.toBeInTheDocument()
await user.click(screen.getByRole('button', { name: 'Add to day: Ridge walk' }))