Settings -> Providers takes keys for OpenAI, Anthropic (their official OpenAI-compatibility layer), DeepSeek, Groq, OpenRouter and any custom OpenAI-compatible endpoint. One adapter (lib/openai-compat) covers listing, streaming chat, JSON generation and vision, and every model flow can run on a provider: the chat picker lists each enabled provider's models (labelled, remembered), and a "Study generation" choice moves decks, homework, grading and attachment transcription onto a provider model. Keys stay in this browser exactly like the Ollama one (freezmo.providers.v1): never stored server-side, never in a backup or the sync payload, forwarded only with the request that needs them. The provider test asserts the key reaches the provider while the routing header stays on the app side. New suite tests/providers-test.mjs (13 checks) stubs both protocols: model listing, chat streaming, study generation and the Settings flow. Privacy policy updated (en+cs). Contrast 0 findings, axe clean, mobile 126/126, chat 102/102, wizard 95/95, bubbles 34/34, regression 44/44, i18n 13/13, native 33/33. Version 0.4.7, SW -> freezmo-v72.
48 lines
1.4 KiB
JavaScript
48 lines
1.4 KiB
JavaScript
/**
|
|
* Runs every Freezmo browser suite in order.
|
|
*
|
|
* npm run test:e2e # everything
|
|
* npm run test:e2e -- phase1 # only suites whose name contains "phase1"
|
|
*
|
|
* Each suite is a standalone script that talks to the running app on :3207
|
|
* (FREEZMO_URL overrides). Suites that need a stub Ollama or extra server
|
|
* instance start their own on their own port and clean up after themselves.
|
|
*/
|
|
import { spawn } from "node:child_process";
|
|
import path from "node:path";
|
|
|
|
const SUITES = [
|
|
"regression",
|
|
"bubbles-test",
|
|
"mobile-test",
|
|
"wizard-test",
|
|
"native-test",
|
|
"i18n-test",
|
|
"freeze-loading-test",
|
|
"phase1-test",
|
|
"phase2-test",
|
|
"phase3-test",
|
|
"security-test",
|
|
"chat-test",
|
|
"providers-test",
|
|
"review-test",
|
|
];
|
|
|
|
const filters = process.argv.slice(2);
|
|
const list = filters.length ? SUITES.filter((name) => filters.some((f) => name.includes(f))) : SUITES;
|
|
|
|
const here = path.dirname(new URL(import.meta.url).pathname);
|
|
const repo = path.resolve(here, "..");
|
|
|
|
let failed = 0;
|
|
for (const suite of list) {
|
|
console.log(`\n===== ${suite} =====`);
|
|
const code = await new Promise((resolve) => {
|
|
const child = spawn(process.execPath, [path.join(here, `${suite}.mjs`)], { cwd: repo, stdio: "inherit" });
|
|
child.on("close", resolve);
|
|
});
|
|
if (code !== 0) failed += 1;
|
|
}
|
|
|
|
console.log(`\n${list.length - failed}/${list.length} suites passed`);
|
|
process.exit(failed ? 1 : 0);
|