Fix simulated exam question flow
This commit is contained in:
@@ -341,6 +341,14 @@ func _test_revisitable_navigation_prefers_unanswered_questions() -> void:
|
||||
session.answers[1] = {"selected_choice_id": "B"}
|
||||
session.current_index = 2
|
||||
_assert(player._next_revisitable_index() == 0, "skip should wrap rather than reload the same unanswered question")
|
||||
session.answers = [{"selected_choice_id": "A"}, null, {"selected_choice_id": "C"}]
|
||||
session.current_index = 2
|
||||
_assert(player._next_pending_simulation_index() == 1, "simulation should cycle an earlier skipped question back")
|
||||
session.answers[1] = {"selected_choice_id": "B"}
|
||||
_assert(player._next_pending_simulation_index() == -1, "simulation should submit only after every question has an answer")
|
||||
session.answers[2] = {"selected_choice_id": ""}
|
||||
session.current_index = 2
|
||||
_assert(player._next_pending_simulation_index() == 2, "the only skipped simulation question should remain pending")
|
||||
player.free()
|
||||
session.active_questions = prior_questions
|
||||
session.answers = prior_answers
|
||||
|
||||
Reference in New Issue
Block a user