docs: rewrite PLAN.md and update CODEBASE.md, README.md

- Full rewrite of PLAN.md to reflect current architecture (27 REST + 3 WS endpoints,
  embedded frontend, automation, scheduler, health check, GoReleaser CI)
- Added health.go, mods.go, scheduler.go, robfig/cron dep to CODEBASE.md
- Added Gitea Actions CI/CD section to CODEBASE.md
- Added conventional commits to code style section
- Added missing API routes and embed/ to README.md
This commit is contained in:
MrFastwind
2026-07-23 20:14:56 +02:00
parent 914e0fbe48
commit d55200886b
15 changed files with 1765 additions and 67 deletions
+49
View File
@@ -0,0 +1,49 @@
import { describe, it, expect } from 'vitest'
import { render, screen } from '@testing-library/react'
import { MemoryRouter } from 'react-router-dom'
import Layout from './Layout'
describe('Layout', () => {
it('renders sidebar navigation', () => {
render(
<MemoryRouter>
<Layout>
<div>Content</div>
</Layout>
</MemoryRouter>
)
expect(screen.getByText('Dashboard')).toBeInTheDocument()
expect(screen.getByText('Settings')).toBeInTheDocument()
expect(screen.getByText('Configs')).toBeInTheDocument()
expect(screen.getByText('Modlists')).toBeInTheDocument()
expect(screen.getByText('Mods')).toBeInTheDocument()
expect(screen.getByText('Logs')).toBeInTheDocument()
expect(screen.getByText('Status')).toBeInTheDocument()
})
it('renders children', () => {
render(
<MemoryRouter>
<Layout>
<div>Test Content</div>
</Layout>
</MemoryRouter>
)
expect(screen.getByText('Test Content')).toBeInTheDocument()
})
it('highlights active route', () => {
render(
<MemoryRouter initialEntries={['/settings']}>
<Layout>
<div>Content</div>
</Layout>
</MemoryRouter>
)
const settingsLink = screen.getByText('Settings')
expect(settingsLink).toHaveClass('text-white')
})
})