- Isolate concurrent LibreOffice runs with per-job profile directories (soffice -env:UserInstallation) and per-job temp folders - Poll for generated PDF and verify stable file size before reading - Consolidate temp artifacts under docstore/tmp and clean up via rm -r - Add headless/nologo flags and improve error handling ui(accessibility): - ConfirmDialog exposes proper dialog roles - DocumentFolder toggle adds type, aria-expanded, aria-controls, and title; associate content panel with an id - HTMLViewer wraps content in .html-container for HTML/TXT views test: add comprehensive Playwright specs and helpers - Accessibility, API health, deletion flows, folders, navigation, playback, and upload scenarios - Add sample.md and unsupported.xyz; update sample.pdf; extend helpers ci: run Playwright workflow on version1.0.0 branch
20 lines
No EOL
847 B
TypeScript
20 lines
No EOL
847 B
TypeScript
import { test, expect } from '@playwright/test';
|
|
|
|
test.describe('API health checks', () => {
|
|
test('GET /api/tts/voices returns 200 and a non-empty voices array', async ({ request }) => {
|
|
const res = await request.get('/api/tts/voices');
|
|
expect(res.ok()).toBeTruthy();
|
|
const json = await res.json();
|
|
expect(Array.isArray(json.voices)).toBeTruthy();
|
|
expect(json.voices.length).toBeGreaterThan(0);
|
|
});
|
|
|
|
test('GET /api/audio/convert/chapters returns 200 with exists flag and chapters array', async ({ request }) => {
|
|
const bookId = `healthcheck-${Date.now()}`;
|
|
const res = await request.get(`/api/audio/convert/chapters?bookId=${bookId}`);
|
|
expect(res.ok()).toBeTruthy();
|
|
const json = await res.json();
|
|
expect(json).toHaveProperty('exists');
|
|
expect(Array.isArray(json.chapters)).toBeTruthy();
|
|
});
|
|
}); |