import React from 'react'; import { describe, expect, it, vi } from 'vitest'; import { render, screen } from '@testing-library/react'; import { EventDataProvider } from '../context/EventDataContext'; vi.mock('framer-motion', () => ({ AnimatePresence: ({ children }: { children: React.ReactNode }) =>
{children}
, motion: { div: ({ children }: { children: React.ReactNode }) =>
{children}
}, })); vi.mock('../services/photosApi', () => ({ fetchGallery: () => Promise.resolve({ data: [] }), })); vi.mock('@/guest/i18n/useTranslation', () => ({ useTranslation: () => ({ t: (_key: string, fallback?: string) => fallback ?? _key, locale: 'de' }), })); import SlideshowScreen from '../screens/SlideshowScreen'; describe('SlideshowScreen', () => { it('shows empty state when no photos', async () => { render( ); expect(await screen.findByText('Noch keine Fotos')).toBeInTheDocument(); }); });