photo visibility for demo events, hardened the demo mode. fixed dark/light mode toggle and notification bell toggle. fixed photo upload page sizes & header visibility.

This commit is contained in:
Codex Agent
2025-12-18 21:14:24 +01:00
parent 7c4067b32b
commit 53ec427e6e
25 changed files with 965 additions and 102 deletions

View File

@@ -0,0 +1,44 @@
import React from 'react';
import { describe, expect, it, vi } from 'vitest';
import { render, screen } from '@testing-library/react';
import { MemoryRouter } from 'react-router-dom';
import { UploadActionCard } from '../HomePage';
vi.mock('../../hooks/useDirectUpload', () => ({
useDirectUpload: () => ({
upload: vi.fn(),
uploading: false,
error: null,
warning: null,
progress: 0,
reset: vi.fn(),
}),
}));
vi.mock('react-router-dom', async () => {
const actual = await vi.importActual<typeof import('react-router-dom')>('react-router-dom');
return {
...actual,
useNavigate: () => vi.fn(),
};
});
describe('UploadActionCard', () => {
it('renders with dark mode surface classes', () => {
render(
<MemoryRouter>
<UploadActionCard
token="demo"
accentColor="#f43f5e"
secondaryAccent="#fb7185"
radius={12}
requiresApproval={false}
/>
</MemoryRouter>,
);
const card = screen.getByTestId('upload-action-card');
expect(card.className).toContain('bg-[var(--guest-surface)]');
expect(card.className).toContain('dark:bg-slate-950/70');
});
});