Add tooling (Vitest, Router, Query, React Flow), app shell and Gitea CI
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c24537a7fb
commit
c5dbb78d1b
19 files changed
+1649
-404
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import { render, screen } from '@testing-library/react'
|
||||
import { createMemoryRouter, RouterProvider } from 'react-router'
|
||||
import { expect, test } from 'vitest'
|
||||
import { routes } from './routes'
|
||||
|
||||
test.each([
|
||||
['/identities', 'Identities'],
|
||||
['/secrets', 'Secrets'],
|
||||
['/graph', 'Access Graph'],
|
||||
['/connect', 'Connect'],
|
||||
])('renders %s', (path, heading) => {
|
||||
const router = createMemoryRouter(routes, { initialEntries: [path] })
|
||||
render(<RouterProvider router={router} />)
|
||||
expect(screen.getByRole('heading', { name: heading })).toBeInTheDocument()
|
||||
})
|
||||
|
||||
test('redirects / to identities', () => {
|
||||
const router = createMemoryRouter(routes, { initialEntries: ['/'] })
|
||||
render(<RouterProvider router={router} />)
|
||||
expect(screen.getByRole('heading', { name: 'Identities' })).toBeInTheDocument()
|
||||
})
|
||||
Reference in new issue
Block a user