Shrink control room photo actions
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 14:02:49 +01:00
parent 5674ed99f1
commit e5e74febbd
2 changed files with 45 additions and 20 deletions

View File

@@ -99,8 +99,16 @@ vi.mock('@tamagui/text', () => ({
}));
vi.mock('@tamagui/react-native-web-lite', () => ({
Pressable: ({ children, onPress }: { children: React.ReactNode; onPress?: () => void }) => (
<button type="button" onClick={onPress}>
Pressable: ({
children,
onPress,
...rest
}: {
children: React.ReactNode;
onPress?: () => void;
[key: string]: unknown;
}) => (
<button type="button" onClick={onPress} {...rest}>
{children}
</button>
),
@@ -114,6 +122,7 @@ vi.mock('../theme', () => ({
border: '#e5e7eb',
accentSoft: '#eef2ff',
accent: '#6366f1',
primary: '#ff5a5f',
danger: '#dc2626',
surfaceMuted: '#f9fafb',
}),
@@ -172,8 +181,8 @@ describe('MobileEventControlRoomPage', () => {
it('renders compact grid actions for moderation photos', async () => {
render(<MobileEventControlRoomPage />);
expect(await screen.findByText('Approve')).toBeInTheDocument();
expect(screen.getByText('Hide')).toBeInTheDocument();
expect(screen.getByText('Set highlight')).toBeInTheDocument();
expect(await screen.findByLabelText('Approve')).toBeInTheDocument();
expect(screen.getByLabelText('Hide')).toBeInTheDocument();
expect(screen.getByLabelText('Set highlight')).toBeInTheDocument();
});
});