Refactor event tasks tabs
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-22 20:33:02 +01:00
parent fba9714ede
commit db5fea9f2a
4 changed files with 249 additions and 296 deletions

View File

@@ -112,6 +112,7 @@ 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>,
Content: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,
}),
}));
@@ -273,12 +274,14 @@ vi.mock('../theme', () => ({
import MobileEventTasksPage from '../EventTasksPage';
describe('MobileEventTasksPage', () => {
it('renders the quick jump chips and photo task header', async () => {
it('renders the tabs and photo task header', async () => {
render(<MobileEventTasksPage />);
expect(await screen.findByText('Photo task mode')).toBeInTheDocument();
expect(screen.getByText('Quick jump')).toBeInTheDocument();
expect(screen.getByText('assigned')).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.getByPlaceholderText('Search photo tasks')).toBeInTheDocument();
expect(screen.getByText('Emotion')).toBeInTheDocument();