fix: harden phase summary open questions
This commit is contained in:
@@ -129,6 +129,31 @@ test("phase v2 dispatches to PhaseSummaryViewer", () => {
|
||||
expect(screen.getByText("Riassunto della fase.")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test("phase v2 tolerates the malformed open question from the latest session", () => {
|
||||
render(
|
||||
<ArtifactView
|
||||
artifact={{
|
||||
kind: "phase",
|
||||
data: {
|
||||
schema_version: 2,
|
||||
phase: { id: "F6", num: 6, name: "Piano CTE" },
|
||||
summary: "Piano completato.",
|
||||
open_questions: [
|
||||
{
|
||||
label: "pazienti_finale restituisce 0 righe",
|
||||
question: "Verificare se la condizione temporale è troppo restrittiva",
|
||||
},
|
||||
],
|
||||
},
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
|
||||
expect(
|
||||
screen.getByText("Verificare se la condizione temporale è troppo restrittiva"),
|
||||
).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test("phase v1 (no schema_version) still renders via legacy markdown/structured path", () => {
|
||||
render(
|
||||
<ArtifactView
|
||||
|
||||
Reference in New Issue
Block a user