Adopt Tamagui defaults for tabs and filters
This commit is contained in:
@@ -111,7 +111,11 @@ vi.mock('@tamagui/scroll-view', () => ({
|
||||
vi.mock('tamagui', () => ({
|
||||
Tabs: Object.assign(({ children }: { children: React.ReactNode }) => <div>{children}</div>, {
|
||||
List: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,
|
||||
Tab: ({ children }: { children: React.ReactNode }) => <button type="button">{children}</button>,
|
||||
Tab: ({ children }: { children: React.ReactNode }) => (
|
||||
<button type="button" role="tab">
|
||||
{children}
|
||||
</button>
|
||||
),
|
||||
Content: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,
|
||||
}),
|
||||
}));
|
||||
@@ -278,10 +282,10 @@ describe('MobileEventTasksPage', () => {
|
||||
render(<MobileEventTasksPage />);
|
||||
|
||||
expect(await screen.findByText('Photo tasks for guests')).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: 'Tasks' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: 'Task Library' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: 'Emotions' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('button', { name: 'Collections' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('tab', { name: 'Tasks' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('tab', { name: 'Task Library' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('tab', { name: 'Emotions' })).toBeInTheDocument();
|
||||
expect(screen.getByRole('tab', { name: 'Collections' })).toBeInTheDocument();
|
||||
expect(screen.getByPlaceholderText('Search photo tasks')).toBeInTheDocument();
|
||||
expect(screen.getByText('Emotion')).toBeInTheDocument();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user