WIP checkpoint: Main menu: hide the login/register form once authenticated, keep only the welcome message

This commit is contained in:
2026-08-20 15:01:02 +00:00
parent 8fc9d378e4
commit 8f1a1110e2
2 changed files with 25 additions and 7 deletions
+15 -3
View File
@@ -1,9 +1,8 @@
extends SceneTree
## Full click-through simulation of the real user flow: press Register,
## fill the form exactly as a human would, submit, confirm Play actually
## becomes clickable. This is the check that would have caught the
## original bug (no way to even open the form) and would catch a repeat
## of it.
## becomes clickable. Also verifies that after successful auth the auth
## form fields are hidden, leaving only the welcome message visible.
var passed := 0
var failed := 0
@@ -27,7 +26,9 @@ func _run() -> void:
var password_edit: LineEdit = instance.get_node("CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/PasswordEdit")
var email_edit: LineEdit = instance.get_node("CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/EmailEdit")
var dob_edit: LineEdit = instance.get_node("CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/DOBEdit")
var mode_toggle: CheckButton = instance.get_node("CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/ModeToggle")
var auth_button: Button = instance.get_node("CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/AuthButton")
var auth_mode_label: Label = instance.get_node("CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/AuthModeLabel")
var welcome_label: Label = instance.get_node("CenterContainer/VBoxContainer/AuthPanel/MarginContainer/AuthVBox/WelcomeLabel")
var play_button: Button = instance.get_node("CenterContainer/VBoxContainer/PlayButton")
@@ -63,6 +64,17 @@ func _run() -> void:
_check("Welcome label visible", welcome_label.visible)
_check("Auth buttons row hid itself after success", not auth_buttons_row.visible)
# Verify the auth form fields are hidden after successful auth,
# leaving only the welcome message visible within the panel.
_check("Username edit hidden after auth", not username_edit.visible)
_check("Password edit hidden after auth", not password_edit.visible)
_check("Email edit hidden after auth", not email_edit.visible)
_check("DOB edit hidden after auth", not dob_edit.visible)
_check("Mode toggle hidden after auth", not mode_toggle.visible)
_check("Auth button hidden after auth", not auth_button.visible)
_check("Auth mode label hidden after auth", not auth_mode_label.visible)
_check("Welcome label contains username", welcome_label.text.begins_with("Welcome, mainmenu_e2e_"))
print("\n=== SMOKE RESULT: %d/%d passed ===" % [passed, passed + failed])
quit(0 if failed == 0 else 1)