Compact tasks hero and harden sticky toolbar
This commit is contained in:
@@ -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 />);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user