Add task creation form. (#9)
Reviewed-on: #9 Co-authored-by: Drew Galbraith <drew@tiramisu.one> Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
parent
a683a071d1
commit
b0916990fb
6 changed files with 286 additions and 16 deletions
|
|
@ -1,14 +1,20 @@
|
|||
import { render, screen } from '@testing-library/react'
|
||||
import { describe, it, expect } from 'vitest'
|
||||
import { MemoryRouter } from 'react-router'
|
||||
import Home from './home'
|
||||
|
||||
describe('Home component', () => {
|
||||
it('should render task management interface', () => {
|
||||
const mockLoaderData = { tasks: [] }
|
||||
render(<Home loaderData={mockLoaderData} />)
|
||||
render(
|
||||
<MemoryRouter>
|
||||
<Home loaderData={mockLoaderData} />
|
||||
</MemoryRouter>
|
||||
)
|
||||
expect(
|
||||
screen.getByRole('heading', { level: 1, name: /Tasks/i })
|
||||
).toBeInTheDocument()
|
||||
|
||||
// TaskList component should be rendered with empty state
|
||||
expect(screen.getByText(/No tasks found/i)).toBeInTheDocument()
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue