Compact tasks hero and harden sticky toolbar

This commit is contained in:
Codex Agent
2026-01-20 10:59:58 +01:00
parent 3761c92c3f
commit 0ef8508414
3 changed files with 86 additions and 42 deletions

View File

@@ -156,8 +156,16 @@ vi.mock('@tamagui/list-item', () => ({
}));
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>
),
@@ -278,6 +286,17 @@ describe('MobileEventTasksPage', () => {
);
});
it('toggles task details in the hero section', async () => {
render(<MobileEventTasksPage />);
const detailsLabel = 'Give guests optional photo tasks and prompts.';
expect(await screen.findByText('Photo tasks for this event')).toBeInTheDocument();
expect(screen.queryByText(detailsLabel)).not.toBeInTheDocument();
fireEvent.click(screen.getByLabelText(detailsLabel));
expect(screen.getByText(detailsLabel)).toBeInTheDocument();
});
it('enters selection mode on long press', async () => {
render(<MobileEventTasksPage />);