Update guest PWA v2 UI and likes
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-02-05 15:09:19 +01:00
parent 6eafec2128
commit fa630e335d
22 changed files with 1288 additions and 200 deletions

View File

@@ -30,7 +30,7 @@ vi.mock('@tamagui/sheet', () => {
vi.mock('react-router-dom', () => ({
useNavigate: () => vi.fn(),
useSearchParams: () => [new URLSearchParams()],
useSearchParams: () => [new URLSearchParams(), vi.fn()],
}));
vi.mock('lucide-react', () => ({
@@ -48,9 +48,14 @@ vi.mock('lucide-react', () => ({
Trophy: () => <span>trophy</span>,
Play: () => <span>play</span>,
Share2: () => <span>share</span>,
MessageSquare: () => <span>message</span>,
Copy: () => <span>copy</span>,
ChevronLeft: () => <span>chevron-left</span>,
ChevronRight: () => <span>chevron-right</span>,
QrCode: () => <span>qr</span>,
Link: () => <span>link</span>,
Users: () => <span>users</span>,
Heart: () => <span>heart</span>,
}));
vi.mock('../components/AppShell', () => ({
@@ -73,6 +78,10 @@ vi.mock('@/guest/services/pendingUploadsApi', () => ({
vi.mock('../services/photosApi', () => ({
fetchGallery: vi.fn().mockResolvedValue({ data: [], next_cursor: null, latest_photo_at: null, notModified: false }),
fetchPhoto: vi.fn().mockResolvedValue(null),
likePhoto: vi.fn().mockResolvedValue(0),
unlikePhoto: vi.fn().mockResolvedValue(0),
createPhotoShareLink: vi.fn().mockResolvedValue({ url: null }),
}));
vi.mock('../hooks/usePollGalleryDelta', () => ({
@@ -136,7 +145,7 @@ describe('Guest v2 screens copy', () => {
</EventDataProvider>
);
expect(screen.getByText('Gallery')).toBeInTheDocument();
expect(screen.getByText('Neues Foto hochladen')).toBeInTheDocument();
});
it('renders upload preview prompt', () => {