Confirm passwords for external account creation
This commit is contained in:
@@ -15,6 +15,7 @@ func _run() -> void:
|
||||
_test_elapsed_timeout_clears_flow()
|
||||
_test_transient_failure_keeps_transaction()
|
||||
_test_leaving_completion_cancels_flow()
|
||||
_test_external_account_password_confirmation()
|
||||
login.queue_free()
|
||||
await process_frame
|
||||
quit(1 if failures > 0 else 0)
|
||||
@@ -47,6 +48,19 @@ func _test_leaving_completion_cancels_flow() -> void:
|
||||
_assert(login.poll_timer.is_stopped(), "leaving Steam account completion should stop polling")
|
||||
|
||||
|
||||
func _test_external_account_password_confirmation() -> void:
|
||||
login._on_steam_action_changed(0)
|
||||
_assert(login.steam_confirm_input.visible, "new external accounts should show password confirmation")
|
||||
_assert(login.steam_confirm_input.secret, "external password confirmation should be masked")
|
||||
_assert(
|
||||
login._validate_account("new_user", "[email protected]", "password-one", "password-two") == "Passwords do not match.",
|
||||
"external account creation should reject mismatched passwords")
|
||||
login.steam_confirm_input.text = "password-one"
|
||||
login._on_steam_action_changed(1)
|
||||
_assert(not login.steam_confirm_input.visible, "existing-account linking should hide password confirmation")
|
||||
_assert(login.steam_confirm_input.text.is_empty(), "hidden confirmation text should be cleared")
|
||||
|
||||
|
||||
func _assert(condition: bool, message: String) -> void:
|
||||
if condition:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user