feat(admin): add OcrHealthBar, OcrStatCards, OcrModelsTable components
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
18
frontend/src/routes/admin/ocr/OcrHealthBar.svelte.spec.ts
Normal file
18
frontend/src/routes/admin/ocr/OcrHealthBar.svelte.spec.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { afterEach, describe, it, expect } from 'vitest';
|
||||
import { cleanup, render } from 'vitest-browser-svelte';
|
||||
import { page } from 'vitest/browser';
|
||||
import OcrHealthBar from './OcrHealthBar.svelte';
|
||||
|
||||
afterEach(cleanup);
|
||||
|
||||
describe('OcrHealthBar', () => {
|
||||
it('shows online status when OCR service is available', async () => {
|
||||
render(OcrHealthBar, { ocrServiceAvailable: true });
|
||||
await expect.element(page.getByText(/online/i)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('shows offline status when OCR service is unavailable', async () => {
|
||||
render(OcrHealthBar, { ocrServiceAvailable: false });
|
||||
await expect.element(page.getByText(/offline/i)).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user