From b1f9af8ac31152aceff554b14cb9cab03710dbfa Mon Sep 17 00:00:00 2001 From: thiscris Date: Thu, 18 Jan 2024 20:53:37 +0100 Subject: [PATCH 1/2] tests with unique emails based on UNIX timestamp --- tests/auth/auth.gd | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/auth/auth.gd b/tests/auth/auth.gd index ce62548..9321f9a 100644 --- a/tests/auth/auth.gd +++ b/tests/auth/auth.gd @@ -6,18 +6,21 @@ extends Node2D @onready var _test_running = false @onready var console = $console var _auth_error = false +var _email1 : String +var _email2 : String signal test_finished() # Constants -const _email1 = 'test@fakeemail.com' -const _email2 = 'test2@fakeemail.com' const _password1 = 'ThisPasswordIsAwesome' const _password2 = 'ThisPasswordIsStillAwesome' const _timer_length = 5 # Function called when the scene is ready func _ready(): + var now:int = Time.get_unix_time_from_system() + _email1 = "test_%s@fakeemail.com" % now + _email2 = "test2_%s@fakeemail.com" % now Firebase.Auth.login_succeeded.connect(_on_FirebaseAuth_login_succeeded) Firebase.Auth.signup_succeeded.connect(_on_FirebaseAuth_signup_succeeded) Firebase.Auth.login_failed.connect(_on_login_failed) From d313aec5df6ddf0972127e92ac480da4932c55bf Mon Sep 17 00:00:00 2001 From: thiscris Date: Sat, 20 Jan 2024 14:36:58 +0100 Subject: [PATCH 2/2] correct identation --- tests/auth/auth.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/auth/auth.gd b/tests/auth/auth.gd index 9321f9a..216d1bf 100644 --- a/tests/auth/auth.gd +++ b/tests/auth/auth.gd @@ -18,9 +18,9 @@ const _timer_length = 5 # Function called when the scene is ready func _ready(): - var now:int = Time.get_unix_time_from_system() - _email1 = "test_%s@fakeemail.com" % now - _email2 = "test2_%s@fakeemail.com" % now + var now:int = Time.get_unix_time_from_system() + _email1 = "test_%s@fakeemail.com" % now + _email2 = "test2_%s@fakeemail.com" % now Firebase.Auth.login_succeeded.connect(_on_FirebaseAuth_login_succeeded) Firebase.Auth.signup_succeeded.connect(_on_FirebaseAuth_signup_succeeded) Firebase.Auth.login_failed.connect(_on_login_failed)