Show legacy CCS cases in interactive scene

This commit is contained in:
hz
2026-08-05 20:46:55 -05:00
parent af2bbb673d
commit 7709d16018
2 changed files with 99 additions and 5 deletions
+33
View File
@@ -177,6 +177,39 @@ public sealed class CcsCaseTests
Assert.Throws<InvalidOperationException>(() => CcsStore.ApplyDialogueChoice(attempt, definition, "ask_reason", DateTime.UtcNow));
}
[Fact]
public void LegacyCaseGetsInterviewFromExistingChartNarrative()
{
var definition = ValidImport().Cases[0];
definition.InitialInterview = new();
definition.InitialChart.HistorySections =
[
new() { Code = "hpi", Title = "History of present illness", Text = "The symptoms began this morning." },
new() { Code = "medications", Title = "Medications", Text = "I take no regular medicines." }
];
var interview = CcsStore.EffectiveInterview(definition);
var attempt = new CcsAttempt { InterviewNodeId = interview.StartNodeId, OpeningCompleted = false };
Assert.Equal("opening", interview.StartNodeId);
Assert.Equal(5, interview.Nodes.Count);
CcsStore.ApplyDialogueChoice(attempt, definition, "ask_reason", DateTime.UtcNow);
CcsStore.ApplyDialogueChoice(attempt, definition, "ask_history_1", DateTime.UtcNow);
CcsStore.ApplyDialogueChoice(attempt, definition, "ask_history_2", DateTime.UtcNow);
CcsStore.ApplyDialogueChoice(attempt, definition, "finish_interview", DateTime.UtcNow);
Assert.Equal("complete", attempt.InterviewNodeId);
Assert.True(attempt.OpeningCompleted);
}
[Fact]
public void AuthoredInterviewRemainsPreferredOverGeneratedFallback()
{
var definition = ValidImport().Cases[0];
definition.InitialInterview = ValidInterview();
Assert.Same(definition.InitialInterview, CcsStore.EffectiveInterview(definition));
}
[Fact]
public void CcsExpectedScoreUsesSeparateUserAndCaseElo()
{