mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-16 12:31:36 +00:00
* test(qa): canonicalize channel routing scenarios * test(qa): enforce Crabline actor allowlists * test(qa): preserve canonical flow integration * test(matrix): use retained topology fixture id * test(qa): preserve WhatsApp live defaults * QA: declare channel transport policy in scenarios * refactor(qa): keep transport policy type local * refactor(qa): keep transport policy on leaf contract * test(matrix): use retained routing fixture
42 lines
1.7 KiB
TypeScript
42 lines
1.7 KiB
TypeScript
// Qa Lab helper module supports suite test helpers behavior.
|
|
import type { QaTransportPolicy } from "./qa-transport.js";
|
|
import { readQaBootstrapScenarioCatalog } from "./scenario-catalog.js";
|
|
|
|
type QaSuiteTestScenario = ReturnType<typeof readQaBootstrapScenarioCatalog>["scenarios"][number];
|
|
|
|
export function makeQaSuiteTestScenario(
|
|
id: string,
|
|
params: {
|
|
channel?: string;
|
|
config?: Record<string, unknown>;
|
|
plugins?: string[];
|
|
gatewayConfigPatch?: Record<string, unknown>;
|
|
gatewayRuntime?: { forwardHostHome?: boolean; preserveDebugArtifacts?: boolean };
|
|
runtimeParityTier?: QaSuiteTestScenario["runtimeParityTier"];
|
|
suiteIsolation?: "isolated";
|
|
surface?: string;
|
|
transportPolicy?: QaTransportPolicy;
|
|
} = {},
|
|
): QaSuiteTestScenario {
|
|
return {
|
|
id,
|
|
title: id,
|
|
surface: params.surface ?? "test",
|
|
objective: "test",
|
|
successCriteria: ["test"],
|
|
...(params.runtimeParityTier ? { runtimeParityTier: params.runtimeParityTier } : {}),
|
|
...(params.plugins ? { plugins: params.plugins } : {}),
|
|
...(params.gatewayConfigPatch ? { gatewayConfigPatch: params.gatewayConfigPatch } : {}),
|
|
...(params.gatewayRuntime ? { gatewayRuntime: params.gatewayRuntime } : {}),
|
|
sourcePath: `qa/scenarios/${id}.yaml`,
|
|
execution: {
|
|
kind: "flow",
|
|
...(params.channel ? { channel: params.channel } : {}),
|
|
...(params.suiteIsolation ? { suiteIsolation: params.suiteIsolation } : {}),
|
|
...(params.transportPolicy ? { transportPolicy: params.transportPolicy } : {}),
|
|
...(params.config ? { config: params.config } : {}),
|
|
flow: { steps: [{ name: "noop", actions: [{ assert: "true" }] }] },
|
|
},
|
|
} as QaSuiteTestScenario;
|
|
}
|