test: expand API and GUI test coverage across all tools

Add ~500 new E2E tests and ~300 new integration tests covering:

- 24 new GUI E2E specs: navigation, responsive layout, keyboard shortcuts,
  tool UI for all 35 non-AI tools, batch/pipeline workflows, settings/RBAC,
  visual regression, accessibility, and performance budgets
- 3 new E2E-Docker specs: batch workflows, advanced pipelines, cross-format
- 1 new adversarial integration test: memory pressure, corrupted files,
  unicode filenames, extreme dimensions, pipeline/batch edge cases
- 29 expanded integration test files: HEIC/HEIF input, large files, parameter
  boundaries, batch processing, format edge cases across all tools
- Cross-format matrix expanded: 641 tests covering every tool x 18 formats
- AI bridge unit tests expanded: lifecycle, tool modules, error propagation
- Unit test gaps filled: analytics, tool-registry, web stores

Also fixes:
- vitest.config.ts: exclude e2e-docs and e2e-landing from Vitest runner
- AI E2E specs: add sidecar health check to skip gracefully when Python
  AI backend is not running instead of timing out
This commit is contained in:
SnapOtter
2026-04-29 01:39:25 +08:00
parent 4acec0846c
commit 03f82567d0
74 changed files with 15893 additions and 14 deletions
+16
View File
@@ -149,4 +149,20 @@ export const test = base.extend<{ loggedInPage: Page }>({
},
});
// ---------------------------------------------------------------------------
// isAiSidecarRunning() — check if the Python AI dispatcher is ready
// ---------------------------------------------------------------------------
export async function isAiSidecarRunning(page: Page): Promise<boolean> {
try {
const response = await page.request.get("/api/v1/admin/health");
if (!response.ok()) return false;
const health = (await response.json()) as {
ai?: { dispatcher?: { ready?: boolean; running?: boolean } };
};
return health.ai?.dispatcher?.ready === true;
} catch {
return false;
}
}
export { expect };