Add control room automations and uploader overrides
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-01-20 15:49:04 +01:00
parent e5e74febbd
commit 5e5b69f655
11 changed files with 738 additions and 33 deletions

View File

@@ -4,6 +4,8 @@ import { render, screen } from '@testing-library/react';
const navigateMock = vi.fn();
const selectEventMock = vi.fn();
const refetchMock = vi.fn();
const activeEventMock = { slug: 'demo-event', settings: { guest_upload_visibility: 'review', control_room: {} } };
vi.mock('react-router-dom', () => ({
useNavigate: () => navigateMock,
@@ -36,8 +38,9 @@ vi.mock('../../auth/context', () => ({
vi.mock('../../context/EventContext', () => ({
useEventContext: () => ({
activeEvent: { slug: 'demo-event' },
activeEvent: activeEventMock,
selectEvent: selectEventMock,
refetch: refetchMock,
}),
}));
@@ -98,6 +101,13 @@ vi.mock('@tamagui/text', () => ({
SizableText: ({ children }: { children: React.ReactNode }) => <span>{children}</span>,
}));
vi.mock('@tamagui/switch', () => ({
Switch: Object.assign(
({ children }: { children: React.ReactNode }) => <div>{children}</div>,
{ Thumb: () => <div /> },
),
}));
vi.mock('@tamagui/react-native-web-lite', () => ({
Pressable: ({
children,
@@ -143,6 +153,7 @@ vi.mock('../../api', () => ({
approveAndLiveShowPhoto: vi.fn(),
approveLiveShowPhoto: vi.fn(),
clearLiveShowPhoto: vi.fn(),
updateEvent: vi.fn(),
createEventAddonCheckout: vi.fn(),
featurePhoto: vi.fn(),
getAddonCatalog: vi.fn().mockResolvedValue([]),