Skip to content

Commit f5add81

Browse files
authored
test(qa): provide Matrix module-flow fixture (#119953)
Punchcard-Session: cobalt-valley-meadow-mg
1 parent a914682 commit f5add81

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎extensions/qa-lab/src/suite-provider-selection.test.ts‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { mkdtemp, readFile, rm } from "node:fs/promises";
33
import os from "node:os";
44
import path from "node:path";
55
import { describe, expect, it, vi } from "vitest";
6+
import type { QaTransportAdapterFactory } from "./qa-transport-registry.js";
67
import { requireFlowScenario } from "./scenario-catalog.test-utils.js";
78
import { runQaSuite } from "./suite-launch.runtime.js";
89
import { selectQaFlowSuiteScenarios } from "./suite-planning.js";
@@ -76,8 +77,18 @@ describe("qa suite provider selection", () => {
7677
scenarioId: "matrix-room-block-streaming",
7778
channelDriver: "live" as const,
7879
channelId: "matrix",
80+
adapterFactories: [
81+
{
82+
id: "matrix",
83+
supportsModuleFlows: true,
84+
matches: ({ driver, channelId }) => driver === "live" && channelId === "matrix",
85+
create: async () => {
86+
throw new Error("Matrix adapter creation must remain unreachable");
87+
},
88+
} satisfies QaTransportAdapterFactory,
89+
],
7990
},
80-
{ scenarioId: "goal-context-next-turn" },
91+
{ scenarioId: "goal-context-next-turn", adapterFactories: undefined },
8192
])("adopts the provider requirement for directly selected $scenarioId", async (selection) => {
8293
const repoRoot = await mkdtemp(path.join(os.tmpdir(), "qa-suite-provider-lane-"));
8394
const startLab = vi.fn(async () => {
@@ -92,6 +103,7 @@ describe("qa suite provider selection", () => {
92103
...("channelDriver" in selection
93104
? { channelDriver: selection.channelDriver, channelId: selection.channelId }
94105
: {}),
106+
adapterFactories: selection.adapterFactories,
95107
startLab,
96108
}),
97109
).rejects.toThrow("selected provider lane reached lab startup");

0 commit comments

Comments
 (0)