31 lines
1.8 KiB
GDScript
31 lines
1.8 KiB
GDScript
extends SceneTree
|
|
|
|
const NavigationRoutes := preload("res://scripts/ui/navigation_routes.gd")
|
|
|
|
var failures := 0
|
|
|
|
|
|
func _initialize() -> void:
|
|
_assert(NavigationRoutes.key_for_screen("dashboard") == "home", "dashboard should activate Dashboard navigation")
|
|
_assert(NavigationRoutes.key_for_screen("selection", "exam") == "home", "exam selection should activate Home")
|
|
_assert(NavigationRoutes.key_for_screen("selection", "step3") == "home", "Step 3 mode selection should remain part of Home")
|
|
_assert(NavigationRoutes.key_for_screen("selection", "question_bank") == "question_bank", "direct question bank launch should activate Question Bank")
|
|
_assert(NavigationRoutes.key_for_screen("setup") == "question_bank", "block setup should activate Question Bank")
|
|
_assert(NavigationRoutes.key_for_screen("player") == "question_bank", "question player should map to Question Bank")
|
|
_assert(NavigationRoutes.key_for_screen("simulation_results") == "exams", "simulation results should activate Exams")
|
|
_assert(NavigationRoutes.key_for_screen("ccs_review") == "ccs", "CCS review should activate CCS Cases")
|
|
_assert(NavigationRoutes.key_for_screen("profile") == "performance", "profile should activate Performance")
|
|
_assert(NavigationRoutes.key_for_screen("map") == "study_plan", "study map should activate Study Plan")
|
|
_assert(NavigationRoutes.key_for_screen("settings") == "settings", "settings should activate Settings")
|
|
_assert(NavigationRoutes.key_for_screen("notes") == "notes", "notes should activate Notes")
|
|
_assert(NavigationRoutes.key_for_screen("bookmarks") == "bookmarks", "bookmarks should activate Bookmarks")
|
|
_assert(NavigationRoutes.key_for_screen("donations") == "donations", "donations should activate Support RanaZe")
|
|
quit(1 if failures > 0 else 0)
|
|
|
|
|
|
func _assert(condition: bool, message: String) -> void:
|
|
if condition:
|
|
return
|
|
failures += 1
|
|
push_error(message)
|