test: playwright end-to-end qa (17 tests, real models)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
ahmed mohammed
2026-09-22 09:02:53 +03:00
co-authored by Claude Opus 4.7
parent 0db7b8140b
commit 07dd3d6bf8
12 changed files with 233 additions and 4 deletions
+3 -2
View File
@@ -4,9 +4,9 @@ import type { SettingsView } from "@/lib/settings";
type Result = { ok?: boolean; error?: string } | null;
export function SettingsForm({ action, view, step, account }: {
export function SettingsForm({ action, view, step, account, after }: {
action: (state: Result, fd: FormData) => Promise<Result>;
view: SettingsView; step?: string; account?: boolean;
view: SettingsView; step?: string; account?: boolean; after?: string;
}) {
const [state, formAction, pending] = useActionState<Result, FormData>(action, null);
const F = (name: string, label: string, value: string, help: string, type = "text") => (
@@ -19,6 +19,7 @@ export function SettingsForm({ action, view, step, account }: {
<fieldset style={{ border: 0, padding: 0, margin: 0, display: "grid", gap: "var(--qai-space-md)" }}>
<legend className="label">{title}</legend>{children}</fieldset>);
return <form action={formAction} className="card" style={{ display: "grid", gap: "var(--qai-space-l)" }}>
{after && <input type="hidden" name="after" value={after} />}
{step && <p className="label">{step}</p>}
<Group title="Analyst model — OpenAI-compatible">
{F("analyst_base_url", "Base URL", view.analyst_base_url, "e.g. https://api.openai.com/v1")}