Make graphical CCS dialogue choice first
This commit is contained in:
@@ -59,12 +59,15 @@ func _run() -> void:
|
||||
screen._render_state()
|
||||
await process_frame
|
||||
_assert(screen.current_view == "doctor_office", "an active interactive attempt should open the doctor office")
|
||||
_assert(screen.active_scene.dialogue_text.text == "Hello, doctor.", "the patient bubble should use the server-provided current node")
|
||||
_assert(not screen.active_scene.is_patient_dialogue_visible(), "the opening should wait for a clinician dialogue selection")
|
||||
_assert(screen.active_scene.choice_container.get_child_count() == 1, "the scene should render server-provided dialogue choices")
|
||||
_assert(is_equal_approx(screen.stage_root.scale.x, screen.stage_root.scale.y), "the graphical stage should preserve its aspect ratio")
|
||||
service.attempt = _sample_branching_attempt()
|
||||
screen._render_state()
|
||||
await process_frame
|
||||
_assert(screen.active_scene.is_patient_dialogue_visible(), "a selected topic should display the patient's response")
|
||||
_assert(not screen.active_scene.choice_container.visible, "the next choices should wait until the patient finishes speaking")
|
||||
screen.active_scene.complete_dialogue_reveal()
|
||||
_assert(screen.active_scene.choice_container.columns == 2, "branching interview choices should use two columns")
|
||||
_assert(screen.active_scene.choice_container.get_child_count() == 8, "all available branching topics should render")
|
||||
|
||||
@@ -72,10 +75,19 @@ func _run() -> void:
|
||||
screen._on_attempt_changed()
|
||||
await process_frame
|
||||
_assert(screen.active_scene.dialogue_text.text == "Okay, doctor.", "attempt updates should advance the rendered patient response")
|
||||
_assert(not screen.active_scene.choice_container.visible, "the terminal action should wait for the closing response")
|
||||
screen.active_scene.complete_dialogue_reveal()
|
||||
_assert(screen.active_scene.choice_container.get_child_count() == 1, "terminal dialogue should expose the management handoff")
|
||||
screen.active_scene.interview_continue_requested.emit()
|
||||
_assert(host.shown_screen == "ccs_player", "terminal dialogue should hand off the same attempt to the CCS player")
|
||||
|
||||
service.attempt = {"id": "classic-attempt", "state": "active", "openingCompleted": false, "interview": {}}
|
||||
host.shown_screen = ""
|
||||
screen._on_attempt_changed()
|
||||
await process_frame
|
||||
_assert(screen.current_view == "case_selection", "unsupported active attempts should remain outside the classic player")
|
||||
_assert(host.shown_screen.is_empty(), "CCS Cases 2 should not trigger classic opening overlays")
|
||||
|
||||
service.attempt = _sample_graphical_debrief()
|
||||
screen._on_attempt_changed()
|
||||
await process_frame
|
||||
@@ -98,6 +110,7 @@ func _sample_attempt(completed: bool) -> Dictionary:
|
||||
"id": "done" if completed else "greeting",
|
||||
"patientText": "Okay, doctor." if completed else "Hello, doctor.",
|
||||
"isTerminal": completed,
|
||||
"suppressPatientText": not completed,
|
||||
"choices": [] if completed else [{"id": "ask_reason", "text": "What brings you in?", "nextNodeId": "done"}]
|
||||
}
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user