fix: reselect after reasoning pattern filtering

This commit is contained in:
2026-08-03 12:39:01 +01:00
parent c27320984c
commit 34c25fcb43
4 changed files with 317 additions and 46 deletions
+38
View File
@@ -472,6 +472,44 @@ describe("graph-backed UI rendering", () => {
expect(html).not.toContain("Update situation");
});
it("renders the initial graph-backed commercial question when start-case reselection succeeds", () => {
const html = renderToStaticMarkup(
<ScenarioResultPanels
result={makeGraphResult({
situationGraph: {
...makeGraphResult().situationGraph,
activeUnknownNodeId: "n-who",
nodes: [
...makeGraphResult().situationGraph.nodes,
{
id: "n-who",
label: "Who experiences this problem",
description:
"Need to know who experiences this problem, because that must be clear before deciding whether it is commercially justified.",
kind: "unknown",
status: "unknown",
confidence: "medium",
parentId: "n-parent",
},
],
},
selectedQuestion: {
nodeId: "n-who",
question: "Who experiences this problem?",
reason: "Graph-backed commercial child selection.",
},
diagnostics: {
...makeGraphResult().diagnostics,
noQuestionReason: null,
},
})}
/>,
);
expect(html).toContain("Who experiences this problem?");
expect(html).toContain("Selected Question");
});
it("renders diagnostics", () => {
const html = renderToStaticMarkup(
<DiagnosticsView result={makeGraphResult()} />,