Refine graphical CCS interview flow

This commit is contained in:
hz
2026-08-06 04:58:15 -05:00
parent ee8e8cf787
commit 2c7c5dd387
5 changed files with 141 additions and 87 deletions
+16 -6
View File
@@ -74,12 +74,22 @@ func _run() -> void:
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")
_assert(_label_content_fits(screen.active_scene.dialogue_text), "the complete patient response should fit inside its speech bubble")
screen.active_scene.complete_dialogue_reveal()
_assert(not screen.active_scene.choice_container.visible, "the completed response should remain visible during the short reading hold")
await create_timer(screen.active_scene.RESPONSE_HOLD_SECONDS + 0.1).timeout
_assert(screen.active_scene.dialogue_pages.size() > 1, "long patient responses should split into readable dialogue pages")
_assert(_label_content_fits(screen.active_scene.dialogue_text), "the first patient response page should fit inside its speech bubble")
screen.active_scene.advance_dialogue()
_assert(screen.active_scene.dialogue_page_index == 0, "clicking during typing should complete rather than skip the current page")
_assert(screen.active_scene.dialogue_continue_hint.visible, "completed dialogue pages should invite the learner to continue")
await create_timer(1.35).timeout
_assert(screen.active_scene.is_patient_dialogue_visible(), "patient dialogue should remain until the learner advances it")
_assert(not screen.active_scene.choice_container.visible, "questions must not appear on a timer")
while screen.active_scene.dialogue_page_index < screen.active_scene.dialogue_pages.size() - 1:
screen.active_scene.advance_dialogue()
await process_frame
_assert(_label_content_fits(screen.active_scene.dialogue_text), "every patient response page should fit inside its speech bubble")
screen.active_scene.complete_dialogue_reveal()
screen.active_scene.advance_dialogue()
await process_frame
_assert(not screen.active_scene.is_patient_dialogue_visible(), "questions should replace the patient response after the reading hold")
_assert(not screen.active_scene.is_patient_dialogue_visible(), "questions should replace patient dialogue after the final learner click")
_assert(screen.active_scene.choice_container.get_child_count() == 4, "the first question page should contain four choices")
_assert(screen.active_scene.choice_pager.visible, "eight choices should display paging controls")
_assert(screen.active_scene.choice_page == 0, "new question sets should begin on the first page")
@@ -100,7 +110,7 @@ func _run() -> void:
_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()
screen.active_scene.complete_response_transition()
screen.active_scene.advance_dialogue()
_assert(screen.active_scene.choice_container.get_child_count() == 1, "terminal dialogue should expose the management handoff")
_assert(not screen.active_scene.choice_pager.visible, "a single terminal action should not show paging controls")
screen.active_scene.interview_continue_requested.emit()